
RM0008
General-purpose timers (TIM9 to TIM14)
Doc ID 13902 Rev 12
413/1096
setting the UIF flag (thus no interrupt is sent). This is to avoid generating both update and
capture interrupts when clearing the counter on the capture event.
When an update event occurs, all the registers are updated and the update flag (UIF bit in
TIMx_SR register) is set (depending on the URS bit):
●
The auto-reload shadow register is updated with the preload value (TIMx_ARR),
●
The buffer of the prescaler is reloaded with the preload value (content of the TIMx_PSC
register).
The following figures show some examples of the counter behavior for different clock
frequencies when TIMx_ARR=0x36.
Figure 150. Counter timing diagram, internal clock divided by 1
Figure 151. Counter timing diagram, internal clock divided by 2
CK_PSC
00
CNT_EN
Timer clock = CK_CNT
Counter register
Update interrupt flag (UIF)
Counter overflow
Update event (UEV)
01 02 03 04 05 06 07
32 33 34 35 36
31
CK_PSC
0035
0000
0001
0002
0003
CNT_EN
Timer clock = CK_CNT
Counter register
Update interrupt flag (UIF)
0034
0036
Counter overflow
Update event (UEV)