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

wants to know that device will go sleep or it just stop advertise after timeout occurs

Hi i am using nrf52840 DK and i am trying out sleep_mode after timeout happens. but i had a doubt in ble_adv_evt_idle i.e if i use this case the device goes into sleep and i fi use ble_adv_evt_fast then after timeout i could not able see any advertisement packet. is so because device gone into sleep or system is still on but advertisement is not happening.

Parents
  • Hi

    As I said, __WFE is one way to go to sleep (in system on mode). This function looks nicer, if that's what you want. 

    /** @brief Function for placing the application in low power state while waiting for events. */
    static void power_manage(void)
    {
        uint32_t err_code = sd_app_evt_wait();
        APP_ERROR_CHECK(err_code);
    }

    To see how it is implemented in the main loop, you can have a look at the usbd_ble_uart example project.

    Best regards,

    Simon

  • while i am testing ble_app_uart peripheral example in main for loop there is an idle_state_handle() function called, so inside that pwr_mgnt function was called. if you look into it the same whatever you said before for sleep sd_app_evt_wait() was called but device not sleeping its still advertising for 10 sec.

    can you explain me what functionality will be disabled if i call sd_app_evt_wait()? basically i want to put device in sleep then wake up using rtc0 timer. now i can implement rtc timer, when the timer expires i am advertising again but there is no advertising data.

Reply
  • while i am testing ble_app_uart peripheral example in main for loop there is an idle_state_handle() function called, so inside that pwr_mgnt function was called. if you look into it the same whatever you said before for sleep sd_app_evt_wait() was called but device not sleeping its still advertising for 10 sec.

    can you explain me what functionality will be disabled if i call sd_app_evt_wait()? basically i want to put device in sleep then wake up using rtc0 timer. now i can implement rtc timer, when the timer expires i am advertising again but there is no advertising data.

Children
No Data
Related