
GD32L23x User Manual
378
18.3.
Block diagram
Figure 18-1. LPTIMER block diagram
provides details of the internal configuration of the
low power timer.
Figure 18-1. LPTIMER block diagram
LPTIMER_IN0
Filter
Filter
CK_LPTIMER
Clock
select
...
ETI0
ETI1
ETI6
ETI7
External
trigger
select
PSC
software
trigger
ST/ETx
trigger
mux
Counter
PCLK1
APB1
register
APB1
interface
LPTIMER core
LPTIMER_INTEN
LPTIMER_INTF
LPTIMER_INTC
Interrupt control
Interrupt/ Wake-up
event
LPTIMER_O
LPTIMER_CTL0
LPTIMER_CTL1
Core logic Control
RCU
PCLK2
IRC16M
IRC32K
LXTAL
LPTIMER_CK
PSC_CLK
Polarity
selection
Polarity
selection
Polarity
selection
LPTIMER_WAKEUP
CAR
CMPV
LPTIMER_IN1
Filter
Polarity
selection
DECODER
IN1F
IN0F
IN1FP
IN0FP
High level
counter
18.4.
Function overview
18.4.1.
Clock selection
The LPTIMER can be clocked by several clock sources. It can be clocked using an internal
clock signal which can be chosen among internal 16 MHz RC oscillator (IRC16M), internal 32
KHz RC oscillator (IRC32K), 32.768 KHz Low Speed crystal oscillator (LXTAL), APB2 clock
(PCLK2) sources through the Reset and clock unit (RCU).
LPTIMER can also use an external clock signal on its external input 0 (LPTIMER_IN0) for
clock control. When using an external clock source as the clock source, LPTIMER has the
following two possible configurations:
Case 0:
When LPTIMER is clocked by an external signal, meanwhile APB1 or any other
oscillator (including IRC16M, IRC32K and LXTAL) provides an internal clock signal to
LPTIMER.
Case 1:
LPTIMER is only clocked by an external clock source on LPTIMER_IN0. When
all oscillators are turned off after entering low power mode, this configuration is a
configuration used to implement the timeout function or pulse counter function.