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-EM-CC2340R5: OAD would fail when bonded first

Part Number: LP-EM-CC2340R5
Other Parts Discussed in Thread: UNIFLASH, CC2340R5

Tool/software:

Hi Expert,

after my phone bonds with evm then OAD, OAD would be failed and evm cannot work anymore until flashing fw again with uniflash.

test condition:

Iphone 15

Simplelink connect app: 2.0.2

Sdk:  v9.11.0.18, basic_ble_oad_onchip_LP_EM_CC2340R5_freertos_ticlang

Procedure:

  1. program the basic_ble_oad_onchip_LP_EM_CC2340R5_freertos_ticlang fw from sdk 9.11.0.18
  2. Simplelink connect app can find  and connect "Basic BLE project" device
  3. Click "characteristic 5" and bond to device

5.setting OAD as below

6. after clicking "Update", it would show below.

7. Reset the evm and scan the device. it only find  Persistent_app.

8.connect and try OAD. it shows error below.

9. after press the reset button, it shows same error as item 6.

i can only recover the board by using uniflash, programming the fw and forget the device in my phone.

If I don't do bond with evm first, no issue for OAD.

Any idea what happens and how to fix it?

BR,

frank

  • Hi Frank,

    Thanks for the details.

    If I don't do bond with evm first, no issue for OAD.

    Since Bonds are written to internal flash, and OAD is also writing to internal flash for the onchip project I suppose this could be related.

    One thing to test, could the device try to remove the Bond once it detects OAD happening? Or what if you remove the Bond first (triggered by button press), and then afterwards start the OAD?

    Thanks,
    Toby

  • Hi Frank,

    Can you confirm how you are flashing the device and at which address? Have you modified your mcuboot to match the addresses used by the basic_ble project and to operate in the expected OAD scheme (on-chip, dual image, offchip)?

    Best Regards,

    Jan

  • Jan,

    i don't change anything.

    I follow readme.

    Open UniFlash and load the files through the Program window. Flash the files as explained below:

    • BLE OAD On Chip:
      • mcuboot_onchip_xxx_xxx.hex - Load Addr: AUTO
      • basic_persistent_xxx_xxx.bin - Load Addr: 0x00006000
      • basic_ble_oad_onchip_xxx_xxx.bin - Load Addr: 0x00032000

    mcuboot_onchip_xxx_xxx.hex is from prebuilt image.

    basic_persistent_xxx_xxx.bi is from example project "basic_persistent_LP_EM_CC2340R5_freertos_ticlang".

    basic_ble_oad_onchip_xxx_xxx.bi is from example project "basic_ble_oad_onchip_LP_EM_CC2340R5_freertos_ticlang"

    BR,

    frank

  • Jan,

    Any update for this issue?

    BR,

    frank

  • Hi Frank,

    My apologies on the delay here. Can you try building your own MCUBoot configured for on-chip and verifying that the persistent address, app address and OAD address are set to what we expect?

    Best Regards,

    Jan

  • Jan,

    I don't get  your point. I set as readme and there is no issue without binding.

    • BLE OAD On Chip:
      • mcuboot_onchip_xxx_xxx.hex - Load Addr: AUTO
      • basic_persistent_xxx_xxx.bin - Load Addr: 0x00006000
      • basic_ble_oad_onchip_xxx_xxx.bin - Load Addr: 0x00032000

    not sure what you want to try?

    BR,

    frank

  • Hi Frank,

    Can you confirm that the app image slot configured for both persistent and mcuboot matches the 0x00032000?

    Best Regards,

    Jan

  • Jan,

    I don't get your question.

    • BLE OAD On Chip:
      • mcuboot_onchip_xxx_xxx.hex - Load Addr: AUTO <= file is from \simplelink_lowpower_f3_sdk_9_11_00_18\examples\rtos\LP_EM_CC2340R5\ble\prebuilt_hexfiles
      • basic_persistent_xxx_xxx.bin - Load Addr: 0x00006000 <= binary file is the built result from example project \basic_persistent_LP_EM_CC2340R5_freertos_ticlang\Release\basic_persistent_LP_EM_CC2340R5_freertos_ticlang.bin
      • basic_ble_oad_onchip_xxx_xxx.bin - Load Addr: 0x00032000 <= binary file is the built result from example project \basic_ble_oad_onchip_LP_EM_CC2340R5_freertos_ticlang\Release\basic_ble_oad_onchip_LP_EM_CC2340R5_freertos_ticlang_v1.bin

    if app image, persistent, mcuboot image cannot fit in above, uniflash would show warning, right?

    nvs setting in basic_ble_oad_onchip_LP_EM_CC2340R5_freertos_ticlang

    BR,

    frank

  • Hi Frank,

    Thank you for reporting this. I was able to reproduce the same behavior on my side. I ran a few different tests and got the following result

    1. iPhone 15 Plus iOS 18.5 - No Bonding - OAD Success

    2. iPhone 15 Plus iOS 18.5 - Bonding - OAD Reset Failure

    3. Pixel 9 Pro XL Android 15 - No Bonding - OAD Success

    4 Pixel 9 Pro XL Android 15 - Bonding - OAD Success

    This seems to be an issue specifically with the iOS version of the mobile app. I will file a ticket to get this addressed ASAP.

    Best Regards,

    Jan

  • Hi Frank,

    For tracking purposes, the ticket is SLMAPP-289.

    Best Regards,

    Jan

  • Jan,

    any update?

    BR,

    frank

  • Hi Frank,

    I confirmed with the mobile app developers and they have verified that this is an iOS problem. It is related to how iOS handles the BLE cache information. As mentioned in the picture you attached to step 6, the solution is to restart BLE on the iOS side.

    Best Regards,

    Jan

  • Jan,

    I turn off IOS BLE, restart the app and power cycle the evm. I repeat step 5. It still fails at step 6.

    The way can fix this is to forget the device "persistant_app". By the way, I only bond with "Basic_BLE". The App\ iPhone would change it when I process the OAD.

    So, any method to avoid this?

    BR,

    frank

  • Hi Frank,

    I believe this has to do with how the iOS device handles caching. I have made a note of this in  the ticket filed for this issue.

    Best Regards,

    Jan

  • Jan,

    if customer doesn't really need to bonding the device, they just want to have passcode to limit the access from any central device.

    Is that ok to uncheck above or other suggestion?

    It works for OAD.

    BR,

    frank

  • Hi Frank,

    That should be enough to save the bonding process but retain the pairing procedure.

    Best Regards,

    Jan