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

BLE peripheral demo wake-up

Dear Nordic Support,

I am using nRF52 SDK v16.0.0. I am running BLE peripheral examples. As I read from the examples, the button 1 is used for sleeping and waking the board.

However, if the board is sleeping (SYSTEM OFF), I can wake the board up by pressing any button, not just button 1. Could you please help me with the review? I don't do any modification to the code.

Thank you and best regards,

         Duy

Parents Reply
  • Hi ,

    Thanks for showing the problem. Got a solution for it ;) and luckily it works ;)

    static void sleep_mode_enter(void)
    {
        APP_ERROR_CHECK(bsp_indication_set(BSP_INDICATE_IDLE));
        
        /* Disable all timers and buttons. */
        bsp_buttons_disable();
        app_timer_stop_all();
    
        /* Prepare wakeup buttons. */
        APP_ERROR_CHECK(bsp_btn_ble_sleep_mode_prepare());
    
        /* Go to system-off mode (this function will not return; wakeup will cause a reset). */
        APP_ERROR_CHECK(sd_power_system_off());
    }
    

    Best regards,

        Duy

Children
Related