Hello,
I am using nRF52832, SDK_15.3.0, S132 SoftDevice and Segger for flashing the image. I am using ‘ble_app_blinky’.
I have few queries on System OFF mode.
1) What is the difference between calling directily sd_power_system_off() and calling nrf_pwr_mgmt_shutdown(). Whether DMA status will be check and then only go to sleep. Which function is better ?
a) In debug mode, whether calling nrf_pwr_mgmt_shutdown() is better as it has while(1) loop ?
2) What is the difference between NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF and NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF.
a) Its mentioned as “Useful when battery level is dangerously low”. What does it mean. In this case, will not controller wakeup if there is a GPIO event.
3) ble_app_blinky application is only with System ON mode. I want both System OFF and System ON mode. Initially my device will be in System OFF mode. When a button is pressed for 5sec then only I will enter into System ON mode. After some operations my device will go back to System OFF mode by setting bEnterSystemOffMode to true. Is below implementation fine ?
static void idle_state_handle(void) { ret_code_t err_code; if(bEnterSystemOffMode == true) { // Go to system-off mode (this function will not return; wakeup will cause a reset). err_code = sd_power_system_off(); APP_ERROR_CHECK(err_code); //nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF); } else if (NRF_LOG_PROCESS() == false) { nrf_pwr_mgmt_run(); } }
Thanks & Regards
Vishnu Beema