Cannot put B404X to sleep with PMIC disabled

I cannot put the B404X (or any BSOM) into STOP or ULTRA_LOW_POWER sleep when I have disabled the PMIC. HBIERNATE is okay! I am testing this option because I don't plan on using the PMIC features. When I try some simple sleep test code, the B404X will not go to sleep. The LED just keeps breathing aqua blue. Sleep is never achieved.

Testing on Device OS 4.1.0 on the M.2 BSOM Evaluation board.

How I have disabled the PMIC:

    SystemPowerConfiguration conf;
    int res = System.setPowerConfiguration(conf); // returns SYSTEM_ERROR_NONE (0) in case of success

And here is my full code that I am testing with:

//Particle BSOM Sleep Test
//Testing sleep modes HIBERNATE, STOP or ULTRA_LOW_POWER


#define BTN D7

bool skip_hibernate = true;
bool PMIC_enabled = false;

// setup() runs once, when the device is first turned on.
void setup() {


  Serial.println("Starting up");

  if (initializePowerCfg()) {
    Serial.println("Configured PMIC successfully.");
  else {
    Serial.println("Could not conig PMIC.");

  if (!skip_hibernate) {
    Serial.println("Hibernating now");
    Cellular.on();  //Needed to enter true low-power / hibernate mode
    SystemSleepConfiguration sleep_hibernate;
  Serial.println("Entering loop");

// loop() runs over and over again, as quickly as it can execute.
void loop() {
  if (connectToParticle()) {
    Serial.println("Connected to Particle");

    Serial.println("Publishing data now.");
    char infoString[255];
    snprintf(infoString, sizeof(infoString),"{\"event1\":true}");
    Particle.publish("event1", infoString, PRIVATE);

    Serial.println("Entering sleep now");
    SystemSleepConfiguration sleep_standby;
      .gpio(BTN, FALLING)

bool connectToParticle() {
    if (!Cellular.ready()) {
        Cellular.on();          // turn on the Modem
        Cellular.connect();     // Connect to the cellular network
        if(!waitFor(Cellular.ready, 300000)) {
            return false;       // Connect to cellular - give it 5 minutes

    if (!waitFor(Particle.connected, 30000)) {
        return false;
    else {
        return true;

bool initializePowerCfg() {"Initializing Power Config");
    const int maxCurrent = 3000;
    SystemPowerConfiguration conf;
    if (PMIC_enabled) {
      conf.powerSourceMaxCurrent(maxCurrent) // Set maximum current the power source can provide  3.5W Panel (applies only when powered through VIN)
          .powerSourceMinVoltage(3880) // Set minimum voltage the power source can provide (applies only when powered through VIN)
          .batteryChargeCurrent(896) // Set battery charge current
          .feature(SystemPowerFeature::USE_VIN_SETTINGS_WITH_USB_HOST); // For the cases where the device is powered through VIN
                                                                        // but the USB cable is connected to a USB host, this feature flag
                                                                        // enforces the voltage/current limits specified in the configuration
                                                                        // (where by default the device would be thinking that it's powered by the USB Host)
    else {
    int res = System.setPowerConfiguration(conf); // returns SYSTEM_ERROR_NONE (0) in case of success"setPowerConfiguration=%d", res);
    if (res == 0) {
        return true;
    else {
        return false;

I’ll give this a go today, but I highly recommend staying away from Manual mode.
Semi Automatic with threading enabled is much safer.

The PMIC has nothing to do with sleep code and should not be applicable here.

Thanks Chris. I’ll admit I haven’t tried using semi-automatic or tried to enable system threading yet. In my greater application code I use Manual mode though, and it is required due to the timing of particular processes.

In my test code, if you change the PMIC_enabled variable to false, then it will disable the PMIC after a power cycle. The you won’t be able to sleep.

I sent you a follow-up via the ticket.

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