GD32F20x User Manual
394
Figure 18-39. 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
Capture/compare channels
The general level0 Timer has four independent channels which can be used as capture inputs
or compare match outputs. Each channel is built around a channel capture compare register,
including an input stage, channel controller and an output stage.
Input capture mode
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 the
channel input, the current value of the counter is captured into the TIMERx_CHxCV register,
at the same time the CHxIF bit is set and the channel interrupt is generated if enabled by
CHxIE = 1.
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 ...