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

Pairing failed with "Unknow function at 0x00000A60"

Dear Nordic support team,

I am developing a prototype based on the nRF52840 with the nRF5 SDK 16.0.0 and Soft Device S140 7.0.1.
The prototype acts in the peripheral role and connects to a central via BLE as a HID keyboard.
So I implemented the BLE HID Keyboard service.
The implementation is based on the nnRF5 SDK example ble_app_hids_keyboard.
The problem is:
1) The device starts advertising successfuly.
2) On my smartphone (Android 10) I can see the device as a keyboard device in the list of Bluetooth. So far so good.
3) But when I click the device in the list to pair it, my nRF52840 code causes a fault: Unknow function at at 0x00000A60.

See screenshot


The fault appears to be occurring in the soft device. Unfortunately I cannot find the location or the cause of the fault.
The example ble_app_hids_keyboard works perfectly, however.

I compared the sdk_config.h, the segger project file and source code between my project and the example mentioned above - but with no result.

Do you have any idea what could be causing the fault?

My project files:

ses_project.zip

Thanks and Regards
Michael Kreher

Parents
  • Hello,

    Thanks for uploading the project. I was able to replicate the problem with it. The problem, as you can see from the screenshot below, is caused by the non-initialized function pointer "m_ipv6_medium_evt_handler()" in ipv6_medium_ble.c. This function gets called when your app receives a BLE event from the Softdevice.

    0xA60 is the address of the hardfault handler inside the MBR. Execution will halt here because SES enables the "Hardfault breakpoint" by default.  But the interrupt will be forwarded to the application if you continue execution in the debugger. You can also disable the breakpoint.

    Best regards,

    Vidar

  • Hi Vidar,

    thanks a lot for your answer in light speed :-)

    I'am wondering why the function m_ipv6_medium_evt_handler() is called. Because I commented out the code for initialization the CoAP and ipv6 stuff. Maybe where is some magic in the SDK background which looks for presence of this handler function and then calls it if it found.

    I will take a look at this point.

    Thank you again for showing the cause of the fault. You can close this ticket.

    Best regards.

    Michael

Reply
  • Hi Vidar,

    thanks a lot for your answer in light speed :-)

    I'am wondering why the function m_ipv6_medium_evt_handler() is called. Because I commented out the code for initialization the CoAP and ipv6 stuff. Maybe where is some magic in the SDK background which looks for presence of this handler function and then calls it if it found.

    I will take a look at this point.

    Thank you again for showing the cause of the fault. You can close this ticket.

    Best regards.

    Michael

Children
No Data
Related