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