Figure 45. Adc Calibration; Figure 46. Calibration Factor Forcing - STMicroelectronics STM32WLEx Reference Manual

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Table of Contents

Advertisement

Analog-to-digital converter (ADC)
Software calibration procedure
1.
Ensure that ADEN = 0, AUTOFF = 0, ADVREGEN = 1 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
4.
The calibration factor can be read from bits 6:0 of ADC_DR or ADC_CALFACT
registers.
5.
To reduce the noise effect of the calibration factor extraction, the software can make
average of eight CALFACT[6:0] values (optional).
ADCAL
ADC State
ADC_DR[6:0]
ADC_CALFACT[6:0]
by S/W
Calibration factor forcing Software Procedure
1.
Ensure that ADEN = 1 and ADSTART = 0 (ADC started with no conversion ongoing)
2.
Write ADC_CALFACT with the saved calibration factor
3.
The calibration factor is used as soon as a new conversion is launched.
calibration factor[6:0]
Start conversion
(hardware or software)
WRITE ADC_CALFACT
CALFACT[6:0]
by S/W
16.3.4
ADC on-off control (ADEN, ADDIS, ADRDY)
At power-up, the ADC is disabled and put in power-down mode (ADEN = 0).
As shown in
converting accurately.
432/1306
OFF
Startup
by H/W

Figure 46. Calibration factor forcing

ADC state
Ready (not converting)
Internal
F1
by H/W
Figure
47, the ADC needs a stabilization time of t

Figure 45. ADC calibration

t CAB
CALIBRATE
0x00
Converting channel
Updating
(Single ended)
calibration
F2
F2
RM0461 Rev 5
OFF
CALIBRATION
FACTOR
Ready
Converting channel
(Single ended)
before it starts
STAB
RM0461
MS33703V1
MS31925V1

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents