Dear Nordic support,
We are using SDK5 15.2.
Our application uses FDS to maintain configuration. One issue is that we have to change the configuration via phone app regularly and this eventually triggers FDS_ERR_NO_SPACE_IN_FLASH which means we have to run garbage collection and then finalise the update of the config. This implies the call to the config update may have to wait for the asynchronous event (garbage collection done) and then retry.
What we hope to do is to schedule garbage collection prior to running out flash space. Say our record is 32 bytes, we hope to schedule the GC after 120 writes (3840 bytes) instead of 128 writes (full 4096 bytes used). This way we can always write and know that we have space in the flash - so that the call is returned synchronously - while the GC is scheduled after the write if the counter is above 120.
Does this sound a good approach to make the asynchronous call to synchronous? Do you see any issue other than wasting a few bytes of flash?
Thanks for your support,
Lichang