Hi,
i need to erase entire data space of a SD card in SPI mode.
Can someone help me to do this with arduino?
Thank you.
What do you mean by
i need to erase entire data space of a SD card in SPI mode.
You can't just erase the data area on a FAT file system. Both directories and files are in this area. Erasing this area will corrupt the file system since clusters will still be allocated in the FAT.
fat16lib:
What do you mean byi need to erase entire data space of a SD card in SPI mode.
You can't just erase the data area on a FAT file system. Both directories and files are in this area. Erasing this area will corrupt the file system since clusters will still be allocated in the FAT.
I've an SD card that it is not readable from PC because, i think, have corrupted file system and it doesn't format itself.
There is a command in SPI mode that can restore this problem?
Thank You.
First try the official SD Formatter https://www.sdcard.org/downloads/formatter_4/.
You are probably out of luck if the SD Association's Formatter fails.
The SdFat formatter example https://github.com/greiman/SdFat/tree/master/SdFat/examples/SdFormatter has an option to erase an SD quickly using commands over the SPI bus. You can try this by downloading SdFat and running the above example.
Hi fat16lib,
i've try Sdfat formatter and the card doen's init.
So i think it is damage.
Thank You.