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

For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??

For nRF52832 SDK 17.0.2 ,How to enter Sleep Mode (Power Off Mode) (Suspend Mode) then press the Button1 for wake up ??

Parents
  • uint32_t bsp_btn_ble_sleep_mode_prepare(void)
    {
    uint32_t err_code;

    err_code = bsp_wakeup_button_enable(BTN_ID_WAKEUP);
    RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code);

    err_code = bsp_wakeup_button_enable(BTN_ID_WAKEUP_BOND_DELETE);
    RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code);

    return NRF_SUCCESS;
    }

    ----------------------------------------------------------------------------------------------------------------

    #define BTN_ID_WAKEUP 0 /**< ID of button used to wake up the application. */
    #define BTN_ID_SLEEP 0 /**< ID of button used to put the application into sleep mode. */
    #define BTN_ID_DISCONNECT 0 /**< ID of button used to gracefully terminate a connection on long press. */
    #define BTN_ID_WAKEUP_BOND_DELETE 1 /**< ID of button used to wake up the application and delete all bonding information. */
    #define BTN_ID_WHITELIST_OFF 1 /**< ID of button used to turn off usage of the whitelist. */

Reply
  • uint32_t bsp_btn_ble_sleep_mode_prepare(void)
    {
    uint32_t err_code;

    err_code = bsp_wakeup_button_enable(BTN_ID_WAKEUP);
    RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code);

    err_code = bsp_wakeup_button_enable(BTN_ID_WAKEUP_BOND_DELETE);
    RETURN_ON_ERROR_NOT_NOT_SUPPORTED(err_code);

    return NRF_SUCCESS;
    }

    ----------------------------------------------------------------------------------------------------------------

    #define BTN_ID_WAKEUP 0 /**< ID of button used to wake up the application. */
    #define BTN_ID_SLEEP 0 /**< ID of button used to put the application into sleep mode. */
    #define BTN_ID_DISCONNECT 0 /**< ID of button used to gracefully terminate a connection on long press. */
    #define BTN_ID_WAKEUP_BOND_DELETE 1 /**< ID of button used to wake up the application and delete all bonding information. */
    #define BTN_ID_WHITELIST_OFF 1 /**< ID of button used to turn off usage of the whitelist. */

Children
No Data
Related