
M0A21/M0A23 Series
May 06, 2022
Page
723
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
Group
Pin Name
GPIO
MFP
ACMP1
ACMP1_P0
PC.0
MFP1
ACMP1_O
GPIO pins, Except PA.3, PD.0~PD.7
MFP22
ACMP1_N0
PA.1
MFP1
ACMP1_N1
PC.1
MFP1
ACMP1_N2
PC.2
MFP1
ACMP1_N3
PC.3
MFP1
ACMP1_WLAT
PA.4, PB.6
MFP30
6.21.5 Functional Description
6.21.5.1 Hysteresis Function
The analog comparator provides the hysteresis function to make the comparator to have a stable output
transition (referring to Figure 6.21-2). If comparator output is 0, it will not be changed to 1 until the
positive input voltage exceeds the negative input voltage by a high threshold voltage. Similarly, if
comparator output is 1, it will not be changed to 0 until the positive input voltage drops below the negative
input voltage by a low threshold voltage.
High threshold voltage
Low threshold voltage
ACMP0_P
ACMP0_N
ACMP0_O
Figure 6.21-2 Comparator Hysteresis Function of ACMP0
6.21.5.2 Window Latch Mode
Figure 6.21-3 shows the comparator operation in window latch mode.
Window latch mode can be
enabled by setting WLATEN (ACMP_CTL0/1[17]) to 1. When window latch function enabled,
ACMP0/1_WLAT pin is used to control the output WLATOUT0/1 .When ACMP0/1_WLAT pin is high,
ACMPO0/1 passes through to WLATOUT0/1. When ACMP0/1_WLAT pin is low, WLATOUT0/1 will
keep last state of WLATOUT0/1.