
GD32L23x User Manual
607
Figure 26-1. CMP block diagram of GD32L23x series
CMP0
CMP0_IM
CMP0_IP
DAC_OUT
V
REFINT
/4
V
REFINT
*3/4
V
REFINT
/2
V
REFINT
CMP0_IP:PA1
MSEL
PL
GPIO
to EXTI
to TIMER&
LPTIMER
CMP1
CMP1_IM
CMP1_IP
DAC_OUT
V
REFINT
/4
V
REFINT
*3/4
V
REFINT
/2
V
REFINT
PSEL
MSEL
PL
GPIO
to EXTI
to TIMER &
LPTMIER
WINDOW_MODE
CMP0_OUT
CMP1_OUT
CMP0_IM4:PA0
CMP1_IP0:PA3
CMP1_IP1:PB4
CMP1_IP2:PB5
CMP1_IP4:PB7
CMP1_IP3:PB6
CMP1_IM4:PA2
CMP1_IM6:PB3
Note
: V
REFINT
is 1.2V.
26.3.1.
CMP clock and reset
The CMP clock provided by the clock controller is synchronous with the APB2 clock.
26.3.2.
CMP inputs and outputs
These IOs must be configured in analog mode in the GPIOs registers before they are selected
as CMPs inputs.
Considering pin definitions in Datasheet, the CMP output must be connected to corresponding
alternate IOs.
A variety of timer inputs can be internally connected to the CMP output to realize the following
functions:
Input capture for timing measures
Emergency shut-down of PWM signals, using break function
Cycle-by-cycle current control, using OCPRE_CLR inputs
In order to work even in Deep-sleep mode, the polarity selection logic and the output
redirection to the port work independently from APB2.
The CMP output can be redirected internally and externally simultaneously.
The CMP outputs are internally connected to the extended interrupts and events controller.
Each CMP has its own EXTI line and can generate either interrupts or events. The same