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

SES debugger crashes without reason

Hi, 

I have an app that uses freeRTOS

My app runs OK , however when I am debugging it in segger studio with my SWD connector, it crashes with no reason

If I check the dissassembly window, the line in which it crashes is 

4B01        ldr r3, [pc, #4]

Could you help me troubleshoot this?

Regards,

Parents
  • I have a similar issue, related code as follow:
    The scan had been stopped, but if I call ble_scan_stop() again after some while, it crashes atfer printing "Scan stop!" with no reason, and the call stack window show nothing, the dissassembly window show it crashed at :
    4B01 ldr r3, [pc, #4]

    source code:

    void ble_scan_stop(void)
    {
        nrf_ble_scan_stop();
        event_send(CENTRAL_SCAN_STOP, NULL);
        
        NRF_LOG_INFO("Scan stop!");
    }

  • It sounds like the nRF is entering the HardFault handler. 

    You should use the hardfault handler from the hardfault handling library. Just add the following files to your build and enable the handler in sdk_config.h: 

     - nRF5_SDK_15.3.0_59ac345\components\libraries\hardfault\hardfault_implementation.c

     - nRF5_SDK_15.3.0_59ac345\components\libraries\hardfault\nrf52\handler\hardfault_handler_<name of toolchain used>.c 

    This handler will attempt to determine the cause and print out the error information. 

Reply
  • It sounds like the nRF is entering the HardFault handler. 

    You should use the hardfault handler from the hardfault handling library. Just add the following files to your build and enable the handler in sdk_config.h: 

     - nRF5_SDK_15.3.0_59ac345\components\libraries\hardfault\hardfault_implementation.c

     - nRF5_SDK_15.3.0_59ac345\components\libraries\hardfault\nrf52\handler\hardfault_handler_<name of toolchain used>.c 

    This handler will attempt to determine the cause and print out the error information. 

Children
No Data
Related