
Rev. 1.00
329 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
16 Motor Control T
imer (MCTM)
Starting Two Timers Synchronously in Response to an External Trigger
▄
Configure MCTM to operate in the master mode to send its enable signal as a trigger output
(MMSEL = 0x1).
▄
Configure MCTM slave mode to receive its input trigger source from MT_CH0 pin (TRSEL =
0x1).
▄
Configure MCTM to be in the slave trigger mode (SMSEL = 0x6).
▄
Enable the MCTM master timer synchronisation function by setting the TSE bit in the MDCFR
register to 1 to synchronise the slave timer.
▄
Configure GPTM to receive its input trigger source from the MCTM trigger output (TRSEL =
0xA).
▄
Configure GPTM to be in the slave trigger mode (SMSEL = 0x6).
TI0
TI0FP
f
DTS
= f
CLKIN
TI0S0ED
MCTM (TME bit)
MCTM (TEVIF)
TSE=1
Delay
MCTM CK_PSC
0
1
2
3
4
MCTM CNTR
34
Write UEV1G bit
ITI
5
Master MCTM
GPTM (TME bit)
GPTM (TEVIF)
GPTM CK_PSC
GPTM CNTR
0
1
2
3
4
11
0
Write UEVG bit
5
Slave GPTM
Figure 133. Trigger MCTM and GPTM with the MCTM CH0 Input