cancel
Showing results for 
Search instead for 
Did you mean: 

DMA multi-using problem

weiwei liu
Associate II
Posted on October 24, 2017 at 11:30

I use STM32F103, DMA1->CH6

USART2 RX and TIM3 TIM3_CH1 both can use this channel.

If only 

USART2 RX or TIM3 

TIM3_CH1 to use this channel,it is ok!

but how to multi use for two request?

thank you very much.

8 REPLIES 8
Posted on October 29, 2017 at 16:03

You can't.

Couldn't you use a different channel of TIM3, mapping to different DMA channel?

JW

Posted on October 30, 2017 at 09:45

0690X00000608iVQAQ.png

TIM3_CH1

 request only map to DMA channel 6.

Posted on October 30, 2017 at 09:58

Before I design a board schematic, I print the alternate function table and the DMA channel tables to make sure there is no conflicts. Now this is done by CubeMX to avoid challenges ahead.

Use a different timer channel or different time or a different usart, if the pinout is compatible.

Posted on October 30, 2017 at 10:13

Thank you, I will re-design

board schematic.

Posted on October 30, 2017 at 10:36

Based on that picture I assume you have already occupied channel2 to channel 7.

Can't you use TIM4_CH1 or TIM2_CH3 for the DMA, maybe without redesign of the board, for example employing timer chaining in some way?

JW

Posted on November 04, 2017 at 11:00

hehe, you are right. Actually, from ch1 to ch7, all be used!

Instead, use interrupt to handle request.

bernieserver
Associate II

Hello, we are currently having the same problem on an STM32F427. We want use 5 UARTS, ADC1 and one SPI interfaces togehter with DMA and now we have a stream collision.

Is it possible to share a stream by examining the channel (reading CHSEL bits) on the ISR of corresponding stream to get the hardware instance relating to the channel? We are using the STM32F4 HAL

> Is it possible to share a stream

Not simultaneously, i.e. in the same time.

USARTs are usually slow enough so that they can be comfortably handled by interrupts.

JW