Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

SAFERTOS+BLE

I have been trying to make SAFERTOS based BLE example working on nRF52832 (PCA10040) similar to the one provided by Nordic SDK 17.1.0 at `examples\ble_peripheral\ble_app_hrs_freertos`

I had taken the SAFERTOS evaluation example as base and tried to enable BLE as shown in the freertos example. I had created SAFERTOS versions of files/code where FREERTOS functions were getting used (nrf_sdh_freertos.c, app_timer_freertos.c) and updated timer and task creation.

I also fixed the IAR settings to include softdevice and changed the icf to get correct ram and rom addresses and included preprocessor defined symbols.

However, I was still getting a hardfault during initialization of softdevice. The application code is giving error code `536899764 (0x200070B4) ` instead of success (0x0) from sd_softdevice_enable(&clock_lf_cfg, app_error_fault_handler).

As Nordic doesn't provide source for softdevice I am unable to debug this.

Can anyone help/point to right resources on what am I doing wrong or what should I check to fix this issue.

I would appreciate any help.

Thanks.

Parents
  • Hello,

    Are you able to pinpoint exactly where the fault exception is raised? I just had another ticket where the SVC instruction for sd_softdevice_enable() triggered a fault exception. The reason for this was that the CRITICAL_REGION_ENTER()/CRITICAL_REGION_EXIT() macros enclosing the call were compiled without the SOFTDEVICE_PRESENT symbol defined. Do you have this symbol included in your preprocessor definitions like in the ble_app_hrs_freertos example?

    Best regards,

    Vidar

Reply
  • Hello,

    Are you able to pinpoint exactly where the fault exception is raised? I just had another ticket where the SVC instruction for sd_softdevice_enable() triggered a fault exception. The reason for this was that the CRITICAL_REGION_ENTER()/CRITICAL_REGION_EXIT() macros enclosing the call were compiled without the SOFTDEVICE_PRESENT symbol defined. Do you have this symbol included in your preprocessor definitions like in the ble_app_hrs_freertos example?

    Best regards,

    Vidar

Children
No Data
Related