
Rev. 1.00
367 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
16 Single-Channel T
imer (SCTM)
16 Single-Channel T
imer (SCTM)
Features
▆
16-bit auto-reload up-counter
▆
16-bit programmable prescaler that allows division of the prescaler clock source by any factor
between 1 and 65536 to generate the counter clock frequency
▆
Single channel for:
●
Input Capture function
●
Compare Match Output
●
PWM waveform output
▆
Interrupt generation with the following events:
●
Update event
●
Trigger event
●
Input capture event
●
Output compare match event
Functional Descriptions
Counter Mode
Up-Counting
The counter counts continuously from 0 to the counter-reload value, which is defined in the CRR
register, then restarts from 0 and generates a counter overflow event. This action will continue
repeatedly. When the update event is generated by setting the UEVG bit in the EVGR register to 1,
the counter value will also be initialized to 0.
CK_PSC
CNT_EN
F3
F4
F5
CK_CNT
F2
F5
CNTR
CRR Shadow Register
CRR
36
F5
36
0
1
0
1
PSCR
PSCR Shadow Register
0
0
1
0
1
0
1
0
0
1
2
3
PSC_CNT
Counter Overflow
Update Event Flag
Software clearing
Write a new value
1
Update the new value
Figure 117. Up-Counting Example