Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to disable Charging Safety Timer #11

Open
mb1986 opened this issue May 27, 2021 · 0 comments · May be fixed by #22 or #19
Open

No way to disable Charging Safety Timer #11

mb1986 opened this issue May 27, 2021 · 0 comments · May be fixed by #22 or #19
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@mb1986
Copy link

mb1986 commented May 27, 2021

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

Stefanhg added a commit to Stefanhg/Arduino_BQ24195 that referenced this issue Jun 5, 2022
commit from issue on Arduino's repo
arduino-libraries#11
@Stefanhg Stefanhg linked a pull request Jun 5, 2022 that will close this issue
Rocketct added a commit to Rocketct/Arduino_BQ24195 that referenced this issue Jun 10, 2022
Added Charging Safety Timer Management in order to fix arduino-libraries#11
@Rocketct Rocketct linked a pull request Jun 10, 2022 that will close this issue
Rocketct added a commit to Rocketct/Arduino_BQ24195 that referenced this issue Jun 10, 2022
Added Charging Safety Timer Management in order to fix arduino-libraries#11
Rocketct added a commit to Rocketct/Arduino_BQ24195 that referenced this issue Jun 10, 2022
Added Charging Safety Timer Management in order to fix arduino-libraries#11
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 23, 2022
@per1234 per1234 linked a pull request Jan 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
2 participants