hi
i am working on nrf52dk. i am facing a issue to put "system on sleep" mode in "ble_app_uart" example. "ble app_uart" is going to "system off sleep"
hi
i am working on nrf52dk. i am facing a issue to put "system on sleep" mode in "ble_app_uart" example. "ble app_uart" is going to "system off sleep"
Hi
Most of the examples in the SDK, including ble_app_uart, are designed to go into system ON sleep every time there are no interrupts or events to process in the application.
Unfortunately none of the sleep functions are named "system_on", so this is a bit difficult to know ;)
In the ble_app_uart example you can see that the for(;;) loop in main repeatedly calls idle_state_handle(), which in turn calls nrf_pwm_mgmt_run(), which ends up calling a function named sd_app_evt_wait()
This function will put the device in system ON sleep mode as soon as the SoftDevice is finished with any internal processing it needs to do.
Then the CPU will remain in system ON sleep until some event in the system wakes it up again (such as a timer or radio event).
Best regards
Torbjørn
hi,
there is a function "sleep_mode_enter" in main.c
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);
// 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);
}
i think "err_code = sd_power_system_off()" is enabling system off sleep mode.
if system is going on "system on sleep" . wakeup is prepared with button. i don't want to wake up with button. i want wake it with rtc. how i can do it
Hi
To wake on RTC you need to use system ON mode. Then you need to call sd_app_evt_wait() instead of sd_power_system_off().
Best regards
Torbjørn
Hi
To wake on RTC you need to use system ON mode. Then you need to call sd_app_evt_wait() instead of sd_power_system_off().
Best regards
Torbjørn