Hi,
I am using the NVS to store my application data in the defined partition starting from a flash address of 0xFC000 to 0x100000.
I have 3 structures with variable sizes. Here structure 1 and structure 2 will be stored at keys 1 and 2 respectively whereas structure 3 will store at key 3. As per the NVS architecture, the updated data will be append after the last write in Flash.
The application of Structure 3 is such that it requires frequent writing in the flash, so key 3 will always store the new data at the next address of the last data. Once the NVS reaches the end of the last address (in my case it is 0x100000), it starts the Garbage collection to free up the spaces for the next storage.
Here structure 1 and structure 2 at key 1 and 2 respectively still at their previous location as it was not updated in between.
So my question is, how the NVS will manage the garbage collection where it allows new space for Structure 3 while keeping Structure 1 and Structure 2 to manage their value?
Hardware: nRF52840
NCS: 2.6.2