
GD32L23x User Manual
383
18.4.7.
External trigger mapping
The LPTIMER external trigger connections are detailed hereafter:
Table 18-2. External trigger mapping
ETSEL[2:0]
External trigger
ETI0
GPIO
ETI1
RTC alarm 0
ETI2
RTC alarm 1
ETI3
RTC_TAMP0 input detection
ETI4
RTC_TAMP1 input detection
ETI5
RTC_TAMP2 input detection
ETI6
CMP0
ETI7
CMP1
18.4.8.
Operating mode
The LPTIMER works in two operating modes:
Continuous counting mode: the LPTIMER is running continuously, the timer is started
from a trigger event (software trigger or external trigger) and never stops until the timer
is disabled.
Single counting mode: the LPTIMER is started from a trigger event (software trigger or
external trigger) and stops when reaching the value of CARL[31:0] bits in LPTIMER_CAR
register.
Single counting mode
The SMST bit is set to 1 to enable the the single counting mode. In this mode, a new trigger
event will restart the LPTIMER. Any trigger event that occurs after the counter is started and
before the counter reaches the value of CARL[31:0] bits will be ignored.
If an external trigger is selected to start LPTIMER counter, each external trigger event that
arrives after the SMST bit is set, and after the counter register has stopped (the value of the
CNT[31:0] bits is zero), will start the counter for a new single counting cycle as shown in