Hello,
I am using nRF52840, SDK_16.0.0, SoftDevice S140 V7.0.1 and Segger for flashing the image. I am using ‘ble_app_blinky’.
1) Do we need to call fds_record_close(). As per below statement in below link. I am bit confused with the statement and fds example code. In example fds_record_update() is called after fds_record_close(). Once closed, even to update do we need to open.
“So if you need to access the data after closing the record, you must open it again.”
2) As per below statement do I need to call fds_init() after ble_stack_init() as we have SoftDevice. But I am able to call fds_init() before SoftDevice Initilization.
“Before initializing FDS, you must initialize the SoftDevice and register a callback handler to handle FDS events.”
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_fds_format.html
3) Once I receive FDS_ERR_NO_SPACE_IN_FLASH, whether can I call fds_gc() directly.
a) (Or) Before calling garbage collection, do I need to close the record.
b) Also do I need to delete record fds_record_delete() before initiating garbage collection.
4) Assume I have 4 records and I am updating one record very frequently and received FDS_ERR_NO_SPACE_IN_FLASH. Now if I do garbage collection, will it erase other 3 records.
a) Assume I keep updating the record. Once there is no space and if I want to call garbage collection, what will happen to last updated record value. After reset, I need to get latest value for all record. Whether it be taken backup before erasing the record.
Thanks & Regards
Vishnu Beema