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.

CC1350: Writing sensor caliberation Values in non volatile memory with Ti 15.4 stack

Part Number: CC1350

Hi,

    I am using cc1350 and running TI 15.4 stack sensor_cc1350lp example on it . I am using a temperature sensor which needs to be calibrated one time for sensitivity and offset.I want to store those value in the NV memory.

So far I disabled the NV restore from the stack example and I am able to write it in the NV memory using NV_write and NV_read function.But I am bit confused about how to deal with the scenario when NV_RESTORE is in picture.How should I keep a track of where the data should be written write now my offset is zero as those values are the only values which are being written but In case of NV restore there will be more information in the NV.

Please suggest how to deal with this scenario.

Thanks And Regards

Stuti

  • If you enable NV_RESTORE you should use the same driver as the stack is using . You can use as an example the function "Ssf_networkUpdate" on how to write data in Non Volatile memory and also you can use as reference the function "Ssf_getNetworkInfo" on how to read data from NV. You can use any NV ID higher than 0x0007(SSF_NV_OAD_ID) and for the system ID you should always use "id.systemID = NVINTF_SYSID_APP"

    Also you can take a look at the NV memory section in the users guide dev.ti.com/.../application-overview.html
  • Hi,
    I am using the same driver. My issue is that how will I know the address where the network info is store because I should not overwrite that data while writing the calibration value. As I said I am successfully able to read and write when I am not using NV_RESTORE using the same driver.I am having issue tracking the address.


    Thanks And Regards
    Stuti
  • if you use the NV driver the example is already using you dont need to know the address where things are stored. You just assign an ID to the data that you want to store and the driver will find that specific item. you can either refer to the documentation or the functions that I mention to use as a reference on how to use it. Also this driver takes care of not overwriting any other information stored in NV as long as you use an NV ID higher than 0x0007
  • you should be using the APIs pNV->readItem and pNV->writeItem to read and write data to NV memory and not NV_read, and NV_write
  • Is it possible to keep using NV_read and write data which I want to store and use the pNV library for NV_RESTORE?

    Regards
    Stuti
  • Yes you can but you would have 2 separate flash pages, one for the pNV driver and the other NV driver. the reason for this is that the pNV driver uses its own headers and way of finding items and writing to the same page using NV_write will cause problems or corrupt data