![Nuvoton NuMicro NUC029 Series Скачать руководство пользователя страница 474](http://html1.mh-extra.com/html/nuvoton/numicro-nuc029-series/numicro-nuc029-series_technical-reference-manual_1720306474.webp)
NuMicro® NUC029LEE/NUC029SEE
32-bit Arm
®
Cortex
®
-M0 Microcontroller
Aug, 2018
Page
474
of
497
Rev 1.00
N
U
MICRO
®
N
UC02
9L
E
E
/N
UC029
S
E
E
T
E
CHN
ICA
L R
E
F
E
R
E
NC
E
M
A
NU
A
L
6.17.5 Functional Description
The A/D converter operates by successive approximation with 12-bit resolution. The ADC has
three operation modes: Single mode, Single-cycle Scan mode and Continuous Scan mode. When
changing the operating mode or analog input channel, to prevent incorrect operation, software
must clear ADST bit (ADCR[11]) to 0.
6.17.5.1 ADC Clock Generator
The maximum sampling rate is up to 1 MSPS. The ADC engine has four clock sources selected
by 2-bit ADC_S (CLKSEL1[3:2]), the ADC clock frequency is divided by an 8-bit prescaler with the
formula:
The ADC clock frequency = (ADC clock source frequency) / (ADC_N (CLKDIV[23:16])+1);
11
10
01
00
PLL FOUT
4~24 MHz
22.1184 MHz
ADC_S (CLKSEL1[3:2])
ADC_EN(APBCLK[28])
ADC_CLK
1/(ADC_N + 1)
ADC_N(CLKDIV[23:16])
HCLK
Note: Before clock switching, both the pre-selected and newly
selected clock sources must be turned on and stable.
Figure 6.17-2 ADC Clock Control
6.17.5.2 Single Mode
In single mode, A/D conversion is performed only once on the specified single channel. The
operations are as follows:
1.
A/D conversion will be started when the ADST bit (ADCR[11]) is set to 1 by software.
2.
When A/D conversion is finished, the result is stored in the A/D data register
corresponding to the channel.
3.
The ADF bit (ADSR[0]) will be set to 1. If the ADIE bit (ADCR[1]) is set to 1, the ADC
interrupt will be asserted.
4.
The ADST bit remains 1 during A/D conversion. When A/D conversion ends, the ADST
bit is automatically cleared to 0 and the A/D converter enters idle state.
Note:
If software enables more than one channel in single mode, the channel with the smallest number will
be selected and the other enabled channels will be ignored.