cancel
Showing results for 
Search instead for 
Did you mean: 

Double complementary death time with STM32-F401RE board

SMusc.1
Associate III

Hi everyone; i followed the tutorial to get two output PWM signal with 10us of death time but i also tried to do a double complementary death time to have 4 signals with rispect death time but it doesn't work. In the main i add two mor command

 HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);

 HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_2);

 HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_3);

 HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_3);

In this way i get two complementary pwm out put signal with death time on channel 2 e 2N but nothing on the other two channel 3 and 3N. This depend of the hardware of my board or i make some error in the setting?

5 REPLIES 5
SMusc.1
Associate III

maybe i found the issue: for channel_3 (also for channel 1) there is no option in Mode to select PWM mode. This mode is only avaiable on channel 2 where the code working

AScha.3
Chief III

PWM mode with dead time :

0693W00000UFKHqQAP.png

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

Maybe you're just blocking the TIM1_CH1N/TIM1_CH3N pins with some other functionality?

JW

SMusc.1
Associate III

I forgot to select the PMW Mode for Channel_2 and now is working

SMusc.1
Associate III

sorry the pulse value