
GD32L23x User Manual
311
automatically cleared to 0 by a hardware update event, the counter will be reinitialized.
In the single pulse mode, the active edge of trigger which sets the CEN bit to 1 will enable the
counter. However, there exists several clock delays to perform the comparison result between
the counter value and the TIMERx_CHxCV value. In order to reduce the delay to a minimum
value, the user can set the CHxCOMFEN bit in TIMERx_CHCTL0/1 register. After a trigger
rising occurs in the single pulse mode, the OxCPRE signal will immediately be forced to the
state which the OxCPRE signal will change to, as the compare match event occurs without
taking the comparison result into account. The CHxCOMFEN bit is available only when the
output channel is configured to the PWM mode 0 or PWM mode 1 and the trigger source is
derived from the trigger signal.
Figure 17-19. Single pulse mode TIMERx_CHxCV = 0x04, TIMERx_CAR=0x60
TIMER_CK(CNT_CLK)
CEN
CNT_REG
00
01
02
03
04
05
…
.
5F
60
00
O2CPRE
CI3
Under SPM, counter stop
Timers interconnection
The timers can be internally connected together for timer chaining or synchronization. This
can be implemented by configuring one timer to operate in the master mode while configuring
another timer to be in the slave mode. The following figures present several examples of
trigger selection for the master and slave modes.
Figure 17-20. TIMER1 Master/Slave mode timer example
s
hows the timer1 trigger
selection when it is configured in slave mode.