GD32F20x User Manual
336
prescaler register) are updated.
Figure 18-8. Center-aligned counter timechart
show some examples of the counter
behavior when TIMERx_CAR=0x63. TIMERx_PSC=0x0
Figure 18-8. Center-aligned counter timechart
Hardware set
Software clear
CEN
CNT_CLK(PSC_CLK)
CNT_REG
03
02
01
00
01
02
…
.
62
63
62
61
…
.
01
00
Underflow
Overflow
TIMERx_CTL0 CAM = 2'b11
TIMER_CK
01
02
…
.
62
63
62
61
UPIF
CHxIF
CHxIF
TIMERx_CTL0 CAM = 2'b10 (upcount only
)
TIMERx_CTL0 CAM = 2'b01 (downcount only
)
CHxIF
Counter repetition
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 in up-counting mode, at each
counter underflow in down-counting mode or at each counter overflow and at each counter
underflow in center-aligned 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.
For odd values of CREP in center-aligned mode, the update event occurs either on the
overflow or on the underflow depending on when the CREP register was written and when
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...