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.

CCS/LAUNCHXL-CC1310: Saving user data to flash

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310, CC1350

Tool/software: Code Composer Studio

Hello,

In my application, there is certain user data that I wish to write to flash. Every time the device starts, it reads this data from the flash. 
I found an example on using the NVS driver to write and read from flash and it works fine. 

 I understand that putting the code for using the NVS drivers in the main .c file causes it to write to the flash every time the device powers on. However, i do not want to write this data to the flash every time the device powers on. I want to store this data in the flash only once i.e. when i program the device and after that the device should only read from the location.
In which file should i put the code for writing to the flash in this case? (will storing the code in CC1310_LAUNCHXL.c file achieve this?)

Thanks in advance