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