nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ nrf_fuel_gauge_idle_set()

void nrf_fuel_gauge_idle_set ( float  v,
float  T,
float  i_avg 
)

#include <nrf_fuel_gauge/include/nrf_fuel_gauge.h>

Put library into the idle state.

Informing the library of idle states helps improve predictions when there are periods of low activity and no new battery measurements. If this function is not called, discharge current in low power states may be over-estimated. For example, consider a system that enters a state where only the low frequency oscillator is running to generate a wakeup sometime later. To minimize the power usage during this period, no battery measurements are made. The idle current is likely to be too low to accurately measure dynamically, but it is known ahead of time. Using this function with the expected average current will help the library more accurately predict the power drain during the idle, low-power period. When activity is resumed, use nrf_fuel_gauge_process as normal.

Note
Make sure this function is called from the same context as nrf_fuel_gauge_process.
Parameters
vMeasured battery voltage in volts [V].
TMeasured battery temperature in centigrades [C].
i_avgExpected average current in idle state in amperes [A].