In our code we use NV storage for system settings and calibration data.
I'm trying to understand when to open/close files and which structs to keep bwtween reads/writes. I've looked at the GIT example code, but it only briefly reads or write files.
For our system settings, which change regularly, should we open the file on start-up and keep it open? Or just open, read/write, and then immediately close the file? If we should keep it open, which structs (fds_record_desc_t, p_flash_record, etc.) need to be kept between accesses?
Second, the calibration data file is rarely written but read often. The total required calibration data is a known size, and will be kept in multiple records. Why would we want to use fds_reserve()? Again, should the file be kept open or opened and closed only as required?