GD32A50x User Manual
357
Mode Selection
Source Selection
Polarity Selection
Filter and Prescaler
and it will start when
the trigger input is
high.
event will occur on the
rising edge only.
Figure 18-36. Pause mode
TIMER_CK
CEN
CNT_REG
94
95
96
97
98
CI0
TRGIF
CI0FE0
99
Exam3
Event mode
The counter will start to
count when a rising
edge of trigger input
comes.
TRGS[3:0] =3’b111
ETIFP is selected.
ETP = 0, the polarity of
ETI does not change.
ETPSC = 1, ETI is
divided by 2.
ETFC = 0, ETI does
not filter.
Figure 18-37. Event mode
TIMER_CK
CNT_REG
94
95
96
97
ETI
TRGIF
ETIFP
(1)
The ETI pin can select from TIMER_ETIx(x=0..2) pins, and each advanced TIMER only can use
one of them. Plese refer to
TIMER input source select register (SYSCFG_TIMERINSEL)
for more
details.
Single pulse mode
Single pulse mode is opposite to the repetitive mode, which can be enabled by setting SPM
in TIMERx_CTL0. When you set SPM, the counter will be clear and stop when the next update
event. In order to get pulse waveform, you can set the TIMERx to PWM mode or compare by
CHxCOMCTL.
Once the timer is set to the single pulse mode, it is not necessary to configure the timer enable
bit CEN in the TIMERx_CTL0 register to 1 to enable the counter. Setting the CEN bit to 1 or
a trigger signal edge can generate a pulse and then keep the CEN bit at a high state until the