I am doing this now with a 4GB SD Card from Sandisk :
Erase the card
Write a CSV file that is about 90 to 110kB in size.
Do some operations to the file and send it back to user.
User then is ready with another such file.
Loop to 1.
The above process may happen maybe 5 times a day.
I had earlier read in one of the posts by fat16lib that the SD Card will employ Auto wear levelling so that all segments of the card are used evenly provided it is formatted with the tool here : SD Memory Card Formatter for Windows/Mac | SD Association
Now in my case I am formatting the card using the example function provided with the Arduino IDE. In this case do I still enjoy Auto wear levelling or no ?
Irrespective of all this can the following logic work to provide wear levelling ?
Check and save the End of file position()
Erase Card
If position() < (max. value for that card + Expected file size) increment position() by 1; else position = 0;
UKHeliBob:
I am not clear how any formatter could ensure wear levelling. The page linked to for the formatter does not mention wear levelling.
Yes I am also not sure .. since it was specifically advised to use that formatter instead of the generic formatting of WIN OS, I mentioned it. In fact I was wondering if it was writing some kind of wear levelling algorithm as part of the format process. But I doubt if that is the case.
Anyway I am planning to check it out physically : Just Delete an existing file ( only one on the SD Card ) and write the same file again. After writing check the EOF position(). Repeat the whole process many times. If wear levelling is deployed, this position() should keep changing ??
Wear levelling will be doing the minimum work, so I suspect it only moves where the file is written
every so often - remapping blocks involves having to write the block map, and that has the same
constrains on overuse as the file itself surely?