
M0A21/M0A23 Series
May 06, 2022
Page
684
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
6.19.3 Block Diagram
Analog Control
Logic
Successive
Approximations
Register
+
-
Digital Control Logic
&
ADC Clock
Generator
A
/D
C
o
n
tr
o
l
R
e
g
is
te
r
(A
D
C
R
)
A
/D
C
h
a
n
n
e
l
E
n
a
b
le
R
e
g
is
te
r
(A
D
C
H
E
R
)
…
ADC0_CH0
ADC0_CH1
2
1
t
o
1
A
n
a
lo
g
M
U
X
Sample and Hold
Comparator
A/D conversion
result
ADC_INT
STADC
Analog Macro
A
D
C
c
lo
c
k
a
n
d
A
D
C
s
ta
rt
s
ig
n
a
l
A
D
C
c
h
a
n
n
e
l
s
e
le
c
t
VALID & OVERRUN
ADF
V
BG
A
D
C
c
o
n
v
e
rs
io
n
f
in
is
h
V
TEMP
A
/D
T
ri
g
g
e
r
D
e
la
y
C
o
n
tr
o
l
R
e
g
is
te
r
(A
D
T
D
C
R
)
PWM_TRG
A
/D
C
o
m
p
a
re
R
e
g
is
te
r
(A
D
C
M
P
R
)
A
/D
S
ta
tu
s
R
e
g
is
te
r0
(A
D
S
R
0
)
A
/D
D
a
ta
R
e
g
is
te
r
0
(A
D
D
R
0
)
A
/D
D
a
ta
R
e
g
is
te
r
1
(A
D
D
R
1
)
A
/D
D
a
ta
R
e
g
is
te
r2
6
/
2
7
(
A
D
D
R
2
6
/2
7
)
:
.
V
REF
12-bit DAC
A
D
C
P
D
M
A
C
u
rr
e
n
t
T
ra
n
s
fe
r
D
a
ta
R
e
g
is
te
r
(A
D
P
D
M
A
)
A
/D
S
ta
tu
s
R
e
g
is
te
r1
(A
D
S
R
1
)
A
/D
S
ta
tu
s
R
e
g
is
te
r2
(A
D
S
R
2
)
TIMER_TRG
ADC0_CH16
A
P
B
B
u
s
A
/D
D
a
ta
R
e
g
is
te
r2
9
/
3
0
(
A
D
D
R
2
9
/3
0
)
PDMA request
…
SYS_VREFCTL[3:0]
INT_VREF
AIN0
AIN1
AIN16
VTEMPEN
(SYS_IVSCTL[0])
DAC0_OUT
INT_VREF
Figure 6.19-1 AD Controller Block Diagram
6.19.4 Basic Configuration
The ADC pin functions are configured in SYS_GPA_MFP0, SYS_GPA_MFP1, SYS_GPB_MFP1,
SYS_GPC_MFP0, SYS_GPC_MFP1 registers. It is recommended to disable the digital input path of the
analog input pins to avoid the leakage current. User can disable the digital input path by configuring
PA_DINOFF, PB_DINOFF, PC_DINOFF registers.
The ADC peripheral clock can be enabled in ADCCKEN(APBCLK0[28]). The ADC peripheral clock
source is selected by ADCSEL(CLKSEL2[21:20]). The clock prescalar is determined by
ADCDIV(CLKDIV0[23:16]).
6.19.5 Functional Description
The A/D converter operates by successive approximation with 12-bit resolution. The ADC has four
operation modes: Single, Burst, Single-cycle Scan mode and Continuous Scan mode. When user wants
to change the operation mode or analog input channel, in order to prevent incorrect operation, software
must clear ADST(ADC_ADCR[11]) bit to 0 in advance.