
Rev. 1.00
293 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)
Slave Controller
The MCTM can be synchronised with an internal/external trigger in several modes including the
Restart mode, the Pause mode and the Trigger mode which are selected by the SMSEL field in the
MDCFR register. The trigger input of these modes comes from the STI signal which is selected by
the TRSEL field in the TRCFR register. The operation modes in the Slave Controller are described
in the accompanying sections.
Trigger Controller
STI
Trigger Event
Slave
Controller
Reset/Stop/Start Counter
SMSEL
Restart/Pause/Trigger Mode
Figure 80. Slave Controller Diagram
Restart Mode
The counter and its prescaler can be reinitialised in response to an STI signal rising edge.
When an STI rising edge occurs, the update event 1 software generation bit named UEV1G will
automatically be asserted by hardware and the trigger event flag, TEVIF, will also be set. Then
the counter and prescaler will be reinitialized. Although the UEV1G bit is set to 1 by hardware,
whether the update event really occurs or not depends upon the update event 1 disable control
bit UEV1DIS is set to 1 or not. If the UEV1DIS bit is set to 1 to disable the update event, then
no update event will be generated, however the counter and prescaler are still reinitialized when
an STI rising edge occurs. If the UEV1DIS bit in the CNTCFR register is cleared to enable the
update event, then an update event will be generated together with the STI rising edge and all the
preloaded registers will be updated.
CK_CNT
STI
UEV1G bit
(reset counter)
27
CNTR
(Up-counting)
28
29
30
31
0
1
2
27
CNTR
(Down-counting)
26
25
24
23
32
31
30
TEVIF
Trigger Event
Timer Counter-Reload Register CRR = 32
STI source signal
(polarity=0)
STI source signal
(polarity=1)
Sync.
Figure 81. MCTM in Restart Mode