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.

RTOS/CC1352P: Non Volatile Memory Access and Restore

Part Number: CC1352P
Other Parts Discussed in Thread: UNIFLASH

Tool/software: TI-RTOS

Hi,

CC1352P - FH Mode - Collector code.

Is it possible to get the Network information( Like Sensor details, Security information, Number of Connected device etc) from the Non Volatile Memory using already available function. 

So, i can store Network information in external Flash and i will do the FOTA using UART.  

So, after FOTA at very initial time i can get back the network information from flash and again insert in Non Volatile memory of CC1352.

Is it possible to do like this?

if yes, then how?

if no, then how can i save network info even after flashing also?

Regards,

Anil.

  • Hello Anil,

    All of this is very possible. I would advice you to read our documentation on the NV module and our external Flash Driver APIs.
    All of this information can be found in dev.ti.com/tirex

    Regards,
    AB
  • Hi,

    i will check the NV module and our external Flash Driver APIs, and i will return back to you.


    As i took reference of e2e.ti.com/.../804788 this link. so there they are saying that we ca generate the .hex file without erasing the 41 and 42 sectors. do you have any Idea about it. so it will be easy method for flashing without erasing sensor data.

    Method 1) Take a backup of Data on 41 and 42 sectors(which is having sensor data) and then flash CC1352P module through UART and the write data back to 41 and 42 sectors.

    Method 2) Generate .hex file like that which will not erase the 41 and 42 sectors and sensor details remain in the collector code itself after Flashing a code also.

    Which is very easy method to follow and how to do it?

    regards,
    Anil.

  • Hello Anil,

    If you are saving sensor data in the NV, using the NV module/drivers, then it will not be replaced during OAD.

    If you look at the CMD linker file you will see that the last two pages are already reserved for sensor/network DATA (NVMODULE) and the CCFG.

    Regards,
    AB
  • Hi AB,

    Means according to you,
    even i generated .Hex file and flashed through UART, then it will not flash the NVRAM location where sensor data is stored. Actually i don't know where i am staring data in NVRAM. so that i asked.
    and even i don't know that .HEX will generate without those sections which have sensor related data.

    Already predefined FH code only i am using to store the sensor data. So i think it will not erase that section after UART flash also which have sensor details.

    am i right?

    regards,
    Anil.
  • You are correct.

    To better visualize where the data is being stored, look into the .cmd file.

    Regards,
    AB
  • Okay AB,

    Thanks for your kind support to me. I will check and come back to you again.

    Regards,

    Anil.

  • Hi AB,

    I have done something else, which is helping me to do the FOTA. 

    i allowed all devices to join the network first and then take a backup of all devices into the External Flash memory "

    void Get_Data_From_NVRAM(void) " . This is the function i used. After that i directly erased the code from CC1352 using Uniflash. and after that i have done such coding that which sensors are already joined those sensors only need to join back after FOTA process.

    So, after erasing code i flashed again code, and get back the details which is stored into the External flash and stored into the NVRAM. "

    void Set_Data_into_NVRAM(void)" this is function for this.

    I attached the both file where and how i changed.

    Files.rar

    and i got the results also, sensors are connecting again back to collector which was already in list.

    But here i am facing one problem that after joined the sensor into the network it joined as a new device into the list. my intention that it should join as a previous device only.

    Regards,

    Anil.

  • Hi,

    I resolved that problem also.

    "saveNumDeviceListEntries(numofDevices1);"  because i am calling this function in the "void Set_Data_into_NVRAM(void)" function . and this function i am calling instead of "processStartEvent();" this function at very first time after FOTA happen at once only. later it need to call processStartEvent(); this function only.

    But because i am calling saveNum........ function, number of devices are added in the list first time only. so it should not happen. After i removed this function then code is working normally.

    Thnaks AB, for your Great support.

    Regards,

    Anil.