GD32F20x User Manual
356
Figure 18-29. Pause TIMER0 with enable signal of TIMER2
TIMER_CK
CNT_REG
CNT_REG
CEN
33
11
12
TRGIF
34
35
36
CEN
13
TIMER0
TIMER2
10
software clear
software clear
In this example, we also can use O0CPRE as trigger source instead of enable signal output.
Do as follow:
1.
Configure Timer2 in master mode and its output 0 Compare Prepare signal (O0CPRE)
as trigger output (MMS=3’b100 in the TIMER2_CTL1 register).
2.
Configure the Timer2 O0CPRE waveform (TIMER2_CH0CTL register).
3.
Configure Timer0 to get the input trigger from Timer2 (TRGS
=3’b010 in the
TIMERx_SMCFG register).
4.
Configure Timer0 in pause mode (SMC=3’b101 in TIMERx_SMCFG register).
5.
Enable Timer0 by writing ‘1 in the CEN bit (TIMER0_CTL0 register).
6.
Start Timer
2 by writing ‘1 in the CEN bit (TIMER2_CTL0 register).
Figure 18-30. Pause TIMER0 with O0CPREF signal of Timer2
TIMER_CK
O0CPRE
CNT_REG
CNT_REG
61
12
TRGIF
62
63
00
01
CEN
13
TIMER0
TIMER2
software clear
software clear
Using an external trigger to start 2 timers synchronously
Содержание GD32F20 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F20x ARM Cortex M3 32 bit MCU User Manual Revision 2 2 Oct 2019 ...
Страница 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Страница 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Страница 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Страница 385: ...GD32F20x User Manual 385 ...
Страница 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...