cancel
Showing results for 
Search instead for 
Did you mean: 

Configure DMA for MDMA H7 dual core

RMcCa
Senior II

Sorry to be asking so many questions, but these dual core h7s are hella complicated and the documentation can be a little vague.

I am trying to understand how to set up the dmas to work with the mdma. I think i get the dmamux and how the mdma works with dma channels, but am unsure about the interrelationships between the mdma block size and the dma ​ntdr.

In one case, i am receiving 8 half words in a single burst from an spi in slave mode. Should i set the dma ntdr to 8 and the mdma block size also to 8 with a common 8 half word ahb ram buffer in between? I would like to use an mdma transfer complete interrupt in the f7 code to trigger when all 8 half words have been recieved & copied into tcm ram.

Also​, i have a 9600 baud uart rx for ascii hex command reception. I would like to set it up so that i can use the uart character match interrupt to stop the mdma and read the number of bytes recieved by the mdma from the uart dma channel. Should i set the dma ntdr to 1 and the mdma block size to the ram buffer size? The buffer is 256 bytes, which is plenty big enough for a command. If i initialize the mdma block size to 256, will i be able to simply read the count and subtract from 256 to get the message length in the uart character match isr? This works with an f7, setting ndtr to 256.

Thanks.​

0 REPLIES 0