cancel
Showing results for 
Search instead for 
Did you mean: 

MDMA and DMA shared memory speed optimization

elso
Associate III

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:

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hello @elso 

 

Indeed, MDMA has direct connection with DMA1 and DMA2. It can be configured to be hardware triggered. This can help to achieve high speed data transfer. To do this, check section 1.2 in AN5001.

 

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.


I'm out of offce with limited access to my emails.
Happy New Year!

View solution in original post

3 REPLIES 3
FBL
ST Employee

Hello @elso 

 

Indeed, MDMA has direct connection with DMA1 and DMA2. It can be configured to be hardware triggered. This can help to achieve high speed data transfer. To do this, check section 1.2 in AN5001.

 

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.


I'm out of offce with limited access to my emails.
Happy New Year!
elso
Associate III

Hi @FBL 

Is it possible to trigger MDMA on the DMA buffer half complete interrupt too?

FBL
ST Employee

Hello @elso 

 

According to the block interconnect, table 97 section 13.3.1, in the reference manual, only DMA transfer complete can trigger MDMA by HW. 

 

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.


I'm out of offce with limited access to my emails.
Happy New Year!