
Rev. 1.00
234 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
14 General-Purpose T
imer (GPTM)
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
4
GT_CH0
(TI0)
CNTR
CH0CCR
CH1CCR
Capture CH0
Restart mode
Reset counter value
Capture CH1
7
Restart mode
Reset counter value
Figure 53. PWM Pulse Width Measurement Example
Input Stage
The input stage consists of a digital filter, a channel polarity selection, edge detection and a channel
prescaler. The channel 0 input signal (TI0) can be chosen to come from the GT_CH0 signal or the
Excusive-OR function of the GT_CH0, GT_CH1 and GT_CH2 signals. The channel input signal
(TIx) is sampled by a digital filter to generate a filtered input signal TIxFP. Then the channel
polarity and the edge detection block can generate a TIxS0ED or TIxS1ED signal for the input
capture function. The effective input event number can be set by the channel capture input source
prescaler setting field, CHxPSC.
Filter
TI0FP
TI0FN
TI0F
GT_CH0
f
sampling
CH0P
Filter
TI1FP
TI1FN
TI1F
CH1P
GT_CH1
TI0S0
TI1S0
TI0S1
TI1S1
TRCED
CH0PRESCALER
CH1PRESCALER
TI0S0ED
CH0PSC
CH1PSC
CH0CCS
CH1CCS
CH0PSC
CH1PSC
CH0CAP Event
CH1CAP Event
Edge
Detection
Edge
Detection
Edge
Detection
Edge
Detection
TI1S0ED
TI0S1ED
TI1S1ED
f
CLKIN
GT_CH1
GT_CH2
TI0SRC
TI0XOR
Edge
Detection
Edge
Detection
TI0BED
XOR
f
sampling
TI0
TI1
f
CLKIN
Figure 54. Channel 0 and Channel 1 Input Stages