Calibration (Adcal, Adcaldif, Adcx_Calfact) - STMicroelectronics RM0365 Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

RM0365
In differential input mode, the analog voltage to be converted for channel "i" is the difference
between the external voltage ADC_INi (positive input) and ADC_INi+1 (negative input).
For a complete description of how the input channels are connected for each ADC, refer to
Figure 53: ADC1 and ADC2 connectivity on page
Caution:
When configuring the channel "i" in differential input mode, its negative input voltage is
connected to ADC_INi+1. As a consequence, channel "i+1" is no longer usable in single-
ended mode or in differential mode and must never be configured to be converted.
Some channels are shared between ADC1 and ADC2: this can make the channel on the
other ADC unusable. Only exception is interleave mode for ADC master and the slave.
Example: Configuring ADC1_IN5 in differential input mode will make ADC12_IN6 not
usable: in that case, the channels 6 of both ADC1 and ADC2 must never be converted.
Note:
Channels 16, 17 and 18 of ADC1 and channels 17 and 18 of ADC2 are connected to
internal analog channels and are internally fixed to single-ended inputs configuration
(corresponding bits DIFSEL[i] is always zero). Channel 15 of ADC1 is also an internal
channel and the user must configure the corresponding bit DIFSEL[15] to zero.
15.3.8

Calibration (ADCAL, ADCALDIF, ADCx_CALFACT)

Each ADC provides an automatic calibration procedure which drives all the calibration
sequence including the power-on/off sequence of the ADC. During the procedure, the ADC
calculates a calibration factor which is 7-bit wide and which is applied internally to the ADC
until the next ADC power-off. During the calibration procedure, the application must not use
the ADC and must wait until calibration is complete.
Calibration is preliminary to any ADC operation. It removes the offset error which may vary
from chip to chip due to process or bandgap variation.
The calibration factor to be applied for single-ended input conversions is different from the
factor to be applied for differential input conversions:
Write ADCALDIF=0 before launching a calibration which will be applied for single-
ended input conversions.
Write ADCALDIF=1 before launching a calibration which will be applied for differential
input conversions.
The calibration is then initiated by software by setting bit ADCAL=1. Calibration can only be
initiated when the ADC is disabled (when ADEN=0). ADCAL bit stays at 1 during all the
calibration sequence. It is then cleared by hardware as soon the calibration completes. At
this time, the associated calibration factor is stored internally in the analog ADC and also in
the bits CALFACT_S[6:0] or CALFACT_D[6:0] of ADCx_CALFACT register (depending on
single-ended or differential input calibration)
The internal analog calibration is kept if the ADC is disabled (ADEN=0). However, if the ADC
is disabled for extended periods, then it is recommended that a new calibration cycle is run
before re-enabling the ADC.
The internal analog calibration is kept if the ADC is disabled (ADEN=0). When the ADC
operating conditions change (V
variations, V
calibration cycle.
The internal analog calibration is lost each time the power of the ADC is removed (example,
when the product enters in STANDBY or VBAT mode). In this case, to avoid spending time
recalibrating the ADC, it is possible to re-write the calibration factor into the
REF+
and temperature change to a lesser extent), it is recommended to re-run a
DDA
DocID025202 Rev 7
Analog-to-digital converters (ADC)
294.
changes are the main contributor to ADC offset
296/1080
392

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RM0365 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents