![GigaDevice Semiconductor GD32A50 Series Скачать руководство пользователя страница 336](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32a50-series/gd32a50-series_user-manual_2225782336.webp)
GD32A50x User Manual
336
Figure 18-11. Repetition counter timing chart of down counting mode
CEN
CNT_REG
3
2
1
0
99
98
.
1
0
99
98
.
1
0
Underflow
Overflow
TIMERx_CREP = 0x0
TIMER_CK
99
98
.
1
0
99
98
UPIF
TIMERx_CREP = 0x1
.
1
0
99
98
.
1
0
99
98
UPIF
UPIF
TIMERx_CREP = 0x2
PSC_CLK
Input capture and output compare channels
The advanced timer has eight 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.
When the channels are used for input, channel x and
multi mode channel x can perform input
capture independently; when the channels are used for comparison output, the channel x and
multi mode channel x can output independent, mirrored, and complementary outputs.
Channel input capture function
Channel input capture function 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/ TIMERx_MCHxCV(x=0..3) registers, at the same time the CHxIF/ MCHxIF
(x=0..3) bits are set and the channel interrupt is generated if it is enabled when CHxIE/
MCHxIE =1(x=0..3).