Skip to main content
weiwei liu
Associate II
October 24, 2017
Question

DMA multi-using problem

  • October 24, 2017
  • 3 replies
  • 1900 views
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.

    This topic has been closed for replies.

    3 replies

    waclawek.jan
    Super User
    October 29, 2017
    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

    weiwei liu
    Associate II
    October 30, 2017
    Posted on October 30, 2017 at 09:45

    0690X00000608iVQAQ.png

    TIM3_CH1

     request only map to DMA channel 6.

    S.Ma
    Principal
    October 30, 2017
    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.

    bernieserver
    Associate II
    October 9, 2018

    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

    waclawek.jan
    Super User
    October 9, 2018

    > 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