CC2340R5: How to Preserve ZBoss Network Configuration in NVRAM During Development?

Part Number: CC2340R5
Other Parts Discussed in Thread: Z-STACK, SYSCONFIG

Tool/software:

Hello,

I'm working in our first production device with CC2340 and ZBoss stack, it is a port from a previous device that uses cc2651 and ZStack, so I have this reference.

During the development and debugging cycle, I'm finding that the Zigbee network configuration (stored in NVRAM) is erased every time I reload the program via CCS. This requires me to re-commission the device after each new reload, which is slowing down development.

In our previous projects, when working with the CC2651 and Z-Stack, the network configuration was preserved by default between program loads. I would like to achieve the same behavior with the CC2340 and ZBoss.

I've attempted to modify the flash settings in Code Composer Studio to prevent a full erase, as shown in the image below. However, this resulted in an error during the program load.

"Cortex_M0P: Flash loader: CC23xx_CC27xx_FLASH_LIBRARY_VERSION 4.1.0.141
The CCFG sector has not been erased. Writing to CCFG could fail.
File Loader: Failed to terminate flash programming: Error when programming CCFG - Command is not allowed due to restrictions
GEL: File: D:\projetos\ti\workspace_cad03\button_cad03ng_2.4ghz_cc2340\Debug\button_cad03ng_2.4ghz_cc2340.out: Load failed."

Could you please advise on the correct procedure to preserve the ZBoss network configuration in NVRAM between debugging sessions on the CC2340?

Thank you...

  • Hi Tiago,

    Please select the Chip Erase (retain sectors specified in CCFG) then open the SysConfig -> Device Configuration -> Flash Protection Settings and change the Erase/Retain, Main Sectors 32-255 for flash pages 254-255 (the default NVS pages determined by the NVS module in SysConfig, or by referencing the *.cmd or output *.map files).

    Above is an "over-protected" basic example.  Search for chipEraseRetain inside of the TRM to learn more.

    Regards,
    Ryan