2016-02-12 08:52 AM
At certain time instant I need to disable the PWM.
The problem is that I don't want to disable when the logic is high, but low. How can I obtain this? Thanks.2016-02-13 11:03 AM
You can write the output low, disable the PWM and then write it low again. Worst case you get a short pulse while turning it off.
Or do you want to finish the current PWM cycle completely? Isn't there a mode that a reload of the PWM register only happens on the next timer overflow? Set the PWM to 0 for the next cycle and maybe disable the whole PWM on the next overflow interrupt.