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

Force softDevice assert

Hi,

Strange as this might sound: is there a way to gracefully force a softDevice assert such that I can get assert_nrf_callback() and see the call stack with DEAD_BEEF in a controlled manner?
I want to test some error scenarios in my application in a controlled way. Such that, I want to remove the use of DEAD_BEEF in the production code.

Thanks,
Tilak

Parents Reply Children
  • Hi,

    Thank you for the tip. I tried your code even with 11 second delay after idle_state_handle(); in the example ble_app_blinky_pca10040_s132. I did get a crash but the callstack was blank "unknown function at 0xA60". I did not get the Segger Embedded Studio to stop at DEAD_BEEF. This happened for both Release and Debug builds.

    Kindly let me know what am I missing to see the callstack with DEAD_BEEF? Is SoftDevice not seeing my assert_nrf_callback() function in my main.c? If possible, please do share an example.

    Thanks,
    Tilak

  • It's the fault-handler used in the sd_softdevice_enable() call that will be used. This is app_error_fault_handler() , and not assert_nrf_callback().

    0x00000A60 is the hardfault exception handler inside the MBR. It's normally forwarded to the main application, but will get trapped if breakpoint on hardfault is enabled in SES.
    You can disable it like this:


Related