cancel
Showing results for 
Search instead for 
Did you mean: 

DMA configuration by MDMA, is it possible?

bigfoot
Associate II

MDMA presentation reads:

(MDMA) "Can be used to prepare data for other DMAs and then set the DMA configuration to start transfers".

The first part (prepare data) is clear; however, I cannot figure out how MDMA automatically configures DMA and starts transfer.

Any help/link will be appreciated.

6 REPLIES 6

What presentation?

> I cannot figure out how MDMA automatically configures DMA and starts transfer.

By copying a previously prepared set of suitable values from memory to the DMA registers.

JW

bigfoot
Associate II

>> What presentation?

I have attached this link: https://www.st.com/content/ccc/resource/training/technical/product_training/group0/5a/1c/4e/96/b8/23/40/3c/STM32H7-System-Master_direct_memory_access_controller_MDMA/files/STM32H7-System-Master_direct_memory_access_controller_MDMA.pdf/_jcr_content/translations/en.STM32H7-System-Master_direct_memory_...

>> By copying a previously prepared set of suitable values from memory to the DMA registers.

Great. However, how do you achieve it? I cannot find MDMA register that says "in the end of MDMA transfer, load DMA1/2 configuration from memory and start DMA1/2".

DMA registers are just another area in the overall memory region. If it's accessible by MDMA through the bus matrix, it can be destination of its transfers.

You can chain transfers using the scatter-gather feature of MDMA (ST appears to call it "Linked list mode").

Devil lies, as usually, in the details. For example, I'd consider decrementing destination address when writing to DMA, as the control register needs to be written as last.

JW

bigfoot
Associate II

Thank you very much, it looks very promising.

However, I'm afraid the"devil" you mentioned is not the only one on the road.

Do you have it implemented, or do you know some other's implementation?

Any practical example would be very helpful.

> Do you have it implemented, or do you know some other's implementation?

No and no.

But the problem can be easily split to 1. learn how to use DMA writing its registers; 2. learn how to write DMA registers from MDMA (in a single transfer); 3. learn how to use MDMA in scatter/gather mode.

JW

bigfoot
Associate II

Many thanks, anyway.