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

FreeRTOS sdk14.0 example ble_app_hrs_freertos crashing

Hi,

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 ?

Parents
  • 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.

Reply
  • 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.

Children
Related