PMIC_DETECTION on Boron

@StngBo ,

I looked at a few of my devices - most look like this:

Screen Shot 2021-11-05 at 4.39.05 PM

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
  }

Thanks,

Chip

@chipmc , that fixed my test Boron’s err:-210 in the Console

I called it in the Startup Macro prior to making the PowerConfig changes.
Thanks !

Refreshing the Vitals after a few minutes of runtime still show inaccurate values though.

This particular Li-Po is operating at 4.14V, and it’s accepting/storing 120 mA of current at the moment @ 73% SOC.
Vitals say “Charged”
image

I must admit that I rarely pay any attention to the Device Vitals in the Console.

Oh that would make me a happy man to see that :grinning:.

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.

@StngBo ,

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.

Does this make sense?

Thanks,

Chip

2 Likes

Makes a lot of sense, thanks :grinning:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.