2017-08-15 02:09 AM
Hello,
I have a question to the note in the datasheet (RM0385 Rev 6, Page 682). Bit 3 OC1PE - Note 2.
What means this note?
'The PWM mode can be used without validating the preload register only in one
pulse mode (OPM bit set in TIMx_CR1 register). Else the behavior is not guaranteed.'We can use the preload only in one pulse mode. Is this correct? How can I validate the preload register?
Best regards,
Michael
2017-08-15 04:11 AM
If you set that bit, the respective compare register (CCR1) does not get set immediately when you write it - the written value remains in an intermediate 'preload' register and it gets copied into the 'active compare register' at update event, i.e. when the counter (CNT) overflows (in upcounting mode). This is to prevent a missed pulse when you change CCR during counting (in PWM mode, compare output changes only at the moment of match).
The above sentence is a cumbersome way to say exactly this.
JW