FreeRTOS sdk14.0 example ble_app_hrs_freertos crashing

jayaura gravatar image

asked 2017-11-14 15:23:40 +0100


I just changed the ble_app_hrs_freertos example from SDK v 14.0:

  • APP_ADV_TIMEOUT_IN_SECONDS to 5 seconds in main.c
  • Enable debug log for various components in sdk_config.h
  • Redirected NRF_LOG to use SEGGER_RTT rather than UART.

Below is the Terminal output:

<debug> nrf_sdh: State request: 0x00000000
<debug> nrf_sdh: Notify observer 0x00033E50 => ready
<debug> nrf_sdh: State change: 0x00000000
<debug> nrf_sdh: State change: 0x00000001
<debug> nrf_sdh_ble: RAM starts at 0x20005668
<warning> nrf_sdh_ble: RAM start should be adjusted to 0x200020E0.
<warning> nrf_sdh_ble: RAM size should be adjusted to 0xDF20.
<debug> nrf_sdh_freertos: Creating a SoftDevice task.
<debug> nrf_sdh_freertos: Enter softdevice_task.
<info> app: Fast advertising.
<debug> nrf_sdh_ble: BLE event: 0x1B.
<error> app: Fatal

The Iast line _Fatal_ happens after the 5 seconds time out, when the system tries to power off inside sleep_mode_enter() with sd_power_system_off()

I dont quite understand what is happening inside sd_power_system_off(). Could someone please shed some light and help me fix this issue ?

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
Aryan gravatar image

answered 2017-11-16 12:17:45 +0100

updated 2017-11-17 10:01:35 +0100

When you program your chip, the chip will be in debug mode. And in debug mode SYSTEMOFF will not work (read more about emulated system off mode in the product specifications of the chip) and the softdevice will return

#define NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN         (NRF_ERROR_SOC_BASE_NUM + 6)  ///< Power off should not return

Do a chip reset and then this problem should go away, and the chip exits from its debug mode. You will also have the same issue if you are entering system off when you are debugging in your IDE.

edit flag offensive delete publish link more



Thank you for the response!

Aurabindo ( 2017-11-16 15:26:04 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower


Asked: 2017-11-14 15:23:40 +0100

Seen: 85 times

Last updated: nov. 17 '17