Boron 2G/3G ULTRA_LOW_POWER, can't get 170uA (720uA instead)

I was unable to reproduce your problem. Tested with a Boron 2G/3G (BRN310) with Device OS 2.3.0.

Here’s the firmware I used.


#include "Particle.h"

SYSTEM_THREAD(ENABLED); // enabled means connecting to cloud is non-blocking
SYSTEM_MODE(SEMI_AUTOMATIC);    // device decides when to start cloud connection

Serial1LogHandler logHandler(115200, LOG_LEVEL_TRACE);

pin_t WAKE_PIN = D2;

retained int wakeCounter = 0;
system_tick_t lastSleep = 0;

void sleepFunction(void);

void setup() {
    pinMode(WAKE_PIN, INPUT_PULLUP);
}

void loop() {

    if (millis() - lastSleep >= 60000) {
        // Time to sleep again
        lastSleep = millis();

        sleepFunction();
    }
}

void sleepFunction(void) {

    {   
        // Copied from Tracker Edge code
        Log.info("Stopping modem");
        if (!Particle.disconnected()) {
            // Explicitly disconnect from the cloud with graceful offline status message
            Particle.disconnect(CloudDisconnectOptions().graceful(true).timeout(5000)); // 5 seconds
            waitUntil(Particle.disconnected);
            Cellular.disconnect();
            waitUntilNot(Cellular.ready);
        }

        // Turn off modem so it won't be turned on again after wake
        Cellular.off();
        waitUntil(Cellular.isOff);
    }
        
    SystemSleepConfiguration config;
    config.gpio(WAKE_PIN, FALLING)
          .duration(60s)
          .mode(SystemSleepMode::ULTRA_LOW_POWER);    // ULP sleep mode
                
    Log.info("going to sleep");
    System.sleep(config);

    lastSleep = millis();

    if (++wakeCounter >= 5) {
        wakeCounter = 0;
    }
    Log.info("wakeCounter=%d", wakeCounter);
    if (wakeCounter == 4) {
        Particle.connect();
    }

}

It more or less stays awake for a minute, then sleeps for a minute. It starts off with cellular off. Even after cold boot and going to sleep, I’m getting 161 uA, so turning the modem off on cold boot seems to work properly for me.

Screen Shot 2022-04-04 at 2.29.07 PM

It then wakes up with cellular off (breathing white). In this state I’m getting 5.12 mA average, which is expected. Upon going into ULP sleep with GPIO wake I’m getting 157 uA, which is also expected.

It then repeats this cycle a few more times until wakeCounter ==4 then it connects to cellular. After entering sleep after connecting, I got 159uA.

One difference worth noting: On cold boot, there is a power difference when in breathing white mode. It’s 76.6 mA, instead of 5.12 mA. I believe this is because the code to shut down the cellular modem has not yet been executed yet and the modem is partially powered on. It could probably be fixed by executing the cellular off code in this case.

I also tested hitting the reset button while in sleep mode. This caused the Boron to go into breathing white mode (expected) at 5.4 mA. This is expected, because the modem was previously off. Resetting the nRF52840 does not reset the cellular modem automatically, so this is expected. Once the device went back to sleep it used 155 uA, expected.

Power usage was always around 160 uA in ULP sleep in all of the cases I tested with the code above.

2 Likes