Hi, I use SDK13.1 FDS example and have some questions about that. Is there any influence about the lifetime of Flash when i use FDS function to write and delete the records.If it has,how to calculate the lifetime of Flash.Thanks.
Hi, I use SDK13.1 FDS example and have some questions about that. Is there any influence about the lifetime of Flash when i use FDS function to write and delete the records.If it has,how to calculate the lifetime of Flash.Thanks.
I get the FDS_ERR_NO_SPACE_IN_FLASH error when trying to write to flash, then call fds_gc() ,the FDS callback return FDS_SUCCESS ,but when i write to flash again,still FDS_ERR_NO_SPACE_IN_FLASH ,why?
Then you could try to run fds_stat() and check the field 'largest_contig': it contains the size (in words) of largest record that you can write to flash at that moment.
If you want to store let's say 128 bytes, first convert that to words: 128/4 = 32. Then check that the resulting value is smaller than 'largest_contig'. If it is, you can fit the data in flash, otherwise you will receive FDS_ERR_NO_SPACE_IN_FLASH. In that case, delete something, run garbage collection and retry.
Then you could try to run fds_stat() and check the field 'largest_contig': it contains the size (in words) of largest record that you can write to flash at that moment.
If you want to store let's say 128 bytes, first convert that to words: 128/4 = 32. Then check that the resulting value is smaller than 'largest_contig'. If it is, you can fit the data in flash, otherwise you will receive FDS_ERR_NO_SPACE_IN_FLASH. In that case, delete something, run garbage collection and retry.