So recently I managed to turn off charging on my Boron 2G/3G device which works well. However, when running the Boron I notice the charging LED blinking slowly which indicates a charge fault. The LED does not start blinking immediately, only after a few mins of operation (~20mins+). This does not seem to affect the operation of the device whatsoever so I am just curious and have some questions:
With charging disabled and nothing connected to the LiPo port, how is a charge fault triggered? Re-enabling charging seems to stop the LED from blinking.
Anyway to nicely turn off this LED? I guess I could clear the fault and stop the LED from blinking?
I have not printed out the fault registers value and since it doesn’t seem to affect operation, its on my TODO backlog. Are the following values for the electron applicable/accurate for the Boron?
The problem is most likely the charge safety timer. It must be disabled as well as disabling charging, otherwise the charge fault light will come on at some point in the future.
This post is for the Electron and E series, but the Boron uses the same PMIC and I think it should work the same on the Boron 2G/3G.
I tried this on my Boron unit and ran into some issues. Fire I assume Wire3 is replaced with Wire? It seems that “Wire3” isnt defined for Boron. After added the Write.write() it seems my Boron gets stuck on breathing white. I guess it gets stuck somewhere and doesn’t reach Particle.connect(). Removing the Wire.write() reverts the issue.
SYSTEM_MODE(SEMI_AUTOMATIC);
void setup() {
// Disable charging
#if defined(PLATFORM_BORON) || defined(PLATFORM_ELECTRON_PRODUCTION)
PMIC pmic;
pmic.begin();
pmic.disableCharging();
// 0b11001110 = disable watchdog
// 0b11000110 = disable watchdog and charge safety timer
byte DATA = pmic.readChargeTermRegister();
DATA &= 0b11000110;
// This would be easier if pmic.writeRegister wasn't private (or disable
// charge safety timer had an exposed method
Wire.beginTransmission(PMIC_ADDRESS);
Wire.write(CHARGE_TIMER_CONTROL_REGISTER);
Wire.write(DATA);
Wire.endTransmission(true);
#endif
// Set up cellular connection
#if (PLATFORM_ID == PLATFORM_BORON)
Cellular.setActiveSim(EXTERNAL_SIM);
Cellular.setCredentials(gCellularAPN);
Particle.keepAlive(gKeepAlive); // This is needed if we are using Roger's network
Particle.connect(); // Make sure connect is alway last since we want to register all cloud components first
#elif (PLATFORM_ID == PLATFORM_ELECTRON_PRODUCTION)
cellular_credentials_set(gCellularAPN, "", "", NULL);
Particle.keepAlive(gKeepAlive);
Particle.connect();
#endif
}