RM0090
The repetition counter is decremented:
●
At each counter overflow in upcounting mode,
●
At each counter underflow in downcounting mode,
●
At each counter overflow and at each counter underflow in center-aligned mode.
Although this limits the maximum number of repetition to 128 PWM cycles, it makes it
possible to update the duty cycle twice per PWM period. When refreshing compare
registers only once per PWM period in center-aligned mode, maximum resolution is
2xT
The repetition counter is an auto-reload type; the repetition rate is maintained as defined by
the TIMx_RCR register value (refer to
software (by setting the UG bit in TIMx_EGR register) or by hardware through the slave
mode controller, it occurs immediately whatever the value of the repetition counter is and the
repetition counter is reloaded with the content of the TIMx_RCR register.
In center-aligned mode, for odd values of RCR, the update event occurs either on the
overflow or on the underflow depending on when the RCR register was written and when the
counter was started. If the RCR was written before starting the counter, the UEV occurs on
the overflow. If the RCR was written after starting the counter, the UEV occurs on the
underflow. For example for RCR = 3, the UEV is generated on each 4th overflow or
underflow event depending on when RCR was written.
Figure 91. Update rate examples depending on mode and TIMx_RCR register
Counter
TIMx_CNT
TIMx_RCR = 0
TIMx_RCR = 1
TIMx_RCR = 2
TIMx_RCR = 3
TIMx_RCR
and
re-synchronization
, due to the symmetry of the pattern.
ck
settings
Center-aligned mode
UEV
UEV
UEV
UEV
= 3
UEV
(by SW)
UEV
Update Event: Preload registers transferred to active registers and update interrupt generated
Doc ID 018909 Rev 4
Advanced-control timers (TIM1&TIM8)
Figure
91). When the update event is generated by
Upcounting
(by SW)
Edge-aligned mode
Downcounting
(by SW)
366/1422
Need help?
Do you have a question about the STM32F40 Series and is the answer not in the manual?
Questions and answers