SDK_ERROR observed

Hi Team,

I'm developing a custom app, based on the ble_app_uart.

I'm observing a error : SDK_ERROR (NRF_FAULT_ID_SDK_ERROR).

I'm unable to root cause it and also unable to get any information about this error.

I even though got the error details connecting the debugger.

Can you please share some insight about this crash/error. It will help to debug further the issue.

I understand the 

Below are error details (taken from function app_error_save_and_stop()):-

  • Hello,

    Please right click on the 'p_file_name' variable highlighted below and select 'string'. The value field will then display the file path to the file where the code assert was raised. The error occurred at line 1213 (0x4bd) in this file, and the error code was 0x11 (NRF_ERROR_BUSY).

    Best regards,

    Vidar

  • Thank You Vidar.

    I was able to see it by checking the memory address, but this approach is even better.

    Also, Vidar can you help me to generate disassembly file (*.dis) in Segger Embedded Studio which will help to to debug & view the complete code in disassembly.

    I know that the --disassemble, can be used to generate the disassembly but i didnt get the option/place to add this and i guess the Segger Embedded Studio must already have the feature to generate it.

  • No problem.

    I'm not aware of any project settings that will make SES output a dissambly file, but you can view it by right clicking on the executable (or source file) and select "view disassembly".

  • Thanks Vidar.

    That helps.

    Also, recently i ran into a new problem.

    I changed the Optimization Level from "Level 2 for size" to "Level 0", the build failed due to size.

    Then i changed back the Optimization Level to "Level 2 for size".

    But after that when I start the debugging, the execution never halts at main().

    Instead it Halts at 0xa60 location

    I guess it has crashed as the output log mentions about the HardFault:-

    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘s112_nrf52_7.2.0_softdevice.hex’ to J-Link
    Programming 2.7 KB of addresses 00000000 — 00000aff
    Programming 95.9 KB of addresses 00001000 — 00018feb
    J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (32768 bytes)
    J-Link: Flash download: Total: 1.209s (Prepare: 0.079s, Compare: 0.083s, Erase: 0.670s, Program & Verify: 0.352s, Restore: 0.022s)
    J-Link: Flash download: Program & Verify speed: 91 KB/s
    Download successful
    Downloading ‘ble_app_uart_pca10040e_s112.elf’ to J-Link
    Programming 27.3 KB of addresses 00019000 — 0001fd44
    Programming 0.1 KB of addresses 0001fd48 — 0001fdbb
    J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
    Download successful
    Stopped by vector catch HardFault FORCED IACCVIOL BusFault STKERR

    I'm using the Segger Embedded Studio v7.22, nRF5 SDK v17.0.2 and application ble_app_uart

    Can you please help here as am stuck on this one for quick long.

  • No problem. The disassembly view shows that the program hangs in the MBR's hardfault handler. If you make the debugger continue execution, you should see that the program execution ends up in the hardfault handler declared in the application.

    Can you post a screenshot of the CPU registers when the CPU is halted at 0xa60? It may give us a clue as to why the exception was raised.

    sa.qw said:
    I'm using the Segger Embedded Studio v7.22, nRF5 SDK v17.0.2 and application ble_app_uart

    I recommend you use an older version to avoid issues with our example projects. The SDK 17.x was tested with Embedded studio version v5.42a (mentioned in the release notes), and there were some breaking changes introduced after v6.20

Related