cancel
Showing results for 
Search instead for 
Did you mean: 

Can we have dedicated DMA channels for each USART of STM32F030CC

PB.4
Associate II

Hello Team,

I'm newbie to STM32F030CC, in this 6 USART channels are present, I want to use all the 6 USART's via DMA channels, but the available DMA channels are only 5 and also for Tx and Rx dedicated DMA channels are required, in that case I assume I have to go with interrupt based implementation for all 6 USART. Is this approach will work?

Also the DMA channels for the USART are selected by setting the register CxS[3:0] , if the value of this register bits set as 1000 means each channels are dedicated for USART1 and if it is set as 1100 means each channels are dedicated for USART5, how can we use each channels for different USART? Like if I want to use the DMA channel1 for USART1Rx and Channel2 for USART1Tx and channel3 for USART2Rx and Channel4 for USART2Tx.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

You have 5 DMA channels available. Six USART streams with both TX and RX would require 12 total channels, so there is no way to do this. A channel may only be mapped to a single request. You can't map a channel to multiple requests at the same time.

Interrupt based TX/RX will work.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

You have 5 DMA channels available. Six USART streams with both TX and RX would require 12 total channels, so there is no way to do this. A channel may only be mapped to a single request. You can't map a channel to multiple requests at the same time.

Interrupt based TX/RX will work.

If you feel a post has answered your question, please click "Accept as Solution".
PB.4
Associate II

Thanks for your answer @TDK​ .