32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
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.
f
CLKIN
GPTM
UEVIF
GPTM
CNTR
MCTM
CNTR
MCTM
TME bit
MCTM
TEVIF
Figure 61. Triggering MCTM with GPTM Update Event
Rev. 1.00
13
14
15
FA
210 of 486
00
01
FB
FC
Software clearing
02
03
FD
July 31, 2018
Need help?
Do you have a question about the HT32F50231 and is the answer not in the manual?