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.

CC3220S-LAUNCHXL: Flash filesystem wear leveling question

Part Number: CC3220S-LAUNCHXL

Hi,

I had a question regarding possible wearleveling features the NWP of the CC3220* might have. 

It emulates a filesystem on top of the external flash, but does not expose how it manages it. This is nice, but on the other hand it would be useful to know how figures from a flash datasheet relate to actual writes of data inside the user's code. (e.g. a flash chip might say it supports 100k writes, but howmany updates does that give usercode to a file?)

For example, if I only want to write a small file of say 10kB to the flash chip (which is 4MB for example), it is theoretically possible to greatly increase the lifetime of the chip by writing the config to different sectors each time. If the 10kB file however is always written to the same place, this will of course not be the case.

Additionally, when using fail-safe options in the filesystem, I'm guessing more operations are done on the flash. But is this on different sectors or not? (or in other words, does using fail-safe options decrease the lifetime)

Thanks for any info on this.

  • Hi,

    As first you should read this document: www.ti.com/lit/an/swra515a/swra515a.pdf

    Wear leveling is not supported by CC3220 fielsystem. If you rewriting same content of file, you rewriting same physical 4K sector in sFlash. I think usafe file with fail-safe flag does not decrease or increase number of writes, because it need to be rewritten file header. But in this I am not 100%, it should be confirmed from TI side.

    If you need big number of writes, you can create your own wear leveling algorithm. You can create many small 10K files at beginning. You start writing into first file and your you count 100K write cycles by sl_FsGetInfo() API, you can go to 2nd file, etc.

    Jan
  • Hi,

    Thanks for your reply,

    Your suggested technique would indeed be interesting, but since the maximum amount of files simplelink supports is only 240-50 or so, it only allows prolonging the lifetime by a factor of 200 lets say at its limit.
    But given that the minimum filesize is 4K, and practically using up to 1 MB of the flash for userfiles is already pretty much, I'd say its close to what we can get out of the hardware at this point.

    Will try this. Thanks
  • Hi,

    Only quick update. I found in SWRU44D (chapter 7.15.2) information related to failsafe mode:

    To reduce the SFLASH endurance, create a file which requires frequent updates with the FAILSAFE flag; the number SFLASH writes is reduced in half because the system switches between the file images.

    Jan