cancel
Showing results for 
Search instead for 
Did you mean: 

TIM_OCxPreloadConfig

andreaspiezia9
Associate III
Posted on January 25, 2016 at 15:42

Hi all,

on the DM00068049 on pg. 452, is reported:

In case of PWM mode, this function is mandatory: TIM_OCxPreloadConfig(TIMx,

TIM_OCPreload_ENABLE);

But I see that timer works good also without recall this functions, why?
1 REPLY 1
Posted on January 25, 2016 at 18:02

The timers have a bunch of shadow registers that allow all parameters to be synchronously loaded at the Update event. Saves a bunch of race/phase/glitch issues where you'd otherwise have to reprogram things in the interrupt and hope your latency was low.

By preloading, things push through the shadow registers immediately, and you don't have to wait a whole period of the timer for settings to become active. You really want everything set before Enabling the timer, so it starts as anticipated/desired.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..