Power Save Mode

Hi,

I am working on nRF52811 as central and I want to put the device in full power save mode so it does not consume power and activate once I pressed the button. How can I do that?

Thanks!

  • I suggest to check out for instance the ble_app_hids_keyboard example, where you can find the following implementation:

    /**@brief Function for putting the chip into sleep mode.
     *
     * @note This function will not return.
     */
    static void sleep_mode_enter(void)
    {
        ret_code_t err_code;
    
        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);
    }

  • Thanks for the reply.

    Actually, I want to add this to the central mode device. Which handler I can use in that case? Can I use P0.26 pin to wake up?

Related