This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Watch dog + sd_power_system_off Is it possible?

Hello !

is possible turn off my system using sd_power_system_off  when the Watch dog is enabled?

After I called sd_power_system_off  my device is restarting and initialize everything again

details:

SDK13, nRF52

  • Hi,

    Shouldn't the "sd_power_system_off" work just like the "nrf_power_system_off"? Do I need to use the "nrf_power_system_off"?

    The function nrf_power_system_off() will go into an empty loop if you are in Debug mode. See this page.

    Also note that when the device wakes up from System Off mode, it will restart. You will need to look at RESETREAS to see the reset source.

  • Hello Sigurd

    Thank you for your answer.

    Yes "If the device is in debug interface mode, System OFF will be emulated" and yes I was in Debug mode but with or without the Debug mode the nrf_power_system_off() works and the watchdog does not restart the system. While when I use the sd_power_system_off() the watchdog restarts the system. So I am not sure if the Debug mode is the problem.

    I am assuming that when I use the nrf_power_system_off() the system goes to the "real" system off mode while using the sd_power_system_off() the system goes to the emulated system off mode. And in the emulated system off mode the watchdog restarts the system. Is this correct?

  • I was seeing this too:

    • After calling sd_power_system_off(), the watchdog was restarting the system (shouldn't happen since all clocks should've been stopped).
    • Using nrf_power_system_off() worked beautifully.

    The issue was that I was calling __disable_irq() before entering my shutdown routine, and because the softdevice relies on interrupts, the call wasn't actually shutting down the system, which is why nrf_power_system_off() worked.

Related