Solved
Timer PWM change period on runtime
Posted on June 12, 2017 at 11:17
Hi everyone,
In my project, I need to generate a PWM with some parameters which need to be changed during runtime.
Here are the parameters :
- Duty cycle
- Period
- Voltage level (I think this one is not possible... maybe there is an alternative way you may know?)
First of all, I generate the PWM without troubles.
I am able to change the duty cycle on runtime using __HAL_TIM_SET_COMPARE(__HANDLE__, __CHANNEL__, __COMPARE__) macro
Now, it is possible to change the period while runtime using this kind of macro? I can't find it.
Thank you very much,
Marc
#pwm #timer