
Rev. 1.00
318 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
15 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 1 UEV1 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 112. Triggering GPTM with MCTM Update Event 1