2025-05-22 9:13 PM
I would like to use MDMA on Cortex M4 to move data from DDR to SRAM in order to overcome the SRAM size limitation, especially in Ecosystem 6 secure context when a SYSRAM bank is dedicated to OPTEE.
My idea is to move to DDR some data structures used by code running on Cortex M4 and, when needed by the code, to use MDMA to move such data from DDR to SRAM and then to unload such same structures from SRAM to DDR.
I found that MDMA is the preferred way to move data DDR <-> SRAM, but it isn't supported by STM32 MCUs Embedded Software.
Do you have any suggestion about how to proceed ?
2025-11-19 5:16 AM
It is a bit old question, but anyway. Steal some chans from linux:
&mdma1 {
dma-channels = <28>; // need last 4 chans for MCU
};
in MCU, enable MDMA clock in RCC_MC_AHB6ENSETR a setup channel 28
as you need. MDMA structs/consts are in CMSIS headers.
Because there is only one IRQ for MDMA, you can use linked transfers to write
into EXTI->SWIER1 and create your own transfer-done IRQ.
We use it in this way.
Martin