MDMA and DMA shared memory speed optimization
- November 9, 2023
- 3 replies
- 2508 views
Hi All,
I am using an Nucleo-144 STM32H723ZG.
Here I try to use ADC3 to sample data, and save it to a buffer (SRC_Buf) using DMA, which works fine. Then I want to move the data from the SRC_Buf to A bigger buffer using MDMA. I have some callback functions for the MDMA and DMA to see when they finish transfers. However it seems like the DMA always fills half the buffer before the MDMA have managed to transfer the other half, and I would potentially loose data. If I increase the MDMA interrupt priority, I get the callback function triggered, but not otherwise. Is there some settings or methods I can configure to make those processes happen faster? Maybe a hardware trigger etc. Better data transfer speeds, memory management...?
Thanks for all answers!
This is the code:
