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

flash erase in fstorage & FDS

Hi guys,

I am developing a appilication using nrf51822 using SDK 11. I am trying to use Fstorage and FDS to store data. I need this data to be updated frequently. As I awared, the flash can only be erase and write for 10000 times. Since I need to update the data very fast. Therefore, I need more than that.

I wonder if it is possible to store data in several registers and then after around 10000 times, I store the data in other register and keep updating? I have searched that there is a function in S130 that: sd_flash_page_erase. However, it erases the whole flash page, is there other API for erase reveral registers only because as I know, the flash pages is 3 or 4 only?

Thank you for your kind support.

Parents
  • Do you need to store it in flash for every update? Note that you only need to store it to flash before you power off the board. So as long as the board is powered on, you update the variable "locally" any number of times, before you write it to flash before shutting down.

    Anyway, FDS will itself do "wear limitation", which means that it will use different areas of flash for each write until it has used all of its allocated area. So if you are only updating a small set of values, and you have allocated a lot of space for FDS you will be able to perform many updates before a flash erase needs to be performed.

    There is no way to erase a flash area smaller than a single page.

  • Thank you for your answer. I have noticed that but I have no choice. So you mean that by writing the updated value and erase it when the whole page fulls will save the number of using flash? I thought each write or erase is considered as 1 time the flash is used? And can you please tell me what happened if a flash is over 10000 times? As I understand, the flash will not be able to write and erase anymore but still can be read. Can FDS intelligent enough to detect that and move to next page to avoid that dead page?

Reply
  • Thank you for your answer. I have noticed that but I have no choice. So you mean that by writing the updated value and erase it when the whole page fulls will save the number of using flash? I thought each write or erase is considered as 1 time the flash is used? And can you please tell me what happened if a flash is over 10000 times? As I understand, the flash will not be able to write and erase anymore but still can be read. Can FDS intelligent enough to detect that and move to next page to avoid that dead page?

Children
No Data
Related