2021-12-28 09:46 AM
Using the STM32WL firmware V1.1, the end-client framework implements GetBatteryLevel() by reading VREFINT and determining what Vref+ is tied to. Assuming that Vdda is tied to Vdd, this measures the Vdd rail. Given motes likely use Lithium cells with LDO regulation, this isn't generally useful. I suggest an alternative in the FW package to configure an analog input used to sense actual battery voltage via a divider.