
Rev. 1.00
227 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
14 General-Purpose T
imer (GPTM)
14 General-Purpose T
imer (GPTM)
▆
STIED:
The counter prescaler can count during each rising edge of the STI signal. This mode can be
selected by setting the SMSEL field to 0x7 in the MDCFR register. Here the counter will act
as an event counter. The input event, known as STI here, can be selected by setting the TRSEL
field to an available value except the value of 0x0. When the STI signal is selected as the clock
source, the internal edge detection circuitry will generate a clock pulse during each STI signal
rising edge to drive the counter prescaler. It is important to note that if the TRSEL field is set to
0x0 to select the software UEVG bit as the trigger source, then when the SMSEL field is set to
0x7, the counter will be updated instead of counting.
PSCR
CRR
CNTR
Reset
CLK
PSC Prescaler
Reset
CLK
TM_CNT
CLKPULSE
(Quadrature Decoder)
f
CLKIN
(Internal APB clock)
TRSEL
SMSEL
Overflow /
Underflow
CK_PSC
CK_CNT
UEVG bit
Slave Restart
mode trigger
Update Event
Start/Stop
STIED
(Trigger events)
Figure 43. GPTM Clock Source Selection