GD32VF103 User Manual
287
When an update event occurs, all the registers (auto-reload register, prescaler register) are
updated.
Figure 15-41. Timing chart of center-aligned counting mode
show some examples of the
counter behavior when TIMERx_CAR=0x63. TIMERx_PSC=0x0
Figure 15-41. Timing chart of center-aligned counting mode
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'b10 (downcount only
)
CHxIF
Capture/compare channels
The general level0 Timer has four independent channels which can be used as capture inputs
or compare outputs. Each channel is built around a channel capture compare register
including an input stage, a channel controller and an output stage.
Input capture mode
Input capture mode allows the channel to perform measurements such as pulse timing,
frequency, period, duty cycle and so on. The input stage consists of a digital filter, a channel
polarity selection, edge detection and a channel prescaler. When a selected edge occurs on