2022-04-18 05:59 AM
Hi,
I know that DMA can save CPU time by transfering data from memory to peripheral (and from peripheral to memory) but it not clear how this works for I2C since the I2Cx_EV_HANDLER is still called when I changeI2C from IT configuration to DMA configuration.
I need to write/read from (STM32G474VET6) I2C without CPU intervention.
Solved! Go to Solution.
2022-11-03 06:36 AM
Hello @MAmem.1 ,
DMA requests are generated by Data Register becoming empty in transmission and Data Register becoming full in reception.
The CPU can be seen as if it’s suppressed, and to unleash its full working power this data transfer task has to be handed over to another unit and here it comes the DMA unit to offload these exhausting data transactions from the CPU.
(Example of STM32F103C8T6 architecture)
As you can see in the diagram above, the existence of the DMA unit can now direct the data stream coming from the I2C peripheral directly to the memory while the CPU doing other stuff and calculations. This parallel cooperation between the CPU and the DMA is where the acceleration stems from.
Hope my answer helped you!
When your question is answered, please close this topic by choosing Select as Best.
This will help other users find that answer faster.
Foued.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-11-03 06:36 AM
Hello @MAmem.1 ,
DMA requests are generated by Data Register becoming empty in transmission and Data Register becoming full in reception.
The CPU can be seen as if it’s suppressed, and to unleash its full working power this data transfer task has to be handed over to another unit and here it comes the DMA unit to offload these exhausting data transactions from the CPU.
(Example of STM32F103C8T6 architecture)
As you can see in the diagram above, the existence of the DMA unit can now direct the data stream coming from the I2C peripheral directly to the memory while the CPU doing other stuff and calculations. This parallel cooperation between the CPU and the DMA is where the acceleration stems from.
Hope my answer helped you!
When your question is answered, please close this topic by choosing Select as Best.
This will help other users find that answer faster.
Foued.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.