
Rev. 1.00
287 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
15 Motor Control T
imer (MCTM)
15 Motor Control T
imer (MCTM)
Functional Descriptions
Counter Mode
Up-Counting
In this mode the counter counts continuously from 0 to the counter-reload value, which is defined
in the CRR register, in a count-up direction, then restarts from 0 and generates a counter overflow
event. This action will continue repeatedly. The counting direction bit DIR in the CNTCFR register
should be cleared to 0 for the up-counting mode.
When an update event 1 is generated by setting the UEV1G bit in the EVGR register to 1, the
counter value will also be initialised 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 1
Flag
Software clearing
Write a new value
1
Update the new value
Figure 74. Up-Counting Example