Analog-to-digital converter (ADC)
Calculating the actual V
V
voltage may be subject to variation or not precisely known. The embedded internal
REF+
reference voltage (V
manufacturing process at V
level.
The following formula gives the actual V
Where:
•
V
REF+_Charac
manufacturing process. It is specified in the device datasheet.
•
VREFINT_CAL is the VREFINT calibration value
•
VREFINT_DATA is the actual VREFINT output value converted by ADC
Converting a supply-relative ADC measurement to an absolute voltage value
The ADC is designed to deliver a digital value corresponding to the ratio between the analog
power supply and the voltage applied on the converted channel. For most application use
cases, it is necessary to convert this ratio into a voltage independent of V
applications where V
use the following formula to get this absolute value:
For applications where V
reference and V
the actual V
formula:
Where:
•
V
REF+_Charac
manufacturing process. It is specified in the device datasheet.
•
VREFINT_CAL is the VREFINT calibration value
•
ADC_DATA
•
VREFINT_DATA is the actual VREFINT output value converted by the ADC
•
full_SCALE is the maximum digital value of the ADC output. For example with 12-bit
resolution, it is 2
Note:
If ADC measurements are done using an output format other than 12 bit right-aligned, all the
parameters must first be converted to a compatible format before the calculation is done.
15.10
Battery voltage monitoring
The VBATEN bit in the ADC_CCR register allows the application to measure the backup
battery voltage on the VBAT pin. As the V
378/1390
REF+
) and its calibration data acquired by the ADC during the
REFINT
REF+_charac
V
=
V
REF+
REF
+
is the value of V
is known and ADC converted values are right-aligned you can
REF+
V
CHANNELx
value is not known, you must use the internal voltage
REF+
can be replaced by the expression provided in
REF+
voltage using the internal reference
REF+
V
V
=
-------------------------------------------------------------------------------------------------------------------------
CHANNELx
is the value of V
is the value measured by the ADC on channelx (right-aligned)
x
12
- 1 = 4095 or with 8-bit resolution, 2
RM0444 Rev 5
voltage using the internal reference voltage
can be used to evaluate the actual V
voltage supplying the device:
REF+
×
VREFINT_CAL VREFINT_DATA
_Charac
voltage characterized at V
REF+
V
REF+
------------------------------------ -
×
=
ADC_DATA
FULL_SCALE
voltage, resulting in the following
×
VREFINT_CAL
REF+_Charac
×
VREFINT_DATA FULL_SCALE
voltage characterized at V
REF+
voltage could be higher than V
BAT
REF+
⁄
during the
REFINT
. For
REF+
x
Section : Calculating
×
ADC_DATA
x
during the
REFINT
8
- 1 = 255.
REF+
RM0444
voltage
, to ensure
Need help?
Do you have a question about the STM32G0 1 Series and is the answer not in the manual?
Questions and answers