AnsweredAssumed Answered

STM32F030 changing deadtime under operation

Question asked by Balint C on Dec 11, 2017
Latest reply on Dec 12, 2017 by waclawek.jan

Hello Community.

 

I have a project with PWM output TIM1_CH2 and TIM1_CH2N.

 

I can set deadtime without problem if I do that at the inicialization and setting the TIM1_BDTR lock_level_1.

But I want to change the deadtime under the oparation between 2 values. I am not sure is it possible or not because I have problem.

 

When I turn off the LOCK_LEVEL_1 to LOCK_LEVEL_OFF and set once the deadtime value than watching pwm on oscilloscope I can see almost every second or third period the MCU fails to add the deadtime and run the outputs without it. Sometimes it is missing at the rising edge sometimes the falling edge and sometimes both totally randomly happens.

 

So I want to ask what is the good procedure to do that without failing any period.

Outcomes