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.

CC2642R: Onchip OAD - FOTA

Part Number: CC2642R
Other Parts Discussed in Thread: UNIFLASH

Hi 

We are trying to upgrade the firmware through BLE. For that
1)We checked the failure case like while flashing the image through BLE , we disconnected the BLE In that case, since we are erasing and writing at this point device is going to NULL state i.e not able to again connect it , device is not even showing in the scanninglist

Can you confirm the above case is correct and expected

  • Hello Divya,

    Can you clarify some details on your application? Which SDK are you using?

    There are more details in the Over-the-Air Download (OAD) section of our User's Guide. In short, the failure case should be covered in the on chip example. Did you flash the board with the persistent application, the BIM, and the on-chip OAD application? In the case of the failure, the BIM will automatically boot into the persistent application upon the next reset.

  • Hi Ammar N

    We are using simplelink_cc13x2_26x2_sdk_5_20_00_52 this sdk

    Yeah the failure case which you have mentioned i also checked that. But i need to know like if the upgrade has been started and before completion if any connection is disconnected meaning if BLE is disconnected then we analyse that the device is going to an undefined state and only if we flash again through debugger its working fine

    Can you please confirm whether this will happen?

    As of i know before writing the new image we are erasing the old one and so only if the connection is disconnected its going to NULL state
    Correct me if i am wrong   

  • Hey Divya,

    I'm having trouble understanding, are you raising an issue or trying to understand expected behavior? If raising an issue, can you rephrase?

    If the connection is disconnected during the transfer, the incomplete image is not transferred and will not be copied. If the target image is complete and passes a CRC check, it will then be copied in place of the application image. In either failure case, for an on-chip OAD, the persistent image is untouched and is the backup. The persistent image remains on the device and is not overwritten by an OAD.

  • Hi Ammar

    Okay but the issue we are facing is,

    When connection is disconnected inbetween the OAD image transfer and after reboot also my device is not even advertising.
    Only if i flash again using debugger it is advertissing

  • Hey Divya,

    Thanks for the information. Does this occur on the default example? What modifications, if any, have you made to the example?

  • Yeah this is happening with the default example
    We have not made any changes in the code

    simple_peripheral_oad_onchip_CC26X2R1_LAUNCHXL_tirtos_ccs we are using this example code along with the persistant app and BIM

  • Hey Divya,

    Using SDK 6.10, I've verified that the device is able to recover successfully into the persistent app after a reset. As soon as the OAD has started, I turn Bluetooth off on my phone to simulate the disconnect. Can you outline the steps you are following to reproduce the issue?

    For reference, here is a link to our guide on Setting up the OAD.

  • Hey Ammar N

    Steps which we follow

    After compilation of bim,persistant app and on-chip OAD
    1) We are flashing all the three in hex format at a time using the smart rf flashing programmer

    2) Once flash is done, we are connecting the device through BLE from nrf app and writing the characteristic value as 01 to change to the persistant mode

    3)Now we are switching to the simplink starter app and connect it from here 

    4) Going inside the ti-OAD service

    5) selecting the custom FW and tried with the default factory FW 

    6) Downloading is in the process and at 20% i am disconnecting the BLE 

    7) I am trying to reboot and try again but even after clicking the reboot buttom from evk i am not able to reboot. Means no response from the device.
    BLE adv is also not happening

  • Hey Divya,

    1) We are flashing all the three in hex format at a time using the smart rf flashing programmer

    I suspect an issue with this step. To confirm, can you try to reset the board after step 1? If the device does not reboot properly, then this is the issue.

    Please take a look at our OAD Target Setup Guide in our User's Guide. You cannot flash the hex version of the application/persistent image as these images do not contain the OAD header information. You must use the binary files for the application/hex (as such you will have to use Uniflash to flash all 3 in one step, SmartRF Flash Programmer does not support mixing a hex with a binary when flashing). The BIM project does not have signing information so in this case you can use the hex file.

    EDIT: forgot to add the link to our User's Guide.

  • Hi Ammar 

    We tried with this user guide steps also
    We are facing the same problem only

    • Uniflash must be used to flash the _oad.bin persistent image that is produced by the oad_image_tool or the device will not boot after a reset. When flashing the persistent image .bin file, you must specify the binary load address as the starting address specified in the persistent application project’s linker file. By default, this is at address: 0x00038000.

    For the above point whether while flashing the persisitant app we need to pass the binay load address in uniflash
    Its not required right? 
    I checked the code also the default address was there

    Can you please help 

  • For the above point whether while flashing the persisitant app we need to pass the binay load address in uniflash
    Its not required right? 

    This step is required. The persistent image is authenticated by the oad image tool and the BIM will not boot into an unsecure image.

    I checked the code also the default address was there

    I'm not sure what you mean, the .map file that's generated by the persistent image indicates the start location of the FLASH_IMG_HDR, which is at 0x00038000.