![]() |
nrfxlib API 3.3.99
|
| int nrf_fuel_gauge_soh_get | ( | float * | soh | ) |
#include <nrf_fuel_gauge/include/nrf_fuel_gauge.h>
Get predicted battery state-of-health (SOH) as a percentage of modeled battery capacity.
State-of-health is calculated when a sufficient number of charge cycles has been observed. It is important to use the nrf_fuel_gauge_ext_state_update function to inform the library of the charger behavior for state-of-health to get calculated.
This predicition will get more accurate over time.
To preserve the state-of-health related data, store the fuel gauge state using nrf_fuel_gauge_state_get and resume from the stored state when re-initializing the library. The state can be stored before performing a reset or entry to a low-power state with no RAM retention, or when the battery is getting critically low. To reduce energy usage and wear on non-volatile storage, only store after the state-of-health estimate has changed or when the charge cycle count has increased.
| [out] | soh | Pointer to predicted state-of-health [%]. |
| 0 | when successful, otherwise negative error code. |