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

sd_softdevice_enable hardfault when I merge ble_app_blinky into blinky_rtc_freertos example

Hi There,

I facing one critical issue with softdevice, I cannot get it work in freertos environment.

Hardware: customized board based on PCA10056

SW: nRF5_SDK_15.2.0_9412b96

Change:

Merge ble_app_blinky example into blinky_rtc_freertos.

blinky_rtc_freertos_ble_added.zip

Problem:

when the program executed sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler) it will enter HardFault

  .thumb_func
  .weak   HardFault_Handler
HardFault_Handler:
  b     .

Parents
  • Hi.

    The first issue is that the SoftDevice is not added when you flash your device, so you try to enable the SoftDevice when there is no SoftDevice present, and you get the HardFault.

    The SoftDevice needs to be added in the Common Configuration in Options --> Select Loader --> and place the path to S140 v6.1.0, like this:

    Second issue is that the Section Placement Macros is not configured for the project to be using SoftDevice, this also has to be edited.

    You find the Section Placement Macros in the Common Configuration in Options --> Select Linker --> Edit Section Placement Macros to the following:

    FLASH_PH_START=0x0 
    FLASH_PH_SIZE=0x100000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x40000
    FLASH_START=0x26000
    FLASH_SIZE=0xda000
    RAM_START=0x200022e0
    RAM_SIZE=0x3dd20

    Like this:

    Hope this helps you, and a little tips: If you want to merge a peripheral example with a ble_peripheral example, its easiest to start from the ble_peripheral example. What i mean by start is that you use the ble_peripheral example as base and add the features you want from a peripheral example to the ble_peripheral example.

    Best regards.

    Andreas

Reply
  • Hi.

    The first issue is that the SoftDevice is not added when you flash your device, so you try to enable the SoftDevice when there is no SoftDevice present, and you get the HardFault.

    The SoftDevice needs to be added in the Common Configuration in Options --> Select Loader --> and place the path to S140 v6.1.0, like this:

    Second issue is that the Section Placement Macros is not configured for the project to be using SoftDevice, this also has to be edited.

    You find the Section Placement Macros in the Common Configuration in Options --> Select Linker --> Edit Section Placement Macros to the following:

    FLASH_PH_START=0x0 
    FLASH_PH_SIZE=0x100000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x40000
    FLASH_START=0x26000
    FLASH_SIZE=0xda000
    RAM_START=0x200022e0
    RAM_SIZE=0x3dd20

    Like this:

    Hope this helps you, and a little tips: If you want to merge a peripheral example with a ble_peripheral example, its easiest to start from the ble_peripheral example. What i mean by start is that you use the ble_peripheral example as base and add the features you want from a peripheral example to the ble_peripheral example.

    Best regards.

    Andreas

Children
No Data
Related