Skip to main content
Visitor II
February 23, 2025
Question

STM32F405 TIM DMA work only once

  • February 23, 2025
  • 1 reply
  • 352 views

Hi ST team,

I'm implementing DShot protocol with Timer + DMA. I use 4 PWM channels to generate control signals for ESC. 

Timer and DMA's parameters are same for all PWM channel. But PA3 (TIM2_CH4) does not work the same as other PWM channels. It only transmit DMA buffer once.

phonght32_2-1740312861345.pngphonght32_3-1740312876535.png

 

Below is my configuration:

Screenshot from 2025-02-23 19-06-36.png

 

 

 

 

 

 

 

 

 

 

 

 

Screenshot from 2025-02-23 19-07-31.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Auto reload value is 560, and this dma buffer will be transfered to pwm compare registers:

phonght32_1-1740312757691.png

I use these function to start transfer data:

phonght32_4-1740312955734.pngphonght32_5-1740312975290.png

Could you please help me check this issue? 

Thank you very much.

 

 

    This topic has been closed for replies.

    1 reply

    Super User
    February 23, 2025

    Do the HAL functions return HAL_OK? Set TIM2 IRQ and its DMA to higher priority than the others. Does it work then?