2020-05-04 06:05 AM
Hello,
I'm trying to work with the ADC of the STM32L433 microcontroller. The Reference manual (RM0394) on page 448 it says :
The following formula gives the actual VDDA voltage supplying the device:
VDDA = 3.0 V x VREFINT_CAL / VREFINT_DATA
Where can I found the VREFINT_CAL value, I'm not able to find the address on the RM ?
Thank you
Riccardo
Solved! Go to Solution.
2020-05-04 06:34 AM
It's in the datasheet. Note that it's called VREFINT here instead of VREFINT_CAL.
2020-05-04 06:34 AM
It's in the datasheet. Note that it's called VREFINT here instead of VREFINT_CAL.
2024-02-29 10:50 AM
I was confused by naming mismatch too :thinking_face:. For people from future, there are actually a built in macros for that which do have matching names. So the code can stay correct when you change mcu variant. in *adc.h
/* ADC internal channels related definitions */
/* Internal voltage reference VrefInt */
#define VREFINT_CAL_ADDR ((uint16_t*) (0x1FFF75AAUL)) /* Internal voltage reference, address of
parameter VREFINT_CAL: VrefInt ADC raw data acquired at temperature 30 DegC
(tolerance: +-5 DegC), Vref+ = 3.0 V (tolerance: +-10 mV). */
#define VREFINT_CAL_VREF ( 3000UL) /* Analog voltage reference (Vref+) value
with which VrefInt has been calibrated in production
(tolerance: +-10 mV) (unit: mV). */