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.

CC2538: Over the air upgrade on CC2538 ZC and CC2530 ZR though data coming to UART of CC2538 ZC

Part Number: CC2538

So the problem is this:

1. OTA guide available with zstack 1.2.1 home automation installer tells that "User must have an additional hardware which is connected to a PC, holding a special kind of binary file compatible with the OTA system to work, and then this additional hardware/dongle can update fw of any zigbee node in the network". Please correct me if i understood anything wrong here.

2. My system uses a wifi module talking to cc2538 ZC over uart. this wifi module takes data from mobile app directly via LAN or by remote webserver, this data is then sent to cc2538 which interprets and processes the commands to switch on/off any ZR in the network. Now I want the OTA system to work in a way that i can keep a copy of firmware meant for a ZR in the mobile app (or storage) and send this data to ZC so as to rewrite/update its Firmware. For this to happen, WHAT AM I SUPPOSED TO DO? 

3. If above point is possible and doable, how can i update the FW on all ZRs binded to the same ZC?

Thanks in advance!

Saurabh

  • Hi Saurabh,

    If I understand correctly, you basically wish to replace the OtaServer PC tool with your wifi module. This is possible after fully understanding the OTA Upgrade Cluster already existing on the OTA Dongle example and UART protocol that is used by OtaServer to control this information. Once you have a good understanding of the OTA_ProcSysAppMsg cases incoming from the console and OTA_Dongle_ProcessIncomingMsg incoming from the client ZRs and how the dongle handles each then you will be able to customize your wifi module software to become an OTA console itself.

    Regards,
    Ryan
  • Hi Ryan 

    Thanks for responding. Can you please confirm that following the approach you suggest will let me :

    1. Upgrade the FW on Coordinator (ZC) itslelf with which WiFi (Esp8266) is connected over UART.

    2. Upgrade the FW on all Routers (ZRs) on PAN belonging to the ZC mentioned in point number 1. 

    Thanks

  • 1. Yes, you can update CC2538 through backdoor boot loader which you can refer to processors.wiki.ti.com/.../CC2538_Bootloader_Backdoor
    2. For updating ZR/ZED in the network, ZC/ZR/ZED has to support OTA clusters.
  • Hi Yikai . Thanks . My objective is to implement point number 1 only . I did go through the link : processors.wiki.ti.com/.../CC2538_Bootloader_Backdoor . And i did see "Serial Boot Loader For CC2538 SoC
    Document Number: SWRA431 , Version 1.1" too and it has gotten me confused on where exactly to start from . Hope you can advice something.
    My esp8266 works with AT commands only. the ZC cc2538 communicates with esp module and i dont have possibility to change firmware on esp8266 ( i have but in that case i will have to rewrite the entire code running on cc2538), however, i can add custom AT commands in ESP module and use them if needed.
  • The CC2538 serial backdoor boot loader cannot be changed too. I suppose you have to implement your own serial boot loader if you cannot change FW on ESP8266.
  • Cant get to make application code execute with SBL_CLIENT flag enabled and doing everything as per the serial boot loader document . I am attaching the linker file content. Please help in diagnosing the problem. 

    
    
    
    
    
    //define symbol __ICFEDIT_size_cstack__ = 0x4000;
    define memory mem with size = 4G;
    
    //define region INTVEC = mem:[from 0x00200000 to 0x0020011B];
    define region SBL_CHECKSUM = mem:[from 0x0020011C to 0x00200133];
    
    define region FLASH = mem:[from 0x00200134 to 0x0027AFFF];
    
    define region NV_MEM = mem:[from 0x0027C800 to 0x0027F7FF];
    define region CP_IMPC_283 = mem:[from 0x0027FED4 to 0x0027FF1F];
    define region CP_CAPK_283 = mem:[from 0x0027FF20 to 0x0027FF47];
    define region CP_DEPK_283 = mem:[from 0x0027FF48 to 0x0027FF6B];
    define region CP_IMPC = mem:[from 0x0027FF6C to 0x0027FF9B];
    define region CP_CAPK = mem:[from 0x0027FF9C to 0x0027FFB3];
    define region CP_DEPK = mem:[from 0x0027FFB4 to 0x0027FFCB];
    define region CP_IEEE = mem:[from 0x0027FFCC to 0x0027FFD3];
    define region FLASH_CCA = mem:[from 0x0027FFD4 to 0x0027FFDF];
    define region FLASH_LCK = mem:[from 0x0027FFE0 to 0x0027FFFF];
    //define block CSTACK with alignment = 8, size = 0x4000 { section .stack };
    define region SRAM = mem:[from 0x20004000 to 0x20007FFF];
    define block HEAP with alignment = 8, size = 0x100 { };
    define exported symbol STACK_TOP = 0x20007FFF + 1;
    
    place at start of FLASH_CCA { readonly section .cca };
    place at start of CP_IEEE { readonly section IEEE_ADDRESS_SPACE };
    place at start of CP_DEPK { readonly section DEV_PRIVATE_KEY_ADDRESS_SPACE };
    place at start of CP_CAPK { readonly section CA_PUBLIC_KEY_ADDRESS_SPACE };
    place at start of CP_IMPC { readonly section IMPLICIT_CERTIFICATE_ADDRESS_SPACE };
    place at start of CP_DEPK_283 { readonly section PRIV_KEY_283_ADDRESS_SPACE };
    place at start of CP_CAPK_283 { readonly section CA_PUB_KEY_283_ADDRESS_SPACE };
    place at start of CP_IMPC_283 { readonly section IMPL_CERT_283_ADDRESS_SPACE };
    place in FLASH { readonly };
    place at start of SRAM { section VTABLE };
    place in SRAM { readwrite, block HEAP };
    
    
    
    
    
    initialize by copy { readwrite };
    do not initialize { section .noinit };
    
    
    place at start of SBL_CHECKSUM { readonly section .checksum };
    place in SBL_CHECKSUM { readonly section .image_status };
    
    do not initialize { section .stack };
    
    

  • Have you ever follow steps in processors.wiki.ti.com/.../CC2538_Bootloader_Backdoor to make it work with your CC2538?
  • I did go through it but did not follow it yet because to my understanding the first step is to flash the serial bootloader and then the application code compiled with modified linker file having checksum details and SBL_CLIENT flag enabled.
    I am stuck at the stage of getting my application code working.
    Do i need to enable backdoor to get the above mentioned problem resolved?
  • Serial bootloader is ROM code in CC2538 and you don’t have to download anything to make it work.