Skip to main content
HWickham
Associate II
Dec 16, 2021 3:06 PM UTC
Question

Calibrating the VBAT internal potential divider on an STM32WLE5

I am using the VBAT pin to measure the voltage of my battery, but the readings I am getting through this pin are always off by about 3%. The datasheet (https://www.st.com/resource/en/datasheet/stm32wle5cc.pdf#page=120) claims that there could be +-10% error on the ratio, this seems WAY too high to be at all useful so I was wondering if there was anyway to internal calibrate the resistors.

This topic has been closed for replies.

3 replies

TDK
Dec 16, 2021 4:05 PM UTC

You would need to apply a known external reference voltage to VBAT and measure what you're getting to calculate the slope and calibrate.

This would need to be done on a per-part basis.

"If you feel a post has answered your question, please click ""Accept as Solution""."
HWickham
HWickhamAuthor
Associate II
Dec 16, 2021 4:46 PM UTC

This was my fear, thank you!

waclawek.jan
Super User
Dec 16, 2021 4:47 PM UTC

> This would need to be done on a per-part basis.

I also wouldn't hold my breath relying on temperature stability of the divider.

JW