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

BLE peripheral examples UART, Heart rate sensor not running on dongle nRF52840

Development environment: SDK V15.2, Soft device S140 V6.1.1

Application status: unmodified, logging level changed from INFO  to DEBUG, debug-flag -DDEBUG set during compilation.

Behavior: The application is always starting up but the device is immediately resetted. The evaluation of the reset reason register gives no reason (= 0).

A closer investigation of the problem has shown, that the applications are running without any problem, if the function nrf_pwr_mgmt_run() in

the function idle_state_handle() is not called and the call is replaced by an idle loop (e.g. for (int i = 0;i < 1000000; i++)). The function nrf_pwr_mgmt_run()

function is calling the soft device function sd_app_evt_wait(). It seems that this function causes the reset operation of the device (app_error handling

function are showing also no additional information). Following a logging output of the heart rate sensor example (two cycles shown):

--- Fri Feb 22 11:25:47 2019
<debug> nrf_ble_lesc: Initialized nrf_crypto.
--- Fri Feb 22 11:25:47 2019
<debug> nrf_ble_lesc: Initialized nrf_ble_lesc.
--- Fri Feb 22 11:25:47 2019
<debug> nrf_ble_lesc: Generating ECC key pair
--- Fri Feb 22 11:25:47 2019
<info> app: Heart Rate Sensor example started.
--- Fri Feb 22 11:25:47 2019
<info> app: Fast advertising.
--- Fri Feb 22 11:25:47 2019
<info> app: Reset reasons:
--- Fri Feb 22 11:25:47 2019
<info> app: - NONE
-----------------------------------------------------------------
--- Fri Feb 22 11:25:48 2019
<debug> nrf_ble_lesc: Initialized nrf_crypto.
--- Fri Feb 22 11:25:48 2019
<debug> nrf_ble_lesc: Initialized nrf_crypto.
--- Fri Feb 22 11:25:48 2019
<debug> nrf_ble_lesc: Initialized nrf_ble_lesc.
--- Fri Feb 22 11:25:48 2019
<debug> nrf_ble_lesc: Generating ECC key pair
--- Fri Feb 22 11:25:48 2019
<info> app: Heart Rate Sensor example started.
--- Fri Feb 22 11:25:48 2019
<info> app: Fast advertising.
--- Fri Feb 22 11:25:48 2019
<info> app: Reset reasons:

--- Fri Feb 22 11:25:48 2019

<info> app: - NONE

Best regards and thank you very much for your support in advance.

RH

 PS: The blinky example is running without any problem (in difference to the other examples mentioned above is this example

using a different interface functions and parameters for the initialization of the advertising module (see advertising_init()).

Parents Reply Children
  • Sorry for the delayed response. Did you follow the programming guideline here to program to the dongle (see Section Program Application using nRF Connect Programmer). Also, have you taken a look at the documentation provided here?

    Do you happen to have an nRF5x DK to test on? Does the HRS example work there?

  • In the meantime I figured out that the described problem doesn't occur if the logging module is disabled.

    Thus, I had a closer look to the logging module and I found a workaround for the problem. If the synchronous mode of the UART is used, the problem disappears, too. There is not a big difference between synchronous/asynchronous mode, because the logging function serial_tx() is still waiting until the asynchronous operation is complete (while (m_async_mode && m_xfer_done == false)). It seems there is a problem in the asynchronous handling of the logging output. I've to prepare a nRF52840 dongle for debugging to get some more information about what's really going on. Maybe Nordicsemi is able to reproduce and solve the problem ?  

  • Very sorry for the delayed response. The reason this is happening it seems is because the SDK does not provide logging functionality for the 52840 dongle at the moment (see comment from Einar Thorsrud 3 months ago here).

    I tested the ble_app_hrs example from the ble_peripheral folder from the nRF5 SDK v15.2, but I was able to get it working with logging turned on in the DEBUG configuration. I flashed the softdevice & the app using the nRF Connect for Desktop Programmer app.

    Is the logging you received in your question done on a 52840 DK?

    I also sent you a PM on DevZone.

Related