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.

LP-CC2652RB: unable to perform OAD using either Android or iOS with TI SimpleLink Starter application

Part Number: LP-CC2652RB
Other Parts Discussed in Thread: CC2652RB, UNIFLASH, CC2652R, CC2642R

Hello,

Both cases have a similar behavior and display the same message.

Header Failed!
Header rejected with fault: Stack and
flash boundary mismatch, program
entry mismatch

This happens immediately after pairing completes. On the launchpad output I see the following:

#000105 [ 424.313 ] INFO: (project_zero.c:1417) Adv Set 0 Enabled
#000106 [ 424.424 ] INFO: (project_zero.c:1500) Encryption success
#000107 [ 424.784 ] INFO: (project_zero.c:1388) PHY Updated to 2M
#000108 [ 424.844 ] INFO: (project_zero.c:972) MTU Size: 247
#000109 [ 425.624 ] INFO: (led_service.c:419) ReadAttrCB : LED0 connHandle: 0 offset: 0 method: 0x0a
#000110 [ 425.684 ] INFO: (led_service.c:430) ReadAttrCB : LED1 connHandle: 0 offset: 0 method: 0x0a
#000111 [ 425.744 ] INFO: (button_service.c:539) WriteAttrCB (CCCD): param: 0 connHandle: 0 - OTA write
#000112 [ 425.744 ] INFO: (project_zero.c:2506) (CB) Button Svc Char config change paramID(0). Sending msg to app.
#000113 [ 425.746 ] INFO: (project_zero.c:2176) CCCD Change msg: Button Service BUTTON0: Notifications enabled
#000114 [ 425.804 ] INFO: (button_service.c:539) WriteAttrCB (CCCD): param: 1 connHandle: 0 - OTA write
#000115 [ 425.804 ] INFO: (project_zero.c:2506) (CB) Button Svc Char config change paramID(1). Sending msg to app.
#000116 [ 425.806 ] INFO: (project_zero.c:2187) CCCD Change msg: Button Service BUTTON1: Notifications enabled
#000117 [ 427.484 ] INFO: (button_service.c:539) WriteAttrCB (CCCD): param: 0 connHandle: 0 - OTA write
#000118 [ 427.484 ] INFO: (project_zero.c:2506) (CB) Button Svc Char config change paramID(0). Sending msg to app.
#000119 [ 427.485 ] INFO: (project_zero.c:2176) CCCD Change msg: Button Service BUTTON0: Noti/Ind disabled
#000120 [ 427.544 ] INFO: (button_service.c:539) WriteAttrCB (CCCD): param: 1 connHandle: 0 - OTA write
#000121 [ 427.544 ] INFO: (project_zero.c:2506) (CB) Button Svc Char config change paramID(1). Sending msg to app.
#000122 [ 427.546 ] INFO: (project_zero.c:2187) CCCD Change msg: Button Service BUTTON1: Noti/Ind disabled
#000123 [ 427.785 ] INFO: (oad.c:752) OAD event=3 next state=0
#000124 [ 427.845 ] INFO: (oad.c:752) OAD event=3 next state=0
#000125 [ 427.905 ] INFO: (oad.c:752) OAD event=3 next state=0
#000126 [ 427.966 ] INFO: (oad.c:752) OAD event=0 next state=0
#000127 [ 427.966 ] INFO: (project_zero.c:837) OAD Error: 9
#000128 [ 430.424 ] INFO: (project_zero.c:1737) Updated params for E0:33:8E:54:5E:30, interval: 30.0 ms, latency: 0, timeout: 2000 ms

This is the output when using iOS. When using Android, the application crashes after the first two "(oad.c:752) OAD event=3 next state=0" messages.

Shouldn't I be prompted to select a firmware file before the header validation process?

BTW, I have also tried with using the Simple Peripheral project with the same results.

TIA

  • Hi,

    Thanks for your inquiry. I notified a colleague and he will reply as soon as possible.

    Regards,

    Rafael

  • Hi,

    Could you specify which SDK version and which mobile application version you are using?

    You may want to try updating the mobile application.

    Regards,

  • Hello,

    The SDK version is cc13x2_26x2_sdk_4_40_04_04

    The Android SimpleLink application version is v5.7.5 (Build 86)

    Results with new LaunchPad

    The CC2652RB DK I had been using was modified to integrate other sensors. To be 100% certain this was not contributing to the issues, I purchased a new board. Here are the results using the same Android application using ONLY the firmware preloaded on the board and provided within the SimpleLink application.

    • LaunchPad came preloaded with "ProjectZero"
    • Attempted to download the "SimpleSensor" firmware via OAD
      • I was prompted to select a firmware image (did not get this far previously)
      • the OAD completed successfully
      • SimpleSensor image was launched but not functional. The application name did not appear in the device list.
      • Restored the factory image using reset and the left button
    • Performed the same operation with each of the other firmware images, except "ProjectZero". All produced the same results.
    • Then performed OAD using the ProjectZero file
      • Same results as with the other images but this time the FACTORY IMAGE COULD NOT BE RESTORED

    So, I have a brand new LaunchPad. The only firmware images used were the ones either preloaded on the board or bundled with SimpleLink. The board is bricked. It appears the backup factory image is now corrupted as well.

    An interesting difference to note,

    • using only the preloaded and packaged images, the LaunchPad does not request to be paired before accepting the OAD
    • Using the ProjectZero I built, you are prompted to pair the device. After entering "123456" as displayed in the log output, the pairing completes but the application crashes.

    Following applications tried

    • Android Samsung Galaxy Tab S2, Starter App v5.7.5 (Build 86), running Android 7.0
    • Android Samsung Galaxy Tab S6 Lite, Starter App v5.7.5 (Build 86), Android 11
    • iOS Starter App v5.9 (Build 287), iOS 14.4.2

    Suggestions?

  • Hi,

    Thank you for the detailed investigation you have run.

    First of all, I don't think the launchpad is really bricked. A mass erase using Uniflash or Flash Programmer will allow you to flash a new image on the device. In other words, you can definitely use the same launchpad to run the next tests.

    I have managed to reproduce your issue and find a workaround - I will open an internal ticket to track these.

    The issue was due to 2 elements:

    • the iOS Starter App v5.9 (Build 287), iOS 14.4.2 does not work properly with SDK 4.40.04.04 for BAW devices (CC2652RB) - but it does work for CC26x2R. I do not have run tests with Android apps.
    • the project_zero image flashed on shipped launchpads might come from a slightly old build that cannot be as easily updated (actually to do the update you may need to compile the new image with specific flags - I remember I discussed this on the forum but I have not found back the thread)

    As a temporary workaround I would recommend to use a CC26x2R with the latest SDK or a CC2652RB with SDK 4.20.

    Then, following these steps you should be able to go through the OAD process:

    1. Using Flash Programmer, flash the prebuilt project_zero image on the device.
      If you are using CC2652RB, use the image stored in C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/examples/rtos/CC2652RB_LAUNCHXL/ble5stack/hexfiles/project_zero_unsecure_app.hex
      If you are using CC26x2R, use the image stored in C:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/examples/rtos/CC26X2R1_LAUNCHXL/ble5stack/hexfiles/project_zero_unsecure_app.hex
      Make sure to erase the device's flash:
    2. Reboot the device
    3. Connect the app and go through the OAD process

    To finish, the process I have described will lead you to use the unsecure project_zero. As a result you won't be required to pair before running the OAD. If you want to use secure OAD, you have to rebuild the image exactly as you did before.

    Best regards,

  • Hello,

    I downloaded SDK 4.20.01.04 and built project_zero and simple_peripheral_oad_offchip. Both these images updated over-the-air and ran successfully using the Android SimpleLink application! (I had previously recovered the factory image by loading a working image and then performing the button factory restore)

    Questions:

    1. Why does the CC2652RB require an old SDK version? It seems to be 2 major releases behind.
    2. What is the difference between the CC2652RB Launchpad and CC26x2R1 Launchpad? They both support development for the CC2652R but the latter launchpad supports the newer SDK?
    3. Using the same board and factory loaded image, performing OAD using SDK 4.40 images requests pairing while images created with SDK 4.20 do not require pairing. This seems strange since I thought the security/pairing was determined by the BIM?

    Concerns:

    1. Although the board wasn't technically "bricked" previously, it required loading and running a good image to recover to the factory image. The whole idea of the factory image is to provide a backup in case of a failed download or faulty image. Ideally the board would detect a problem and automatically fail over. We are creating production products using this processor. It encased in a sealed unit. How do you recover?

    Thanks

  • Hi, 

    1- The problem is in the mobile application actually. If you attempt the OAD with a different OAD provider (typically host_test) you won't experience this issue. Again, this problem is now known from the mobile apps developers and action will be taken.

    2- CC2652RB is a BAW (crystal-less) device. CC26x2R (i.e. CC2642R, CC2652R) devices require crystals. As a result CC2652RB and CC26x2R are not binary compatible. This difference in the binary is what lead to the issue with the mobile application.

    3- You are correct, the BIM handles the image validation/verification procedure. Two options exist for the BIM - "secure" and "unsecure". BLE5-Stack 2.02.00.00 (part of SDK 4.40) implemented secure OAD and this is now the default configuration. If you prefer to use non secure OAD, please refer to our documentation.

    Your concern is valid. However, this would not happen with your product. First, I am sure you are running OAD tests in a lab before attempting any OAD operation on the field. Second, as I mentioned before, the image flashed on the Launchpad comes from a fairly old SDK version. The BLE stack has known significant changes since the out-of-the box image was built. This leads to some incompatibility between BIM and images (here is an example). In these cases we do provide workaround. So why does it fail anyway with the mobile phone? Because this mobile app is an example. The app should verify the BIM version running  on the device and attempt OAD with an image built slightly differently based on it. 

    I hope this will help, please let us know if you have more questions.

    Best regards,