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