
GD32L23x User Manual
608
mechanism is used to exit from power saving modes.
Table 26-1 CMP inputs and outputs summary
CMP0
CMP1
CMP non inverting
inputs connected
to I/Os
PA1
PA3 / PB4 / PB5
/ PB6 / PB7
CMP inverting
inputs connected
to I/Os
PA0
PA2 / PB3
CMP inverting
inputs connected
to internal signals
V
REFINT
/4,
V
REFINT
/2,
V
REFINT
*3/4,
V
REFINT,
DAC_OUT
V
REFINT
/4,
V
REFINT
/2,
V
REFINT
*3/4,
V
REFINT,
DAC_OUT
CMP outputs
connected to I/Os
PA0 / PA6 / PB0
/ PB10 / PA11 / PB8
PA2 / PA7 / PB11
/ PA12 / PB15 / PB9
CMP outputs
connected to
internal signals
TIMER1_CH3,
TIMER2_CH0,
LPTIMER_CH0
TIMER1_CH3,
TIMER2_CH0,
LPTIMER_CH1
26.3.3.
CMP power and speed mode
For a given application, there is a trade-off between the CMP power consumption versus
propagation delay, which is adjusted by configuring bits PM [1:0] in CMPx_CS register. The
CMP works fastest with highest power consumption when PM
= 2’b00, while works slowest
with lowest power consumption when P
M = 2’b11.
26.3.4.
CMP windows mode
If the WEN bit in CMP1_CS register is set, comparator windows mode is enabled,
Input plus
of comparator 1 is connected with input plus of comparator 0. If the minus input of CMP0 and
CMP1 is connected to different voltage, the voltage range from lower threshold to upper
threshold, is monitored by analyzing the comparator 0 and comparator 1 output.
26.3.5.
CMP hysteresis
In order to avoid spurious output transitions that caused by the noise signal, a programmable
hysteresis is designed to force the hysteresis value using external components. This function
can be shut down when user don't need it.