I looked at a few of my devices - most look like this:
When I do have issues with charging, I have a couple lines in my code that will reset the power configuration if the charge falls below 65% and if the batter is in state 1 or “Not Charging”.
Perhaps give this a try:
if (sysStatus.stateOfCharge < 65 && sysStatus.batteryState == 1) {
System.setPowerConfiguration(SystemPowerConfiguration()); // Reset the PMIC
}
So does that reset the PMIC and override your PMIC configuration? Do you just call it on a reset? I worry that I may end up resetting the PMIC a lot as my devices seem to be in discharge mode a lot.
I do set the power management configuration on reset as I have two settings ( Solar Powered or Utility Powered). The correct setting is stored in FRAM and restored on reset.
However, the code I sent is checked each hour. Here is the rationale behind this approach:
If a device is properly situated, it should stay more than 65% charged
AND if the state of charge is less than 65% and the battery is “not charging” - something is wrong.
Please note that “not charging” is different than “discharging”. When a device is “not charging” it means that the device does need to charge but is not doing so for some reason. I figured that, in this state, resetting the PMIC makes sense. I don’t think it happens that often but, now that you mention it, I think I will add an alert code to this statement so I can gather metrics from across my devices.
So, to directly answer your concern, if the battery charge level was below 65% and it was in a “not charging” state, my code would reset the PMIC once an hour. Thanks to your comment, I will see how often this occurs.