Ive been looking through documentation (and web sites), and testing some code on using the A/D on the STM32L0 processor. As the chip I am using uses the VDD as the reference voltage I am currently calculating the Vdd using the following:
VDD= 3V * VrefintCalValue / AdcValue . I got 3.48V.
I now have been looking the calibration command :
My question is after calling HAL_ADCEx_Calibration_Start(..); what do I do to get the VDD (above) value?
Do I use the HAL_ADCEx_Calibration_GetValue(..);, and the HAL_ADCEx_Calibration_SetValue(..);?
After I use the calibration commands how does this effect the value in VrefintCalValue to calculate VDD?
And how do I use the calibration value on the A/D value read from a channel?
Sorry for all the questions, but just trying to get my head around how to use the calibration result.