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

sd_app_evt_wait() cause HardFault_Handler

Hi,

I tried to run example: ble_app_multilink_central_s120_pca10028 but application goes to HardFault_Handler when it reaches sd_app_evt_wait() (in power_manage() function). I also tried to run other example for softdevice s110 (ble_app_hrs_s110_pca10028) but result was the same.

Generally I don't use any nordic eval board. I have custom board with nRF51822(AA). I'm using Keil uVision5. I set ROM and RAM start addresses and sizes correctly depending on which softdevice I was using. The only thing i had changed in mentioned examples were macros constant definitions for leds and buttons in pca10028.h. Moreover I had changed UART pins numbers (RX, TX, CTS, RTS) in this file.

Any idea why it stucks on sd_app_evt_wait() ?

Thanks

Parents
  • If you are telling me that the hardfaults occurs while stepping after hitting the breakpoint, then this is expected. The real time constraints of the softdevice are broken once you hit the breakpoint, at which time the MPU is stalled not allowing softdevice timer handlers to execute, so next time when you step then there could be unpredictable behaviour. It might allow you to step for some time or could hardfault depending on what the softdevice was doing at the moment.

    I recommend you to go through the following if you want to understand it in more. devzone.nordicsemi.com/.../

Reply
  • If you are telling me that the hardfaults occurs while stepping after hitting the breakpoint, then this is expected. The real time constraints of the softdevice are broken once you hit the breakpoint, at which time the MPU is stalled not allowing softdevice timer handlers to execute, so next time when you step then there could be unpredictable behaviour. It might allow you to step for some time or could hardfault depending on what the softdevice was doing at the moment.

    I recommend you to go through the following if you want to understand it in more. devzone.nordicsemi.com/.../

Children
No Data
Related