Change PWM polarity at update event with STM32 Timers?
I am using the adanced control and the general purpose timers witch the STM32F334K8T6 to drive one half-bridge and one full-bridge.
The problem lies with the full bridge:
I use the general purpose timer with two times asymmetrical PWM (center aligned mode) which gives me a lot of freedom. Period and all Duty-Cycles are preloaded and always refreshed at the update event. However, I would like to change polarity of the two signals on an update event, too. I can change polarity but what is the best way changing it at the right moment (when the update event occurs).
If I am not mistaken there is no hardware solution for this. What do you propose? Should i poll the counter value or do it by some kind of intterupt? Periods are comparably short (10us), so an update event occurs every 5us.
I hope that the attached figure helps you to understand what I mean.
Thanks in advance,
Samuel
