nRF5 SDK: sd_power_system_off()

  • Emulated System OFF Mode
  • Debug Interface Mode
  • Debug Mode

UART Output

<info> app: Current Time service client started.
<debug> app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist
<info> app: Fast advertising
<debug> app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist
<info> app: Slow advertising
<debug> ble_cts_c: BLE event handler called with event 0x26
<debug> ble_cts_c: BLE event handler called with event 0x10
<info> app: Connected.
<debug> ble_cts_c: BLE event handler called with event 0x12
<debug> ble_cts_c: BLE event handler called with event 0x12
<debug> ble_cts_c: BLE event handler called with event 0x12
<debug> ble_cts_c: BLE event handler called with event 0x19
<debug> app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist
<info> app: Fast advertising
<debug> ble_cts_c: BLE event handler called with event 0x11
<info> app: Disconnected.
<debug> app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist
<info> app: Slow advertising
<debug> ble_cts_c: BLE event handler called with event 0x26

Screenshots

sd_power_system_off() doesn’t power off: it’s in Debug Mode!!

Forum

sd_power_system_off returns immediately and forces reset
Why does nRF52 hrs sdk11 example sd_power_off return 6?
Problem with emulated System OFF mode with NRF52

/* components/softdevice/s132/headers/nrf_error.h */
/* SoC error base */
#define NRF_ERROR_SOC_BASE_NUM  (0x2000)


/* components/softdevice/s132/headers/nrf_error_soc.h */
/* Power off should not return */
#define NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN         (NRF_ERROR_SOC_BASE_NUM + 6)


/* components/softdevice/s132/headers/nrf_soc.h */
/**@brief Puts the chip in System OFF mode.
 *
 * @retval ::NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN
 */
SVCALL(SD_POWER_SYSTEM_OFF, uint32_t, sd_power_system_off(void));

Leave a Reply

Your email address will not be published. Required fields are marked *