The chip is nrf52832. The SDK version that I am using is nRF5_SDK_13.1.0_7ca7556,the example that i used is ble_app_uart. When i debug about low power,i encounter problems "sd_power_system_off" don't make the chip sleep,my code as follows: main.c :
// Enter main loop.
for (;;)
{
NRF_LOG_FLUSH();
for(uint32_t i = 0;i < 2000000;i++)
{
__asm {
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
}
}
NRF_LOG_INFO("code is running!\r\n");
//power_manage();
}
when advertising is timeout,call function "sleep_mode_enter" static void sleep_mode_enter(void) { uint32_t err_code = bsp_indication_set(BSP_INDICATE_IDLE); APP_ERROR_CHECK(err_code);
// Prepare wakeup buttons.
err_code = bsp_btn_ble_sleep_mode_prepare();
APP_ERROR_CHECK(err_code);
err_code = sd_power_system_off();
}
I can see when advertising is timeout segger RTTviewer continues outputing "code is running!",the nrf52832 CPU still running after sd_power_system_off was called. That is what I am confused. Thank you !