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.

CC1352P: Zigbee BIM/OTA Update

Part Number: CC1352P

I'm attempting to implement the OAD/OTA on a new piece of hardware (not launchpad).  It is failing because the BIM expects there to already be a valid Factory New image in the external flash.  

Important

SimpleLink CC26x2R1CC1352R1 and CC1352P_2 LaunchPad boards come out-of-box with BLE project zero sample app flashed. This sample application, as part of its initialization process, will create a default Factory New image into the external flash of the LaunchPad. Zigbee OTA application assumes that any Factory New image exist, as the downloaded image will be stored as the second image available (right after Factory New image). If no Factory New image exists, the OTA Client will abort the upgrade process.

Can I bypass this check? How do I get my Zigbee Factory New image into the external flash?

  • Hi Bill,

    Please see this most recent thread on the subject: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/818274/

    We recognize that this functionality needs to be more clearly addressed inside our documentation and resources.

    Regards,
    Ryan

  • This link really doesn't seem answer my question.  I see the same hanging up of the download at 4%, but that's because there is no FN image in the external serial flash.

    Here's the code in zcl_ota.c where it aborts.

    /* Zigbee OAD assumptions:
    * Factory New Metadata and binary image exist in external flash.
    * Zigbee OAD will always take the next slot available after FN header and binary
    */

    if(flash_open() != 0)
    {
    //Search for a metadata header to fit the Zigbee image
    ExtImageInfo_t oad_imgHdrFactoryNew;

    //OAD binary pages required to store the binary
    uint8 binaryPagesLen = 0;

    // Read the factory new metadata page
    readFlash(EFL_ADDR_META_FACT_IMG, (uint8_t *)&oad_imgHdrFactoryNew, EFL_METADATA_LEN);

    //is a valid header
    if(memcmp(&oad_imgHdrFactoryNew.fixedHdr.imgID, oad_externalFLashID, sizeof(oad_externalFLashID)) != 0)
    {
    flash_close();
    //This release does not support not having the Factory New image
    return ZCL_STATUS_ABORT;
    }

    My question is how to get around this issue?

  • I did not provide the best link, this is the most relevant: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/763735

    So you can choose to ignore the OTA header image validation or erase the existing external flash image with <SDK_DIR>/examples/rtos/CC1352R1_LAUNCHXL/easylink/hexfiles/offChipOad/ccs/erase_storage_offchip_cc13x2lp.hex (designed for the same external flash used on LaunchPads) and reference the "OAD with BLE" section of the rfWsnConcentratorOadServer example README which uses the BIM to copy the internal flash image to the external flash device for use as the factory image.

    Regards,
    Ryan

  • Hi Ryan,

    Looks like this previous post was the same issue.  I went ahead and disabled the check and it does work.  I will look into the rfWsnConcentratorOadServer example to see how to create a factory new image.

    --------------------------------------------------

    We also see an issue in the code that we'd like a comment on....

    There are two places in ota_client_app.c that have this #if statement... (around lines 441 and 804)

    #if defined (OTA_STANDALONE) || (SWITCH_OTA)

    This does not work.  Either it should be written like this:

    #if defined (OTA_STANDALONE) || defined (SWITCH_OTA)

    or

    In the Properties-->Compiler-->Predefined Symbols use SWITCH_OTA=1

    or

    the containing code is not required and can be removed. 

    We're choosing to do option 1, but would like verification that the code should be included.

    Thanks,

    - Bill

  • Hi Bill,

    Thank you for the feedback.  You are correct about SWITCH_OTA, however it (or OTA_STANDALONE) is not needed by OTA client projects any more and can be removed entirely.  I've alerted the SW Teams and will revise the documentation accordingly.

    Regards,
    Ryan