Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 8 months ago.
SDFileSystem format takes 10 minutes to format a 2Gb card
Using the SDFileSystem it took 10 minutes to format a 2Gb SD card, does that sound correct?
It does work but rather a long time to perform a format, however it did take 5 minutes on a PC. Is there a 'quick' format option?
3 Answers
10 years, 8 months ago.
The SDFileSystem library uses SPI to interface with the SD card. The wikipedia page for SD says the maximum speed for SD cards using SPI is 25 Mbit/s and that the maximum clock speed is 200 MHz. The SDFileSystem library sets the SPI frequency to 100 KHz, so I'd expect it to be slower.
On your computer a different interface is used that is considerably faster.
EDIT: the 100khz frequency is just for the card initialization, it is then pushed up to 1MHz
10 years, 8 months ago.
Also, I'd try to use a different SD card if possible. 5 minutes to format the card on a PC sounds like a very long time.
10 years, 8 months ago.
This is not a direct answer, but it is strongly recommended to use the SD Formatter instead of formatting utilities provided with operating systems that format various types of storage media. Using generic formatting utilities may result in less than optimal performance for your memory cards.
https://www.sdcard.org/downloads/formatter_4/
I'm going to try this formatting program now. However does the SDFileSystem correctly format the card for use with this lib and are there any exceptions for instance HC type. Also does the SDFileSystem format in 'full' or 'quick' mode ?
The formatter does work and much quicker than the standard windows version. That's fine however my question is regarding the Mbed SDFileSystem format function. Does this function in 'quick' or full 'erase' mode and is it as robust as the windows SDformater. The reason I ask is I am corrupting the SD card during my code development and rather than keep removing and re-formatting the card on my PC I would like to re-format on the Mbed as part of my program if it detects a card read or write failure.
posted by 21 Mar 2014I believe the User's Manual answers your questions.
https://www.sdcard.org/downloads/formatter_4/SDFormatter_4e.pdf