
Rev. 1.00
327 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
16 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 131. Pausing GPTM using the MCTM CH0OREF Signal