cancel
Showing results for 
Search instead for 
Did you mean: 

What is the Purpose of Timer Auto-reload preload enable bit

bluewaters213
Associate III
Posted on March 03, 2013 at 13:51

Hello,

The Timer in my Code generate 1secs Pulse.I discover that with Auto-reload preload enable, I get accurate 1sec pulse but with it disable, I get 1.6secs.I have read the reference manual but could not understand the purpose of Auto-reload preload enable bit.Please can anyone share more light on Auto-reload preload enable bit.

Regards
3 REPLIES 3
Posted on March 03, 2013 at 14:19

Writing the register either goes to the internal comparator latch immediately, or is delayed until the next update event.

The normal delayed mechanism allows for the precise application of a new value wrt CNT, instead of occurring at some random time where potentially CNT already exceeds ARR, or at a point where the service latency is some what indeterminate.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Seng Tak Goh
Associate III

Hi,

Recent update of Cube's F4 FW Pack ( 1.24) finally made this bit configurable and caught my attention.

My interpretation of it's function, based on Figures 'Counter timing diagram, update event when ARPE=0 (TIMx_ARR not preloaded)' and 'Counter timing diagram, update event when ARPE=1 (TIMx_ARR preloaded)' in Reference Manual, is, when ARPE is enabled, ARR is pre-loaded with its Register value buffered in the Shadow Register, so changing the ARR value (with ARPE=1) will not having any effect on current cycle until the UEV happens, and by then the shadow register is updated with the ARR value.

So perhaps your observation was due to the fact that your firmware was constantly manipulating the ARR and in certain occasion the the counter value and ARR value combination caused the pulse width to be longer than 1 sec?

perfect