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

sd_power_system_off resets?

I'm using nrf_pwr_mgmt_shutdown to shut down the system to wake on interrupt. 17.0.2 SDK and 7.2.0 softdevice. When I step through the code with a debugger, it gets to sd_power_system_off and then when I attempt to step over it reboots. The bootloader starts and launches the app. Is this because a debugger is connected? When the softdevice is not enabled, and nrf_power_system_off is called instead, it does shut down correctly.

Parents Reply
  • From the bootloader:

    Reset reason: 0x00000001

    Which indicates reset by the reset pin.

    This pin is configured by defining CONFIG_GPIO_AS_PINRESET and is otherwise disconnected on the board. I thought by default this was configured with internal pull up, but checking the pin config register it doesn't seem to be. However, if I manually configure as an input with internal pull up, the same thing happens. I checked the voltage of pin 21 (nRF52832) and it is constant 3v when the reset occurs.

    I replaced sd_power_system_off with nrf_power_system_off so I can test if it is the softdevice, and the same issue occurs, indicating it isn't the softdevice specifically. That points to some difference in state between the two code paths (when softdevice is enabled and when it isn't) that could be affecting this, but the pin configuration for pin 21 is the same when the reset issue occurs and when it doesn't. What other factors could be triggering a pinreset reset?

Children
Related