2022-10-18 12:33 PM
Hello
I created pwm as "TIM1 Channel1 PWM Generation CH1 CH1N" in a project where I use STM32F103C8T6 MCU.
My problem is that I couldn't find how to dynamically change the dead-time I set for pwm CH1 CH1N using the HAL library.
I will be glad if you help
2022-10-18 12:40 PM
No idea on how to do this with HAL. Without HAL it takes just single assignment instruction:
TIM1->BDTR = new_dead_time | maybe_some_flags;
2022-10-18 12:58 PM
thank you for your quick reply
Is there a working example? I tried with TIM1->BDTR before but without success.
2022-10-18 02:37 PM
I don't know what kind of working example you need for writing a value to a register. This will work, provided you don't lock the timer by writing a non-zero value to bits 9:8 of BDTR.