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

RF52 Example examples\ble_peripheral\ble_app_uart

Hi,

I am using the example above on a PCA10056 development board with nRF5_SDK_15.2.0_9412b96.

No changes have been made to the example code.

After 3 minutes approx, the code ends up in app_error_fault_handler.

The stack trace shows:

ble_advertising_start

ble_advertising_on_ble_event 

nrf_sdh_ble_evts_poll

I understand that the BLE is configured to advertise for 3 minutes using APP_ADV_DURATION.

I have two questions:

Why does the example end up in a fault condition when a mobile phone HAS NOT connected?

     - It might be expected that the software would simply continue running.

Why does the example end up in a fault condition when a mobile phone HAS connected?

    - If the mobile is connected but only occasionally transmitting data, it might be expected that the software would continue running.

Any help appreciated.

  • Hello,

    This example is configured to enter System OFF mode (i.e. deep sleep) when advertising times out after three minutes, and the chip can't go into sleep mode while in debug mode so that is why the program ends up in the error handler instead.

    To disable the adv timeout you can set the APP_ADV_DURATION to '0' (or BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED) and change the advertisement flags from BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE.

    Why does the example end up in a fault condition when a mobile phone HAS connected?

     Does it enter the fault handler while connected?

Related