My theory is that it's because the register is double-buffered in PWM mode but not in CTC mode.
The value is lost if you write it while the timer is in PWM mode then switch to CTC mode before it gets copied to the real register.
My theory is that it's because the register is double-buffered in PWM mode but not in CTC mode.
The value is lost if you write it while the timer is in PWM mode then switch to CTC mode before it gets copied to the real register.