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()).