cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F401: One DMA Stream Per PWM Channel on Timer3

juliantbrown
Associate
Posted on July 16, 2015 at 08:37

The original post was too long to process during our migration. Please click on the attachment to read the original post.
4 REPLIES 4
Posted on July 16, 2015 at 10:48

> Is it possible to set up four DMA streams, each carrying the data for a different strip, and assign each of these DMA streams to different a PWM channel of timer 3?

No.

What prevents you to use 4 timers? There are plenty of them in each STM32.

The real solution though is to use the DMA burst transfer, see TIMx_DCR/TIMx_DMAR. Don't expect many ready-made solutions out in the wild. The Reference Manual is your best friend.

JW

Posted on July 16, 2015 at 20:10

Wow a lot of WS2812B posts in recent weeks.

Several people have been looking at using DMA-to-GPIO, and creating a pattern buffer.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 16, 2015 at 20:24

> Is it possible to set up four DMA streams, each carrying the data for a different strip, and assign each of these DMA streams to different a PWM channel of timer 3?

 

 

No.

 

Are you sure? Is the F401 crippled in some fashion, because the table suggests each channel associates with it's own stream, and each TIM channel DMA is separately enabled.

TIM3_CH1 DMA1 Stream4 Channel5

TIM3_CH2 DMA1 Stream5 Channel5

TIM3_CH3 DMA1 Stream7 Channel5

TIM3_CH4 DMA1 Stream2 Channel5

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 24, 2015 at 11:34

>>> Is it possible to set up four DMA streams, each carrying the data for a different strip, and assign each of these DMA streams to different a PWM channel of timer 3?

 

>> No.

 

> Are you sure? Is the F401 crippled in some fashion, because the table suggests each channel associates with it's own stream, and each TIM channel DMA is separately enabled.

Indeed. I stand corrected.

Still, I see this as a great opportunity to talk someone into trying the TIMx_DMA/TIMx_DMAR mechanism... :)

JW