CC2652R7: On-chip OAD fails in SimpleLink Connect but succeeded in btool

Part Number: CC2652R7
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG

Tool/software:

Hi Team,

I am developing a firmware with on-chip OAD added, similar to the post (LAUNCHXL-CC26X2R1: CC2642R1 BLE OAD : simple peripheral OAD ON Chip, the OAD process didn't start - Bluetooth forum - Bluetooth®︎ - TI E2E support forums), I can use btool to do the OAD update successfully, but failed with the simple link connect app, which it always mentioned 'OAD reset failed'. After that I found that the device entered the persistent app, I can connect it again to continue my update. 
But when I use btool, OAD was successful when every time I tried to update.

I am using 'simplelink_cc13xx_cc26xx_sdk_7_40_00_77' for my CC2652R7, could you help with this? Thanks a lot!

Best,

Jermyn

  • And here is the screenshot, I try to update with my firmware which can be successfully updated in btool:

    After the failure, I found that the device is advertised as persistent App:


    In this situation, OAD progress started 

  • Hi !

    The error you're seeing happens when the device rebooted but the SimpleLink application could not re-connect to the device (See code responsible for this error message here). There could be multiple reasons why the SimpleLink app is unable to re-connect, the first one that comes to mind is that the pairing information in the NVS for your application and for the permanent app are not the same.

    Could you try the following steps :
    - Do a OAD process with BTool and send the logs that BTool produce ? 
    - Tell me if you changed anything in the OAD code for your application, or in the permanent application ?
    - Show me how you flash your application in UniFlash ?
    - Show the settings you have in SysConfig for the NVS address ?
    - Finally, does OAD work using the OAD example in the SDK ?

    Kind regards,
    Maxence

  • Hi Maxence,

    Thank you for your quick reply.

    1)Here is the log file:on_chip_OAD_btool.txt

    2) No, I just used the codes from Bluetooth Low Energy Enhanced Over the Air Download (OAD) Advanced — CC13XX CC26XX SimpleLink Academy

    3)Here is how I flashed the application. I followed the rule :

    CC2652R7 (TI BIM):
    Onchip OAD:
    0x00 -> ble5_simple_peripheral_oad_onchip_public_address_cc26x2r7_iar_FlashROM_Release_oad.bin
    0x86000 -> ble5_persistent_app_cc26x2r7_iar_FlashROM_Release_persistent_oad.bin
    AUTO(0xae000) -> ble5_bim_onchip_cc26x2r7_iar_Release_bim.hex

    from simplelink-connect-fw-bins/CC2652R7/README.txt at main · TexasInstruments/simplelink-connect-fw-bins · GitHub

     

    4)Her is the NVS settings which mention from simplelink_academy

    5)Here is using the .bin file from server

    Here is using the file from CCS resource explorer out of the box on_chip_OAD example

     

    Both files were failed to do the update.

    Could you help to have a look, thank you so much.

    Best,

    Jermyn

  • Hi Jermyn !

    I think I have the solution to your issue. The SLA was made for the CC26X2R1_LAUNCHXL devices as the example. As you correctly pointed out, the flash memory layout for the CC2652R7 devices is different :

    - The user application flash starts at 0x0
    - The permanent app is from 0x86000 to 0xAE000
    - The BIM is from 0xAE000 to the device's end (0xB0000)

    The reason why the layout is different is to give you more space for the user application, since the CC2652R7 has more flash than the the CC26X2R1 devices.

    When a OAD instruction is given to the user application, it reboots into the permanent application. It must then reconnect to the central that gave this instruction over BLE. To seamlessly reconnect, it must used the bonding information from the user application, which are stored in the NVS. The NVS has to be shared between the permanent app and the user application in order for the permanent app to correctly bond.

    On the SLA for the CC26X2R1_LAUNCHXL devices, the address of this shared NVS is from 0x34000 to 0x38000. However, for the CC2652R7, this shared NVS is from 0x82000 to 0x86000.

    In the screenshots you shared for your application, both the NVS values are wrong, as the need to follow the values specific to the CC2652R7, which are as follows :

    This should fix your issue. If you want a reference example of how to do OAD for your device, you should look at the SysConfig values for the following examples :
    - persistent_app_LP_CC2652R7_tirtos7_ticlang
    - bim_onchip_LP_CC2652R7_nortos_ticlang
    - simple_peripheral_oad_onchip_LP_CC2652R7_tirtos7_ticlang

    Kind regards,
    Maxence

  • Hi Maxine, 

    Thanks for your reply. I will try it out!

    Thanks for your suggestion, it is helpful, I will dive into the SysConfig values for the example of CC2652R7.

    Best regards,

    Jermyn

  • Hi Maxine,

    I found that there is still failed to update in the simplelink connect app.

    The NVS has to be shared between the permanent app and the user application in order for the permanent app to correctly bond.

    On the SLA for the CC26X2R1_LAUNCHXL devices, the address of this shared NVS is from 0x34000 to 0x38000. However, for the CC2652R7, this shared NVS is from 0x82000 to 0x86000.

    As you mentioned, I changed the NVS address, and I checked that the persistent app NVS address is the same as you mentioned and is the same as what I used in my firmware.

    But this time when I tried to update via the app, it shows this

    I also review the syscfg in the out of the box simple_peripheral_oad_onchip_LP_CC2652R7_tirtos7_ticlang example and most of them should be the same. But I change the pairing mode for our own purpose:

    From the codes you shared here, it seems the issue is related to 

    peripheralId,
    UUID.OadServiceUuid,
    UUID.ImageIdentifyWriteUuid

    And I am using the app via IOS, could you help me have a look? Thanks a lot.

    Best regards,

    Jermyn

  • Hi !

    Does the device reboot into persistent app and can you see it on your SimpleLink Connect app ? If yes, do you see the OAD service in the app when connecting to the persistent app ?

    Kind regards,
    Maxence

  • Hi,

    Yes the device reboot into persistent app, I can select the OAD update, but this time when I try to update from persistent app, it first ask me to manually reset the device, after I reset it, then it said the same ‘OAD service not found’.

    Best regards,

    Jermyn

  • Hi !

    Did you change the NVS values for both the application and the permanent application ?

    Kind regards,
    Maxence

  • Hi,

    I followed your suggestion to change my application’s NVSINTERNAL and NVSINTERNAL1 address as you showed in the picture, and I checked the out of the box permanent app( persistent app)’s NVSINTERNAL and NVSINTERNAL1 address, I didn’t changed it, it is already the same as you showed in the picture.

    Which both my application and permanent application are:

    NVSINTERNAL

    Region base: 0x820000

    Region size: 0x4000

    NVSINTERNAL1

    Region base: 0x0

    Region size: 0x82000

    Sorry that my device is not by my side and I am not able to take a screenshot now. Thanks a lot.

    Best regards,

    Jermyn

  • Hi Maxence.

    Here is the screenshot for NVS in persistent app:

    Here is the NVS address in my firmware:

    Does the device reboot into persistent app and can you see it on your SimpleLink Connect app ? If yes, do you see the OAD service in the app when connecting to the persistent app ?

    But this time I have a finding:

    After I try to update from my application, the interface switch to this:

    if I continue to update, it will show

    then after resetting it will show:

    But then I found that the interface is weird, the name is 'persistent app' but the services are the same as my own application.

    Then I try to forget the device and reconnect, it becomes the real persistent app interface:

    This time the update is successful:

    I also found that for my application, the service is:

    but for persistent app, it is:

    This is what I found so far, hope the situation is clear enough. Thanks a lot.

    Best regards,

    Jermyn

  • Hi Maxence,

    May I know if there are any updates? Thanks a lot.

    Best regards,

    Jermyn

  • Hello Jermyn,

    Maxence is out of office for the next few weeks, so I will continue supporting this thread. 

    I have a few questions:

    1. Is this behavior consistent? As in, are you able to easily replicate it?
    2. Is this behavior seen with android devices? The reason I ask is because apple devices sometimes cache information, which may change upon performing an OAD update.

    Best Regards,

    Tarek D

  • Hi Tarek,

    Thanks for the reply. 

    1) Yes, this is the same when every time I use the OAD update.

    2)For my android device, it first asked me to manually reset the device, after that the progress started and was successful.

     

    Best regards,

    Jermyn

  • Hello Jermyn,

    Thank you for answering my questions! The manual reset I believe is expected behavior. However, as for the IOS issue, I fear this issue may be on the IOS side, where it's caching unnecessary information, which would explain why it starts working after you "forget" the device, which removes all bonding information from the phone.

    Please let me know if you have any more questions!

    Best Regards,

    Tarek D