EasyManuals Logo
Home>ST>Microcontrollers>STM32L0x3

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 #306 background imageLoading...
Page #306 background image
Analog-to-digital converter (ADC) RM0367
306/1043 RM0367 Rev 7
regulator is in low-power mode (with the device operating in LPRun, LPSleep or Stop
mode), the voltage reference is disabled and the ADC cannot be used anymore.
The software must follow the procedure described below to manage the ADC in low-power
mode:
1. Make sure that the ADC is disabled (ADEN = 0).
2. Write ADVREGEN = 0.
3. Enter low-power mode.
4. Resume from low-power mode.
5. Check that REGLPF = 0.
6. Enable the ADC voltage regulator by using the sequence described in Section :
ADVREG enable sequence (ADVREGEN = 1 in ADC_CR).
7. Write ADC_CR ADEN = 1 and wait until ADC_CR ADRDY = 1.
8. Write ADRDY = 1 to clear it.
ADVREG enable sequence
There are three ways to enable the voltage regulator:
by writing ADVREGEN = 1.
by launching the calibration by writing by ADCAL = 1 (the ADVREGEN bit is
automatically set to 1).
by enabling the ADC by writing ADEN = 1.
ADVREG disable sequence
To disable the ADC voltage regulator, perform the sequence below:
1. Ensure that the ADC is disabled (ADEN = 0).
2. Write ADVREGEN = 0.
14.3.3 Calibration (ADCAL)
The ADC has a calibration feature. During the procedure, the ADC calculates a calibration
factor which is internally applied to the ADC until the next ADC power-off. The application
must not use the ADC during calibration and must wait until it is complete.
Calibration should be performed before starting A/D conversion. It removes the offset error
which may vary from chip to chip due to process variation.
The calibration is 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. After
this, the calibration factor can be read from the ADC_DR register (from bits 6 to 0).
The internal analog calibration is kept if the ADC is disabled (ADEN = 0) or if the ADC
voltage reference is disabled (ADVREGEN = 0). When the ADC operating conditions
change (V
DDA
changes are the main contributor to ADC offset variations and temperature
change to a lesser extend), it is recommended to re-run a calibration cycle.
The calibration factor is lost in the following cases:
The product is in Standby mode (power supply removed from the ADC)
The ADC peripheral is reset.

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