This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F-Q1: Function ‘NVS_erase’

Part Number: CC2640R2F-Q1

Support,

Please will you advise on the following:

Function ‘NVS_erase’

Questions,

  1. Why does the time to complete vary?
  2. Are long durations signs of early failure?
  3. Why does the erase procedure increase with age?
  4. What changes in the Flash to increase the time?
  5. Is there a register location that counts the number of times the Flash has been written too?
  6. Is there a register location that counts the number of times the Flash has been erased?

The datasheet suggests the flash is good for 100K cycles

If you erased 10 times a day for two years  you would nowhere near 100k.

Note 2 from the datasheet  suggests erase time is dependent on Flash aging. Do you have a chart to show this effect? Is it an exponential decay?

What should you expect?

  • Hi Chris,

    1) The NVS driver always starts at the top of the list of indexes and goes through all of them until it finds the one it is looking for. This is why operations take variable time to complete. Note, when you erase or change an NV item you are actually just deleting/modifying the pointer. The real delete does not happen until the next compaction.

    2) No, if an operation takes very long it's probably a sign it triggered a compaction

    3) As the NV section fills up all operations will take longer. 

    4) Number of used NV objects.

    5 & 6) I will have to get back to you.

  • Hi,

    To complete Marie's answer:

    5 & 6) There is no counters to keep track of the number of write/erase of the Flash. 

    Regarding flash aging, here is a thread that can help you.

    I hope this will help,