![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 241](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794241.webp)
GD32E23x User Manual
241
Figure 14-8.
Timing chart of center-aligned counting mode
Hardware set
Software clear
CEN
PSC_CLK
CNT_REG
3
2
1
0
1
2
.
98
99
98
1
0
Underflow
Overflow
TIMERx_CTL0 CAM = 2'b11
TIMER_CK
1
2
.
98
99
98
97
UPIF
CHxIF
CHxIF
TIMERx_CTL0 CAM = 2'b10 (upcount only
)
TIMERx_CTL0 CAM = 2'b10 (downcount only
)
CHxIF
CHxCV=2
2
1
2
Update event (from overflow/underflow) rate configuration
The rate of update events generation (from overflow and underflow events) can be
configured by the TIMERx_CREP register. Counter repetition is used to generator update
event or updates the timer registers only after a given number (N+1) of cycles of the counter,
where N is CREP in TIMERx_CREP register. The repetition counter is decremented at each
counter overflow (does not exist in down counting mode) and underflow (does not exist in up
counting mode).
Setting the UPG bit in the TIMERx_SWEVG register will reload the content of CREP in
TIMERx_CREP register and generator an update event.
The new written CREP value will not take effect until the next update event. When the value
of CREP is odd, and the counter is counting in center-aligned mode, the update event is
generated (on overflow or underflow) depending on when the written CREP value takes