Seeking clarity about DMA on STM32F410RB

Thread Starter

ApacheKid

Joined Jan 12, 2015
157
I'm perusing this tutorial and read this:

We cannot use any arbitrary DMA controller. Instead, we need to pick the controller, stream and channel that are connected to the UART2 TX function. This will ensure that the DMA controller will not start transferring another byte until the UART controller is ready to accept it (i.e. has finished physically transmitting the previous one).
What isn't clear is why we can't equally use DMA2, the reference manual seems to show that DMA2 (see Table 30.) could also be used but that tutorial seems to single out DMA1 as being "special" in some way. DMA2 Stream 6 and channel 5 identifies USART6_TX so why is this not suitable yet USART2_TX is?

The chip provides only two controllers, yet the article says "We cannot use any arbitrary DMA controller" - this seems to be saying we can't use DMA2 and must use DMA1 - but why?

Thanks
 
Last edited:

MrChips

Joined Oct 2, 2009
21,688
There are two DMA controllers., DMA1 and DMA2.
Peripheral devices are controlled by only one of the DMA controllers, not both.
Hence USART6 is on DMA2, not DMA1.
USART2 is on DMA1, not DMA2.
 

Thread Starter

ApacheKid

Joined Jan 12, 2015
157
There are two DMA controllers., DMA1 and DMA2.
Peripheral devices are controlled by only one of the DMA controllers, not both.
Hence USART6 is on DMA2, not DMA1.
USART2 is on DMA1, not DMA2.
Thanks, I understand now. It's not quite clearly written. Because their example begins by leveraging USART_2 (because that is the ST-LINK's COM port - making the testing easy to see) then by initially choosing to use USART_2 we must use DMA1 to do DMA with that USART!

Thanks.
 
Top