cancel
Showing results for 
Search instead for 
Did you mean: 

Setup MDMA for inter-core data processing

Davla_CEKO
Associate

Hello,
I am fairly new to STM32 (and ARM MCUs in general), and I need a bit of help with DMA/MDMA transfers.

I am using an STM32H747 dual core MCU and I intent to do some high-speed data sampling on the ADC (currently ~3 MSPS, going to 7-ish MSPS in the future) and process the data in the M7 core. Currently all peripheral configuration, communication etc. is done on the M4 core in order to keep the M7 free for signal processing.

Basically, I am getting 64 data samples from the ADC (clocked by a free-running timer) and whenever at 64 sample (128 byte) chunk is ready, I want to move the data into DTCM and trigger the processing on the M7 core using inter-core interrupts. The processing runs in parallel with the ADC getting the next 64 samples.
When data processing has completed, the resulting data should be placed back into SRAM (Accessible for the M4 core) for sending out over USART/whatever.

My current solution samples the input signal but moves it into shared SRAM (ridiculously slow) before doing the processing and data back-and-forth - so it is conceptually working, but slow. I can get it running much faster by activating caching on the M7 core, but this
a) requires me to do handle some cache-coherency issues, that I have not mastered yet
b) seems like an unreliable hack-type solution for a concrete problem

Can anybody help me allocate DTCM space for the data and setup the MDMA controller to do the data transferring to and from the SRAM upon ADC buffer conversion complete?
I should mention that for now I am sticking with the STM32CubeIDE and bare-metal (HAL) programming, until I’ve familiarized myself a bit more with the architecture.

Cheers,
Davla

0 REPLIES 0