2020-12-14 07:11 AM
Hi,
I want to use the VEREFINT to get the voltage of my battery.
According to the formula provided by the datasheet (screenshot attached), I need the VREFINT calibration value and the VREFINT_DATA.
What is the register to read the calibration value from? I didn't find this in the datasheet.
The same for the VREFINT_DATA. For the VREFINT_DATA I think it's stored in the specific data address VREFINT_Factory_CONV byte but I do not find in the datasheet what this address is.
Solved! Go to Solution.
2020-12-14 10:25 AM
Please don't be confused by datasheets and reference manuals, you are currently referring to the RM0038, section 12.12 (pg. 287 in rev 16).
According the datasheet of the STM32L100RBT6-A, section 6.3.3, VREFINT_CAL can be obtained from 0x1FF80078...0x1FF80079.
A supply-relative ADC measurement always requires two measurements:
RM0038 says that VREFINT_DATA is the actual VREFINT output value converted by the ADC. In this case this is the second measurement mentioned above.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
/Peter
2020-12-14 10:25 AM
Please don't be confused by datasheets and reference manuals, you are currently referring to the RM0038, section 12.12 (pg. 287 in rev 16).
According the datasheet of the STM32L100RBT6-A, section 6.3.3, VREFINT_CAL can be obtained from 0x1FF80078...0x1FF80079.
A supply-relative ADC measurement always requires two measurements:
RM0038 says that VREFINT_DATA is the actual VREFINT output value converted by the ADC. In this case this is the second measurement mentioned above.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
/Peter