GD32F403xx User Manual
278
Figure 16-26. Timer0 master/slave mode timer example
TIMER0
Trigger
selection
CI0F_ED
CI0FE0
CI1FE1
ETIFP
TRGS
TIMER 2
Pre scaler
Counter
Master
mode
control
ITI2
IT1
ITI3
TRG O
TIMER 3
Pre scaler
Counter
Master
mode
control
TRG O
Other interconnection examples:
◼
Timer 2 as prescaler for timer 0
We conf igure Timer2 as a prescaler f or Timer 0. Ref er to
master/slave mode timer example
f or connections. Do as bellow:
1.
Configure Timer2 in master mode and select its update event (UPE) as trigger output
(MMC=3’b010 in the TIMER2_CTL1 register). Then timer2 drives a periodic signal on
each counter overflow.
2.
Configure the Timer2 period (TIMER2_CAR registers).
3.
Select the Timer0 input trigger source from Timer2(TRGS=3’b010 in the
TIMERx_SMCFG register).
4.
Configure Timer0 in external clock mode 0 (SMC=3’b111 in TIMERx_SMCFG register).
5.
Start Timer0 by writing ‘1 in the CEN bit (TIMER0_CTL0 register).
6.
Start Timer2 by writing ‘1 in the CEN bit (TIMER2_CTL0 register).
◼
Start timer 0 with timer 2’s Enable/Update signal
First, we enable Timer0 with the enable out of Timer2. Ref er to
TIMER0 with enable signal of TIMER2
. Timer0 starts counting from its current value on the
Содержание GD32F403 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F403xx Arm Cortex M4 32 bit MCU User Manual Revision 2 6 Jul 2022 ...
Страница 177: ...GD32F403xx UserManual 177 Peripheral Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 SDIO SDIO ...
Страница 217: ...GD32F403xx UserManual 217 ensures that no conversion is in progress ...