EasyManuals Logo

ST STM32L0x3 User Manual

ST STM32L0x3
1043 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #307 background imageLoading...
Page #307 background image
RM0367 Rev 7 307/1043
RM0367 Analog-to-digital converter (ADC)
352
The calibration factor is maintained in the following low-power modes: LPRun, LPSleep and
Stop.
It is still possible to save and restore the calibration factor by software to save time when
re-starting the ADC (as long as temperature and voltage are stable during the ADC power
down).
The calibration factor can be written if the ADC is enabled but not converting (ADEN = 1 and
ADSTART = 0). Then, at the next start of conversion, the calibration factor is automatically
injected into the analog ADC. This loading is transparent and does not add any cycle
latency to the start of the conversion.
Software calibration procedure
1. Ensure that ADEN = 0 and DMAEN = 0.
2. Set ADCAL = 1.
3. Wait until ADCAL = 0 (or until EOCAL = 1). This can be handled by interrupt if the
interrupt is enabled by setting the EOCALIE bit in the ADC_IER register. The ADCAL
bit can remain set for some time even after EOCAL has been set. As a result, the
software must wait for ADCAL = 0 after EOCAL = 1 to be able to set ADEN = 1 for next
ADC conversions.
4. The calibration factor can be read from bits 6:0 of ADC_DR or ADC_CALFACT
registers.
For code example, refer to A.8.1: Calibration code example.
Figure 32. ADC calibration
If the ADC voltage regulator was not previously set, it is automatically enabled when setting
ADCAL = 1 (bit ADVREGEN is automatically set by hardware). In this case, the ADC
calibration time is longer to take into account the stabilization time of the ADC voltage
regulator.
At the end of the calibration, the ADC voltage regulator remains enabled.
t
CAB
ADCAL
ADC State
ADC_DR[6:0]
0x00
MS33703V1
CALIBRATE
OFF
Startup
OFF
by S/W by H/W
CALIBRATION
FACTOR
ADC_CALFACT[6:0]

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

ST STM32L0x3 Specifications

General IconGeneral
BrandST
ModelSTM32L0x3
CategoryMicrocontrollers
LanguageEnglish

Related product manuals