Description
Hi All,
Lately I work with Arduino MKR WAN 1310 board.
I power it up from USB and do not use a battery charger.
After a boot up a charge LED (the orange one) is off and it stays off only for an hour and it starts blinking ;)
I read many other peoples' posts that they encounter the same problem and no one know what causes it.
I dug a little bit and I found that in the BQ24195's documentation:
The safety timer is 1 hour when the battery is below BATLOWV threshold. The user can program fast charge safety timer through I2C (REG05[2:1]). When safety timer expires, the fault register REG09[5:4] goes 11 and an INT is asserted to the host. The safety timer feature can be disabled via I2C (REG05[3]).
The following actions restart the safety timer:
- At the beginning of a new charging cycle
- Toggle the CE pin HIGH to LOW to HIGH (charge enable)
- Write REG01[5:4] from 00 to 01 (charge enable)
- Write REG05[3] from 0 to 1 (safety timer enable)
I assume when there is no battery connected the battery voltage indeed is below BATLOWV and after an hour the charge LED starts blinking (1Hz).
Currently I disabled it locally by zeroing third (3) bit in CHARGE_TIMER_CONTROL_REGISTER
in disableWatchdog
function:
bool PMICClass::disableWatchdog(void) {
int DATA = readRegister(CHARGE_TIMER_CONTROL_REGISTER);
if (DATA == -1) { return 0; }
return writeRegister(CHARGE_TIMER_CONTROL_REGISTER, (DATA & 0b11000110));
}
I changed 0b11001110
into 0b11000110
and right now I can wait as long as I want, and no LED is blinking at me ;)
Would you be so kind to include such an option in the library itself? :)
Best regards