This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F: after an OAD to update simple_peripheral_oad_offchip to multi_role, multi role FAILS

Part Number: CC2640R2F
Other Parts Discussed in Thread: UNIFLASH

Hi,


I’m working with CC2640R2F and simplelink_cc2640r2_sdk_4_20_00_04. 

For my project I need to have a device with OAD off-chip capabilities, so I followed all the steps suggested in Task 2 – Add OAD to Multi Role

https://dev.ti.com/tirex/explore/content/simplelink_academy_cc2640r2sdk_5_30_01_00/modules/blestack/ble_enhanced_oad/ble_enhanced_oad.html#task-2-ndash-add-oad-to-multi-role

I successfully added OAD to the multi_role project, and I performed successfully an OAD to update simple_peripheral_oad_offchip to multi_role,

but then multi role FAILS to work, as follow

***ERROR***
< Next Item
>> INTERNAL ERROR!
0xFCA89BEDD763
Connected to 1
Can't adv: no links
OAD version: 0001
Param Update 0
0x546C0EA047E5

Then if I try to perform an OAD to update multi_role to simple_peripheral_oad_offchip again, the Sending Image FAILS with Status "OAD Failure: Pairing is Required".

If I start from simple_peripheral_oad_offchip (SOFTWARE version 0001) and I perform an OAD off-chip to simple_peripheral_oad_offchip (SOFTWARE version 0002), all is OK.

Any suggestions to solve my problem?

Thanks,

Emanuela Genco

  • Hi,

    Thank you for reaching out.

    Based on the error message you receive, it sounds like the issue is caused by the absence of pairing.

    Assuming you want to limit OAD to paired devices, I recommend you ensure the two devices are paired.

    Otherwise, you should disable secure-OAD.

    I hope this will help,

    Best regards,

  • Hi Clément,

    thank you for the answer. 

    My goal is to update the simple_peripheral_oad_offchip to the multi_role (off chip), using BTool. After the OAD update, the multi_role shows this error

    ***ERROR***
    < Next Item
    >> INTERNAL ERROR!
    0xFCA89BEDD763
    Connected to 1
    Can't adv: no links
    OAD version: 0001
    Param Update 0
    0x546C0EA047E5

    Why?

    Regards,

    Emanuela

  • Hi Emanuela,

    ***ERROR***
    < Next Item
    >> INTERNAL ERROR!
    0xFCA89BEDD763
    Connected to 1
    Can't adv: no links
    OAD version: 0001
    Param Update 0
    0x546C0EA047E5

    Interesting to see the error message is actually raised by the application (see the AssertHandler() function in main.c).

    In order to understand better the issue, I would like to kindly ask you to:

    - set a breakpoint in AssertHandler() and check the value of assertCause (should be HAL_ASSERT_CAUSE_INTERNAL_ERROR) and the value of assertSubcause. 

    - test if the the same example works as expected when flashed directly on the device (i.e. without flashing it using OAD)

    Best regards,

  • Hi Clément,

    1 - the value of assertCause is HAL_ASSERT_CAUSE_INTERNAL_ERROR and the value of assertSubcause is 0 

    2 - the same example works as expected when flashed directly on the device, without flashing it using OAD

    3 - after an OAD update  from simple_peripheral_oad_offchip to the multi_role (off chip), using BTool, with the erorr at point 1, I tried an OAD update from multi_role (off chip) to multi_role (off chip).  OAD Failure: Pairing is Required occurs in this case too.

    Emanuela 

  • Hi Emanuela,

    Thank you for the additional details.

    1 - the value of assertCause is HAL_ASSERT_CAUSE_INTERNAL_ERROR and the value of assertSubcause is 0 

    This probably means you are calling a function that does not exist in the jump table. This leads to a call to icall_liteErrorFunction and eventually to "HAL_ASSERT( HAL_ASSERT_CAUSE_INTERNAL_ERROR );". When also considering the second point ("the same example works as expected when flashed directly on the device, without flashing it using OAD"), a potential root cause can be missing support in the stack you are using.

    Here, you are trying to update only the application, but the stack has been configured to only support the peripheral mode. When updating the image and booting on multi_role, you end up missing all the functions for the central role.

    In order to verify this theory, I would suggest to rebuild simple_peripheral_oad_offchip to add support for central role. In order to do this, I would suggest to modify the build_config.opt file to replace "-DHOST_CONFIG=PERIPHERAL_CFG" by "-DHOST_CONFIG=PERIPHERAL_CFG+CENTRAL_CFG". Make sure to rebuild (you can also verify in the map file that the blestack is now larger).
    Once done, flash again simple_peripheral_oad_offchip and perform OAD again.

    3 - after an OAD update  from simple_peripheral_oad_offchip to the multi_role (off chip), using BTool, with the erorr at point 1, I tried an OAD update from multi_role (off chip) to multi_role (off chip).  OAD Failure: Pairing is Required occurs in this case too.

    For this one, I believe this is a mismatch between the configuration selected and the usage made. Please try to remove the pre-defined symbol "SECURITY" from your OAD enabled multirole project. Rebuild the project, flash the device and attempt OAD again.

    Please let me know your results.

    Best regards,

  • Hi Clèment,

    1 - you said:
    In order to verify this theory, I would suggest to rebuild simple_peripheral_oad_offchip to add support for central role.
    In order to do this, I would suggest to modify the build_config.opt file to replace "-DHOST_CONFIG=PERIPHERAL_CFG" by
    "-DHOST_CONFIG=PERIPHERAL_CFG+CENTRAL_CFG". Make sure to rebuild (you can also verify in the map file that the
    blestack is now larger). Once done, flash again simple_peripheral_oad_offchip and perform OAD again.

    I did so, but it doesn't work.
    I've done an additional test. I prepared the target in this way:
    - I've built an download the multi_role_cc2640r2lp_stack_library
    - I've built the simple_peripheral_cc2640r2lp_oad_offchip_app
    - I used UNIFLASH to flash the application bin file
    simple_peripheral_cc2640r2lp_oad_offchip_app_FlashROM_oad.bin
    - I've built and download bim_oad_offchip_cc2640r2lp_app
    Then I've performed and OAD update from simple_peripheral_oad (off chip)
    to the multi_role (off chip), using BTool.
    After the OAD update, the multi_role doesn't show errors.

    3 - after the successful OAD update from simple_peripheral_oad_offchip to the multi_role (off chip)
    I tried an OAD update from multi_role (off chip) to multi_role (off chip).
    OAD Failure: Pairing is Required occurs in this case.

    - you said:
    For this one, I believe this is a mismatch between the configuration selected and the usage made.
    Please try to remove the pre-defined symbol "SECURITY" from your OAD enabled multirole project.
    Rebuild the project, flash the device and attempt OAD again.


    I did so, but it doesn't work:
    OAD Failure: Pairing is Required occurs in this case.

    Thank you for all your help, I continue with other test, if you have other suggestions let me know, 

    Emanuela

  • Hi Emanuela,

    I've done an additional test. I prepared the target in this way:
    - I've built an download the multi_role_cc2640r2lp_stack_library
    - I've built the simple_peripheral_cc2640r2lp_oad_offchip_app
    - I used UNIFLASH to flash the application bin file
    simple_peripheral_cc2640r2lp_oad_offchip_app_FlashROM_oad.bin
    - I've built and download bim_oad_offchip_cc2640r2lp_app
    Then I've performed and OAD update from simple_peripheral_oad (off chip)
    to the multi_role (off chip), using BTool.
    After the OAD update, the multi_role doesn't show errors.

    Very good!
    I guess there were a few steps missing in the suggestion I made hence the failure. But the steps you have taken have confirmed the initial theory.
    In general, assuming you are planning to use both peripheral-only and multi-role projects, I would recommend to base your project on the multi_role project. This way you will avoid the issues related to project settings.

    I did so, but it doesn't work:
    OAD Failure: Pairing is Required occurs in this case.

    Sorry for this. 

    May I ask if you configure BTool to run secure or unsecure OAD? In case it was not clear, the button highlighted in yellow should be unchecked to perform unsecure OAD.

    Best regards,