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/CC1312R: NVS data deletion issue.

Part Number: CC1312R


Tool/software: TI-RTOS

We are currently developing a custom board using CC1312 as a chip.

I use nvs in my project and I repeat writing as a periodic event.

However, when I turned the power off and on, I occasionally saw that the data of nvs was deleted.

NVS usage refers to the sdk example (nvsinteral).  (Using NVS_erase() / NVS_write())

Here is the question.

1. If power is turned off / on while using nvs, will all data of nvs be deleted?

2. Is there a way to protect nvs data even on sudden power off / on?

   (Is NVS_lock () / NVS_unlock () used for nvs data protection?)

Thanks.

  • Part Number: CC1312R

    Tool/software: TI-RTOS

    We are currently developing a custom board using CC1312 as a chip.

    I use nvs in my project and I repeat writing as a periodic event.

    However, when I turned the power off and on, I occasionally saw that the data of nvs was deleted.

    NVS usage refers to the sdk example (nvsinteral). (Using NVS_erase() / NVS_write())

    Here is the question.

    1. If power is turned off / on while using nvs, will all data of nvs be deleted?

    2. Is there a way to protect nvs data even on sudden power off / on?

    (Is NVS_lock () / NVS_unlock () used for nvs data protection?)


    Thanks.

  • Hi Kim,

    1) When you say while using NVS, do you mean in the midst of an erase/write operation?

    2) If NVS data was successfully written, then the data will be in retention between power off / on. NVS_lock() / NVS_unlock() simply locks/unlocks the NVS driver from being used. Refer to the NVS driver documentation for more information.