
M0A21/M0A23 Series
May 06, 2022
Page
722
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
ACMP1_WLAT
INT_VREF
0
1
Filter
Block
0
1
0
1
0
1
001
010
011
V
DD
CRV output
Window
Latch
Window
Latch
0
1
0
1
WLATOUT0
Brake source of PWM
/ Timer trigger source
WLATOUT1
Brake source of PWM
/ Timer trigger source
ACMP0_WLAT
CRVCTL
(ACMP_VREF[3:0])
CRVSSEL
(ACMP_VREF[6])
POSSEL
(ACMP_CTL0[10:8])
ACMPEN
(ACMP_CTL0[0])
HYSSEL
(ACMP_CTL0[25:24])
NEGSEL
(ACMP_CTL0[6:4])
ACMPEN
(ACMP_CTL1[0])
ACMPOINV
(ACMP_CTL0[3])
ACMPO0
(ACMP_STATUS[4])
WCMPSEL
(ACMP_CTL0[18])
ACMPWO
(ACMP_STATUS[16])
WCMPSEL
(ACMP_CTL1[18])
WLATEN
(ACMP_CTL0[17])
WLATEN
(ACMP_CTL1[17])
HYSSEL
(ACMP_CTL1[25:24])
NEGSEL
(ACMP_CTL1[6:4])
ACMPO1
(ACMP_STATUS[5])
ACMPOINV
(ACMP_CTL1[3])
ACMPS0
(ACMP_STATUS[12])
FILTSEL
(ACMP_CTL1[15:13])
FILTSEL
(ACMP_CTL0[15:13])
OUTSEL
(ACMP_CTL1[12])
OUTSEL
(ACMP_CTL0[12])
ACMP0_P0
ACMP0_O
ACMP1_O
ACMP01_INT
0
1
.
+
-
ACMP1
+
-
ACMP0
ACMPS1
(ACMP_STATUS[13])
Filter
Block
DAC0_OUT
001
010
011
100
101
ACMP0_N1
ACMP0_N0
ACMP0_N2
ACMP0_N3
001
010
011
DAC0_OUT
001
010
011
100
101
ACMP1_P0
ACMP1_N0
ACMP1_N1
ACMP1_N2
ACMP1_N3
CRV
function
CRVEN
(ACMP_VREF[8])
INTPOL
(ACMP_CTL0[21:20])
INTPOL
(ACMP_CTL1[21:20])
AV
DD
Figure 6.21-1 Analog Comparator Block Diagram
6.21.4 Basic Configuration
6.21.4.1 ACMP0 Basic Configuration
Clock source Configuration
–
Enable ACMP0 peripheral clock in ACMP01CKEN (CLK_APBCLK0[7]).
Reset Configuration
–
Reset ACMP0 controller in ACMP01RST (SYS_IPRST1[7]).
Pin configuration
Group
Pin Name
GPIO
MFP
ACMP0
ACMP0_P0
PA.0
MFP1
ACMP0_O
GPIO pins, Except PA.3, PD.0~PD.7
MFP21
ACMP0_N0
PA.1
MFP1
ACMP0_N1
PC.1
MFP1
ACMP0_N2
PC.2
MFP1
ACMP0_N3
PC.3
MFP1
ACMP0_WLAT
PA.5, PB.7
MFP30
6.21.4.2 ACMP1 Basic Configuration
Clock Source Configuration
–
Enable ACMP1 peripheral clock in ACMP01CKEN (CLK_APBCLK0[7]).
Reset Configuration
–
Reset ACMP1 controller in ACMP01RST (SYS_IPRST1[7]).
Pin Configuration