Crash on nrf_pwr_mgmt_shutdown() and high current (~350 µA) in System OFF on custom PCB with E73-2G4M08S1C module

if (long_press_detected == true)
{

handle_system_shutdown();
long_press_detected = false;

// Indicate sleep request and persist it
headerData.sleep_requested = true;
write_headerData();

// Blink LED 3 times to indicate shutdown
for (int i = 0; i < 3; i++) {
nrf_gpio_pin_set(LED_GPIO_PIN);
nrf_delay_ms(200);
nrf_gpio_pin_clear(LED_GPIO_PIN);
nrf_delay_ms(200);
}
// Final logging
NRF_LOG_INFO("Entering system off mode");
NRF_LOG_FINAL_FLUSH();


// --- Go to System OFF Mode ---
#ifdef SOFTDEVICE_PRESENT
sd_power_system_off(); // If SoftDevice enabled
#else
nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF);
#endif
}

Hello Nordic Support Team,

I am working on an nRF52-based project on a custom PCB using the E73-2G4M08S1C devboard (https://www.cdebyte.com/products/E73-2G4M08S1C).

When I call nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF), the device crashes (error at nrf_pwr_mgmt.c:418), but still enters System OFF mode.

Measured current consumption during sleep remains around 350 µA, which is much higher than expected for System OFF.

Calling sd_power_system_off() directly does not cause a crash, but the current remains similarly high.

Before sleep, I disable peripherals such as SAADC and power off external sensors. The device wakes up via a GPIO button configured as a wakeup source.

SDK version: [e.g., nRF5 SDK v17.1.0]
SoftDevice version: [e.g., S140 v7.2.0]
Board: Custom PCB with E73-2G4M08S1C module

My questions:

  • What are common causes of crashes in nrf_pwr_mgmt_shutdown() and how to avoid them?

  • Why might current consumption stay around 350 µA instead of going lower in System OFF?

  • Are there extra recommended steps to properly disable peripherals or SoftDevice before entering System OFF?

  • Could SoftDevice be causing the elevated current, and what is the best way to handle it?

I appreciate any guidance or best practices to achieve ultra-low power sleep and avoid these crashes.

Thank you!

Parents
  • Hello,

    The usual cause for higher than expected current draw in System OFF mode is having wrong or non-optional gpio configurations. For example, you may have floating inputs, either on the nRF5, or external ICs on the same board. Does the external sensors, etc on your board remain powered in this mode? 

    Best regards,

    Vidar

  • First of all, I want to confirm whether I'm shutting down the SoC correctly. With this shutdown method, should the current consumption be around 2 to 3 microamps? If that's the case, I'll proceed to debug my PCB and peripherals in more detail.

  • Yes, you can either call sd_power_system_off() directly or use nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF); to let the request go through the pwr mgmt module. It should not crash unless the chip is in Debug Interface mode (see Emulated System OFF mode)

    Current consumption should be ~0.6 uA

  • I am monitoring the device using RTT Viewer (not in debug mode). When the sleep condition is triggered, I receive the following log message:

    00> <error> app: ERROR 3735928559 [Unknown error code] at ..\components\libraries\pwr_mgmt\nrf_pwr_mgmt.c:420 00> 00> PC at: 0x00035B5F 00> 00> <error> app: End of error report

    Here is the code for this:  

                else if(headerData.sleep_requested == true)
                {
                   NRF_LOG_INFO("Button not pressed for 3 seconds during startup. Going back to sleep.");
                   NRF_LOG_FLUSH();
                   nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF);  // Go back to sleep
                }

    It's not like a crash becuase the code is working after this logs on scree. but still i'm concern as this error comes should it be normal ?

Reply
  • I am monitoring the device using RTT Viewer (not in debug mode). When the sleep condition is triggered, I receive the following log message:

    00> <error> app: ERROR 3735928559 [Unknown error code] at ..\components\libraries\pwr_mgmt\nrf_pwr_mgmt.c:420 00> 00> PC at: 0x00035B5F 00> 00> <error> app: End of error report

    Here is the code for this:  

                else if(headerData.sleep_requested == true)
                {
                   NRF_LOG_INFO("Button not pressed for 3 seconds during startup. Going back to sleep.");
                   NRF_LOG_FLUSH();
                   nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF);  // Go back to sleep
                }

    It's not like a crash becuase the code is working after this logs on scree. but still i'm concern as this error comes should it be normal ?

Children
Related