
Rev. 1.00
210 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
13 General-Purpose T
imer (GPTM)
13 General-Purpose T
imer (GPTM)
Using One Timer to Trigger Another Timer Start Counting
▄
Configure GPTM to operate in the master mode to send its Update Event UEV as the trigger
output (MMSEL = 0x2).
▄
Configure the GPTM period by setting the CRR register.
▄
Configure MCTM to get the input trigger source from the GPTM trigger output (TRSEL = 0xA).
▄
Configure MCTM to be in the slave trigger mode (SMSEL = 0x6).
▄
Start GPTM by writing ‘1’ to the TME bit.
14
15
00
01
02
FB
FC
FA
03
13
f
CLKIN
GPTM
CNTR
MCTM
CNTR
Software clearing
MCTM
TME bit
MCTM
TEVIF
FD
GPTM
UEVIF
Figure 61. Triggering MCTM with GPTM Update Event