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.

Coordinator SBL firmware update without loosing network

Other Parts Discussed in Thread: Z-STACK, CC2530

Hi,

I'm currently working on firmware update (cc2530, z-Stack 2.5.0) with the serial boot loader and I would like to preserve all needed information to not loose the network settings.

It would be very unconfortable to recommission the network after a simple firmware update.

Is there some information which flash-pages must not be overwritten and are these always the same (different z-Stack versions, ...)?

Thank you very much

Felix

  • When you enable a project to be downloaded via SBL by following the guide:

    C:\Texas Instruments\ZStack-CC2530-2.5.0\Documents\CC2530\Serial Boot Loader for CC253x.pdf

    And when you use the default SBL-enabled linker file specified:

    C:\Texas Instruments\ZStack-CC2530-2.5.0\Projects\zstack\Tools\CC2530DB\cc2530-sb.xcl

    You will see that the entire OSAL Non-Volatile memory area of flash pages is left untouched. Thus if you had built and run your project with NV_RESTORE and NV_INIT defined, the "new" coordinator will be using all of the network settings and associations of the "old" coordinator that was replaced with the serial boot loaded image.

    Specifically, look at the _nvBuf in OSAL_Nv.c:

    /*********************************************************************
     * GLOBAL VARIABLES
     */

    #ifndef OAD_KEEP_NV_PAGES
    // When NV pages are to remain intact during OAD download,
    // the image itself should not include NV pages.
    #pragma location="ZIGNV_ADDRESS_SPACE"
    __no_init uint8 _nvBuf[OSAL_NV_PAGES_USED * OSAL_NV_PAGE_SIZE];
    #pragma required=_nvBuf
    #endif // OAD_KEEP_NV_PAGES

    Thus you see that you can choose to preserve the old NV during a serial boot load or not by adding OAD_KEEP_NV_PAGES to the build options (or not) of the image that is to be downloaded.

  • Thank you for your answer!

    Just to clarify:

    Do I have to define OAD_KEEP_NV_PAGES or let it undefined like for the standard build?

    Edit: Ok, it looks like it is working without defining OAD_KEEP_NV_PAGES

    Thanks

    Felix

  • Hello Dirty Harry,

    I've try to build with and without OAD_KEEP_NV_PAGES, and download image through SBL. Both way established network with "old" NV information, like PANID, Network ID, etc. I'm not sure whether its functional.

    Is there any other approach I can do it? Can I erase whole 6 NV pages right before SBL perform in bootloader? Test prove it do can reset network parameter, but I'm not sure whether it has side effect.

    Regards,