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: Z-Stack 3.0 CC2538 OTA IMAGE A firmware don't work correctly(may be a Z-Stack 3.0 bugs)

Part Number: CC2538
Other Parts Discussed in Thread: Z-STACK

Our need OTA feature in CC2538 Cotex-M3 with Z-Stack 3.0,but the bootloader(Image Boot Manager) don't work.

It is well know that  OTA Boot and Client applications can be combined into a single .hex image file suitable for the TI Flash Programmer.We reference the Z-Stack OTA Upgrade User’s Guide documents,test on \CC2538\SampleSwitch.eww IAR project ,the built final *.hex image file download successful with SmartRF Programmer2 studio,but the application can't be run.

 

1. The Image Boot Manager project resides in default installed directory "C:\Texas Instruments\Z-Stack 3.0.0\Projects\zstack\OTA\Boot\CC2538\Boot.eww",this project can't debugger correctly in CC2538 soc if not modify any source code(The default built image size is 912 Bytes named Boot.bin).

2. We add the following source code in Boot.eww project correspond C source file startup_ewarm.c,rebuild the project,debugger can be run in main entry point.I guess the bootloader is correctly built,but the Boot.bin image size is so big that can't be combined with Application image(We test on SampleSwitch.eww,it encounter the built stage error)   (add the .cca segments code,Boot.bin image size is 2016 Bytes)

typedef struct
{
  unsigned char ulImageBackdoor[4];  // Note that the backdoor configuration is in the MSB.
  unsigned long ulImageValid;
  unsigned long ulImageVectorAddr;
} lockPageCCA_t;

// Create section for Customer configuration area in upper flash page.
__root const lockPageCCA_t __cca @ ".cca" =
{
  // If required use the following values to enable the backdoor for
  // Port-A, Pin-7, active low within 10-usec after reset to force boot.
  // { 0xFF, 0xFF, 0xFF, BACKDOOR_ENABLE_BIT | 0x07},
    
  {0,0,0,0},                    // Initial values, backdoor disabled  
  0x00000000,                   // Image valid field.
  (unsigned long)__vector_table // FLASH_BASE    
                                // Vector table located at flash start address.
};

3. How to resolve this intractability problem?

  • I don't understand why Boot.bin be filled so much NULL(0x20) blank charactor that it size more than 2000 Bytes.

  • Hi Hold li,

    Please look at the Z-Stack OTA Upgrade User’s Guide in the section 3, the document is in Z-Stack 3.0.0\Documents. 

    For example you can try with the sample switch by flashing your device with "Router – OTAClient – ImageA – withBootloader". This device will have the OTA client running so automatically will look for a server and ask for updates periodically. Then generate the image that will be used by the server with the project "Router – OTAClient – ImageA", by default a binary named "BEBE-2538-AAAA0000.zigbee" in the path HomeAutomation\SampleSwitch\CC2538\Router - OTAClient - ImageA\Exe.

    Now for the OTA server look at section 3.2.4. Try flashing the coordinator for example, open the serial boot tool, select the .zigbee binary and configure the coordinator COM as follows:

    • 115200
    • no flow control
    • no parity
    • one stop bit
    • 8 data

    To start the network press the Up button. Then look at the Z-Stack 3.0 Sample Application User's Guide to see how to start the sample switch. Once joined the sample switch will look for the server and the update process will start short after and will take several minutes to complete.

    I hope this helps.

    Regards