PMIC (Power Management IC)

Charge timer control reg

This is register REG05. It controls charge termination, the I2C watchdog timer, and the fast-charge safety timer.

readChargeTermRegister()

byte readChargeTermRegister();

Returns the raw value of REG05.

disableWatchdog()

bool disableWatchdog(void);

Disables the I2C watchdog timer (WATCHDOG = 00, REG05 bits 5:4). While the watchdog is enabled (the default, 40 seconds), if the host does not write to the PMIC via I2C within the timeout period, the PMIC resets all of its registers to their power-on defaults, undoing any settings you configured directly through the PMIC class. Since the Power Manager already resets and reconfigures the watchdog whenever it applies SystemPowerConfiguration, this normally is not an issue unless you have disabled the Power Manager (SystemPowerFeature::DISABLE) or you need to hold specific PMIC settings (such as in shipping mode) without the watchdog reverting them.

setWatchdog()

bool setWatchdog(byte time);

Sets the I2C watchdog timeout (WATCHDOG, REG05 bits 5:4). Valid values are 0 (disable), 1 (40 seconds, the default), 2 (80 seconds), or 3 (160 seconds). See disableWatchdog(), above, for why this matters. Use resetWatchdog() to feed the timer without changing the timeout.

enableSafetyTimer()

bool enableSafetyTimer();

Enables the fast-charge safety timer (EN_TIMER, REG05 bit 3). This is the default. The safety timer stops charging if a full charge cycle takes longer than expected (see getFault()), which protects against a battery or thermistor fault causing an indefinitely long charge cycle. The timer duration is set with CHG_TIMER (default 8 hours) and is not currently exposed as a separate method; see the register map in the bq24195 datasheet for details.

disableSafetyTimer()

bool disableSafetyTimer();

Disables the fast-charge safety timer.