cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405 TIM DMA work only once

phonght32
Associate II

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.

 

 

1 REPLY 1
TDK
Guru

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

 

If you feel a post has answered your question, please click "Accept as Solution".