For data logging, I would like the SD card to be in the erased state except for the quick format entries setting up the file system. Then when file data needs to be written, it should not be necessary to erase flash memory before writing because it's already erased. I hope that would decrease needed write time. At least that's my assumption.
But everything I've found so far, including the above recommended SD Formatter from the SD Association, appears to "erase" by overwriting the entire card. The Formatter gives you the option of a Quick format or an Overwrite format. Other utilities from Minitool, EaseUS, etc. seem to be the same - offering to do a "secure erase" with ones, zeros, random data, or even 43 cycles of random data. But that's not what I want. I want the memory to just be erased, and not overwritten with anything.
The only exception I've found is the SDFormatter.ino example in the SDFAT library. It actually uses CMD38 to erase the card, at least as far as I can tell from the source code. Does anybody know of a Windows utility that does the same thing?
Actually, I'm not really sure it makes any difference in the end. I have this picture of the SD card's controller having a flag for each sector as to whether it is currently erased or not, and only doing an erase before writing if it needs to write to a sector which is not erased. But even if this is true, it may be complicated by the fact that erase blocks are much larger than a sector (like 4K or so). Anyway, I don't know if my understanding of the controller setup is even close to correct.
One other thing is that you can't tell whether a sector is erased by reading it. In some cards, an erased sector reads as all ones, but in others it reads as all zeros. In fact, there's a flag somewhere in an SD command response that tells you which it is for that card.
Well, if anyone has words of wisdom on this, or useful links, please post.