
GD32L23x User Manual
313
prescaler compared to TIMER_CK (f
CNT_CLK
= f
TIMER_CK
/3). Do as follow:
1. Configure TIMER2 master mode to send its enable signal as trigger output(MMC=001 in
the TIMER2_CTL1 register)
2. Configure TIMER1 to select the input trigger from TIMER2 (TRGS=000 in the
TIMER1_SMCFG register).
3. Configure TIMER1 in event mode (SMC=110 in TIMER1_SMCFG register).
4.
Start TIMER2 by writing 1 in the CEN bit (TIMER2_CTL0 register).
Figure 17-21. Triggering TIMER1 with Enable of TIMER2
TIMER_CK
CNT_REG
CNT_REG
CEN
61
62
63
11
12
13
TRGIF
14
TIMER2
TIMER1
In this example, we also can use update Event as trigger source instead of enable signal.
Refer to
Figure 17-22. Triggering TIMER1 with update signal of TIMER2
. Do as follow:
1. Configure TIMER2 in master mode and send its Update Event (UPE) as trigger output
(MMC=010 in the TIMER2_CTL1 register).
2. Configure the TIMER2 period (TIMER2_CAR registers).
3. Configure TIMER1 to get the input trigger from TIMER2 (TRGS=000 in the
TIMER1_SMCFG register).
4. Configure TIMER1 in event mode (SMC=110 in TIMER1_SMCFG register).
5.
Start TIMER2 by writing ‘1 in the CEN bit (TIMER2_CTL0 register).
Figure 17-22. Triggering TIMER1 with update signal of TIMER2
TIMER_CK
CNT_REG
CNT_REG
UPE
62
11
12
TRGIF
63
00
01
02
CEN
13
14
TIMER1
TIMER2