I am testing out the battery charge chip BQ24195 via the BSoM eval board v1.1. I am trying to use the built in functionality to disconnect the battery via the pmic disableBATFET() command. I am seeing mixed results where if I call the command and then disconnect my main power source, then the board de powers, whereas if I am operating on battery power alone and call the command, nothing happens. Additionally, sometimes when I apply power back to the board, it does not turn on for a few min, until I flip the switches a few times.
Why might this be happening?
The disableBATFET function is used on the Tracker One for shipping mode, which allows the device to be turned off for months without completely draining the battery. It also has a bq24195 PMIC.
We recommend disconnecting USB or power and executing the command by cellular if possible, because the act of disconnecting the power may not be completely clean and the power could be turned back on again. However, this is probably not the issue you are seeing.
Do you have anything connected to any of the GPIO pins? If there is any current that can flow into a GPIO when power (3V3) is turned off, the nRF52840 MCU can enter a state where it cannot be awakened again without completely removing all power. See TAN002 for details.
Also, if you have sufficient power flowing into a GPIO, the nRF52 can continue to run even after you’ve removed power on 3V3 by disabling the BATFET.
Neither of these perfectly fit the situation you are seeing, but might be worth investigating similar situations to be sure.
I made 2 mistakes, 1 is I had a waitFor to get serial to connect, but I disconnected usb, so my code would not execute in some cases, 2nd, I was using pmic on stack and forgot to instantiate with a true argument for locking. Once I resolved these, it fixed my issues.