This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FDS lifetime

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.

Parents Reply
  • 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.

Children
No Data
Related