• Resolved

CC2652R: DMM: ZR + BLE, with OAD on Zigbee Stack rather than BLE

Intellectual 595 points

Replies: 8

Views: 77

Part Number: CC2652R

Hi,

I was wondering what changes would be needed if I have to support the OTA update through Zigbee stack rather than the example BLE.
SDK 4.20 on CC2652R launchpad.

Thanks
Akhilesh

  • Hi Akhilesh,

    You can perform a difference compare between the Zigbee Application files of dmm_zr_light_remote_display_app and zr_sw_ota_client along with referencing the Adding Client Functionality to an Application section of the Z-Stack User's Guide.

    Regards,
    Ryan

    To better aid the community, please click on the "This Resolved my issue" button whenever a post answers your question!

  • In reply to Ryan Brown1:

    Hi Ryan,

    I have already implemented and tested the OTA on an interdependent zigbee application. So would just porting that functionality to the DMM zigbee stack suffice ?

    I have observed that I will also have to make the DMM policy changes to give priority to Zigbee application during OAD, since in the example application there is a policy adding weight to BLE during OAD.

    I am comparing the policies, but was wondering how the DMM would decide that which policy would be applicable and if I have to do anything to trigger the policy.
    Please could you also share any guide on how policies and weights should be set over the default GPT.

    Thanks
    Akhilesh

  • In reply to Akhilesh Premkumar:

    Hi Akhilesh,

    If you view the zcl_sample*.c/h files between DMM and standalone Zigbee projects then you will see that they are identical, and as such the process for adding OAD functionality will be very similar.  You can reference the DMM User's Guide and SimpleLink Academy Labs to understand more about creating and managing policy tables.  The DMM Runtime API (particularly DMMPolicy_updateStackState) will be essential for changing states during operation.

    Regards,
    Ryan

    To better aid the community, please click on the "This Resolved my issue" button whenever a post answers your question!

  • In reply to Ryan Brown1:

    Hi Ryan,

    I referred to the Adding Client Functionality to an Application guide and am trying to implement the same changes on DMM. However I observed that the sample BLE(OAD)+ZR dmm app does not a .cmd file.
    In the above guide, it does mention replacing the cc2652lp.cmd with cc2652lp_ota.cmd, which has some additional changes with the memory map.

    *the BLE+ZR, non-OAD, example has a .cmd file.

    Is this file required, if yes, please could you suggest what changes I should make in the same for BLE+ZR(zigbee - OAD) ?

    Thanks
    Akhilesh

  • In reply to Akhilesh Premkumar:

    Hi Akhilesh,

    If you go to the Project Properties -> Build -> ARM Linker -> Include Options then you will find that cc26x2_app_oad_agama.cmd is included for dmm_zr_switch_remote_display_oad_app as a command file input.  All project require a linker configuration file in order to allocate memory sections.

    Regards,
    Ryan

    To better aid the community, please click on the "This Resolved my issue" button whenever a post answers your question!

  • In reply to Ryan Brown1:

    Hi Ryan,

    Thanks, I got it working using the command and cfg from zr_client_ota example.
    I still need to test the whether the zOTA works.

    However which testing I observed that for bim_offchip project(debug_unsecure configuration), the Bim_revertFactoryImage does not seem to working correctly. Not sure if I'm making a mistake here. But the same is happening even both the sample Project_zero and zr_sw_ota_client examples.

    I forced a factory image write on both by performing a compare on techType in the corresponding oad.c(project_zero) and ota_client_app(zr_sw_ota_client)

            /* check BIM and Metadata version */
            if( (metadataHdr.fixedHdr.imgType == OAD_IMG_TYPE_FACTORY) &&
                (metadataHdr.fixedHdr.crcStat != CRC_INVALID) &&   /* Not an invalid CRC */
                (metadataHdr.fixedHdr.techType == OAD_WIRELESS_TECH_BLE))  //(metadataHdr.fixedHdr.techType == OAD_WIRELESS_TECH_ZIGBEE)
            {
                rtn = TRUE; /* Factory image exists return from here */
            }


    I programmed both interchangeably to test this. This seems to get added correctly.
    However holding Button_Left on both the projects, resets to factory image, but the application does not start.

    Debugging bim_off project, I observed the following in this case,

    If i skip the internal Flash check(commented below), and use revert to factory image, the prgEntry is correct and the program loads as well

    //    /* First try finding a valid image on off-chip flash */
    //    if( !(retVal = checkImagesExtFlash() ) )
    //    {
    //        /* Could not find valid image on off-chip Flash.
    //         * Try finding application image on on-chip flash and jump to it */
    //       checkImagesIntFlash(0);
    //    }
    
        /* BIM is not able find any valid application, either on off-chip
         * or on-chip flash. Try to revert to Factory image */
        Bim_revertFactoryImage();



    However, when I perform the On-chip flash image check, the prgEntry is identified correctly but the application does not seem to start(I'm using an led to indicate start up).

    Please could you suggest why this is happening  or is there a bug? This shouldn't affect by OTA test but just wanted to get sorted out.

    Currently using cc22652 LP, SDK 4.20.01.04. Tried on Project_Zero and zr_sw_ota_client.

    Thanks
    Akhilesh

  • In reply to Akhilesh Premkumar:

    Do you have a valid image programmed to the external flash?  Please refer to the following important note and BIM OAD off-chip procedure.  Resetting with BTN-1 held down for over five seconds on Project_Zero will invalidate the current on-device image so that the factory image on the external flash is restored.  Holding both buttons during reset over the same amount of time will erase the external memory.  The zr_sw_ota_client projects do not have this similar application capability by default but the important note shows how a zigbee OTA image can be stored onto the external flash device.

    Regards,
    Ryan

    To better aid the community, please click on the "This Resolved my issue" button whenever a post answers your question!

  • In reply to Ryan Brown1:

    Hi Ryan,

    Thanks. Got it working now.

    Thanks
    Akhilesh