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.

CC2652R: Custom OSAL Nonvol Tokens

Part Number: CC2652R

Tool/software:

Hello,

We have an application that uses the SimpleLink CC13x2 26x6 SDK v4.20.01.04.  We recently added a few custom nonvol tokens using the OSAL SNV system.  We have two tokens in particular that are large structures - about 110 bytes each with potential to grow a little more in the future.  From a document here, in Listing 30, it sounds like our application tokens must use ID values between 0x80 and 0x8F.  Is that correct?

Today I ran across a bunch of NV item IDs in the zcomdef.h file (lines 212-226), including the following:

  • #define ZCD_NV_LEGACY_NWK_SEC_MATERIAL_TABLE_END   0x0080
  • #define ZCD_NV_USERDESC            0x0081
  • #define ZCD_NV_NWKKEY                0x0082
  • #define ZCD_NV_PANID                     0x0083
  • #define ZCD_NV_CHANLIST              0x0084
  • #define ZCD_NV_LEAVE_CTRL         0x0085
  • #define ZCD_NV_SCAN_DURATION 0x0086
  • #define ZCD_NV_LOGICAL_TYPE     0x0087
  • #define ZCD_NV_NWKMGR_MIN_TX 0x0088
  • #define ZCD_NV_NWKMGR_ADDR   0x0089
  • #define ZCD_NV_ZDO_DIRECT_CB  0x008F

Obviously, this made me question my understanding from the documentation that we could use the NV token ID space from 0x80 to 0x8F and not have any conflicts.  It seems that writing to my tokens with ID 0x80, 0x81, 0x82, etc could very well be conflicting with these and causing corruption, right?

If that is the case, is there an ID space I can use for my application tokens that will not run into conflicts with the stack?  This file has dozens of token IDs, and some seem to overlap each other too (ZCD_NV_EX_ADDRMGR, ZCL_PORT_SCENE_TABLE_NV_ID, ZCD_NV_EXTADDR all == 0x0001).  What am I misunderstanding about the documentation and the OSAL SNV ID system?

Thanks,

Damon

  • Hello Damon,

    Here is the Zigbee User's Guide you should be referencing for the SDK you are using.  Within it you can find the Application Non-Volatile Memory section which will demonstrate how to use custom NV memory IDs for your purposes.  Basically use nvId.systemID of NVINTF_SYSID_APP and a custom-defined nvId.itemID when calling NVINTF_nvFuncts_t NV driver functions.  The Door Lock is a good example to copy from.

    Regards,
    Ryan