![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 161](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794161.webp)
GD32E23x User Manual
161
10.4.
Function overview
Figure 10-1. ADC module block diagram
ADC_IN0
ADC_IN1
· ·
·
ADC_IN9
GPIO
C
h
a
n
ne
l
se
le
c
to
r
V
REFINT
V
DDA
V
SSA
6~12-bit
Trig select
E
X
T
I_
11
T
IM
E
R
0
_
CH
0
T
IM
E
R
0
_
CH
1
T
IM
E
R
0
_
CH
2
T
IM
E
R
2
_
T
R
G
O
T
IM
E
R
14
_
CH
0
Analog
watchdog
A
P
B
B
U
S
EOC
watchdog
event
Interrupt
generator
ADC
Interrupt
S
W
R
C
S
T
SAR ADC
CLB
self calibration
DRES[1:0]
12, 10, 8, 6 bits
OVSS[3:0]
OVSR[2:0]
OVSEN
TOVS
V
SENSE
DMA request
Over
sampler
routine sequence
Channel Management
routine data registers
(
16 bits
)
10.4.1.
Foreground calibration function
During the foreground calibration procedure, the ADC calculates a calibration factor which is
internally applied to the ADC until the next ADC power-off. The application can not use the
ADC until the calibration is completed. The calibration should be performed before starting
A/D conversion. The calibration is initiated by setting the CLB bit to 1. The CLB bit stays at 1
during the calibration sequence. It is then cleared by hardware as soon as the calibration is
completed.
When the ADC operating conditions change (such as supply power voltage V
DDA
,
temperature and so on), it is recommended to re-run a calibration cycle.
The internal analog calibration can be reset by setting the RSTCLB bit in ADC_CTL1
register.
Calibration procedure by software:
1.
Ensure ADCON=1.
2.
Delay 14 CK_ADC to wait for ADC stability.
3.
Set RSTCLB (optional).
4.
Set CLB=1.