Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52832 "ble_peripheral->ble_app_uart" stops working

Hello,

        I am trying to evaluate the "ble_app_uart" in the "nRF5_SDK" and I am using "DVK-BL652-SA-01" development board from LAIRD.

        The example works fine for a while. After some time, the application stops working. I can not even see the BLE device with my phone.

        What could be the problem ? Any idea ?

Best Regards

  • Remember that pin 3 is not one of the buttons on the DK, so you might have to try to toggle it with a cable. If you use pin 13 instead, it should be Button1 (button0), or if it is the nRF52840 that is in your module, it would be pin 11 that is button 1.

     

    If you look in e.g. the ble_app_hrs example, you will see in main.c, inside the on_adv_evt(...) function, inside the switch, case BLE_ADV_EVT_IDLE: sleep_mode_enter() is called.

    This again calls a function called bsp_btn_ble_sleep_mode_prepare(), which will enable two pins/buttons for wakeup. 

     

    I am not familiar with the DVK that you use, so you have to check the pin mapping, what pins/buttons the BTN_ID_WAKEUP and BTN_ID_WAKEUP_BOND_DELETE points to.

     

    Look at how the bsp_wakeup_button_enable() is implemented, or use it directly.

     

    Best regards,

    Edvin

  • I have modified the code and it now works well. Thanks a lot

    static void sleep_mode_enter(void)
    {
        uint32_t err_code = bsp_indication_set(BSP_INDICATE_IDLE);
        APP_ERROR_CHECK(err_code);
    
        // Prepare wakeup button.
        nrf_gpio_cfg_sense_set(3, NRF_GPIO_PIN_SENSE_LOW);
    
        // 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);
    }

Related