
Rev. 1.00
317 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)
Timer Interconnection
The timers can be internally connected together for timer chaining or synchronization. This can
be implemented by configuring one timer to operate in the master mode while configuring another
timer to be in the slave mode. The following figures present several examples of trigger selection
for the master and slave modes.
Using one timer to trigger another timer to start or stop counting
▆
Configure MCTM to be in the master mode and to send its channel 0 Output Reference signal
CH0OREF as a trigger output (MMSEL = 0x4).
▆
Configure the MCTM CH0OREF waveform.
▆
Configure the GPTM to receive its input trigger source from the MCTM trigger output (TRSEL
= 0xA).
▆
Configure GPTM to operate in the pause mode (SMSEL = 0x5).
▆
Enable GPTM by writing ‘1’ to the TME bit.
▆
Enable MCTM by writing ‘1’ to the TME bit.
33
34
35
36
00
FB
FC
FA
FD
01
32
f
CLKIN
MCTM
CH0OREF
MCTM
CNTR
GPTM
CNTR
GPTM
TEVIF
Software clearing
Master MCTM
Slave GPTM
Figure 111. Pausing GPTM Using the MCTM CH0OREF Signal