admin管理员组

文章数量:1202363

I am trying to control all 4 TIM4 pins for PWM signal using DMA. Can I send data to each pin with single DMA stream ?

When I setup the pins and DMA in STM32 IDE it links the TIM4 Channel 1 pin to DMA1 stream 0, channel 2 to DMA1 stream 3 and channel 3 to DMA1 stream 7 + channel 4 doesn't let me add a DMA request.

Is there a way to to this or do I need to use different DMA streams ?

I am trying to control all 4 TIM4 pins for PWM signal using DMA. Can I send data to each pin with single DMA stream ?

When I setup the pins and DMA in STM32 IDE it links the TIM4 Channel 1 pin to DMA1 stream 0, channel 2 to DMA1 stream 3 and channel 3 to DMA1 stream 7 + channel 4 doesn't let me add a DMA request.

Is there a way to to this or do I need to use different DMA streams ?

Share Improve this question asked Jan 22 at 12:53 Ondřej DušekOndřej Dušek 131 silver badge2 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 2

Each timer channel is connected to a separate DMA channel.

You need to look at tables 43 and 44 in the reference manual (RM0090), and also maybe table 6 in the datasheet in case you might try a different timer.

Different streams for different channels: As you noticed, TIM4 channel 1 is linked to DMA1 Stream 0, channel 2 to DMA1 Stream 3, channel 3 to DMA1 Stream 7, and channel 4 doesn't allow a DMA request. This is due to the hardware configuration of STM32 peripherals.

本文标签: cSTM32F427 controlling TIM4 channels (PWM) with signle DMA streamStack Overflow