SDMicro Breakout - volume.init(card) fails

Breakout boards, sensors, Drawdio, Game of Life, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

SDMicro Breakout - volume.init(card) fails

Postby fuesika » Sat Mar 10, 2012 4:15 am

Hi everyone,

I am using http://www.ladyada.net/products/microsd
I have been following the instructions for a demo-setup to get to know the board using 5V and GND as well as pins 10 though 13 as suggested. For this, I also altered chipSelect from 4 to 10.

I connected the board to an Arduino Uno (328P). I soldered pins to the board. I did not mess with the quite bad looking pins of IC1 near the CLK-label (see attached photograph).

When I connect it and load the CardInfo-program onto the Arduino, the SerialMonitor will tell me that a card (of type "SD2") has been found, however, it fails to init the volume (4GB, 2GB, 1.5GB FAT16/32, I tried almost any combination - formatted by gparted or Windows XP) and tells me to format the card with FAT16/32 as no volume was detected. The microSD-card is a SanDisk 4GB.

Do you have any suggestion, what may cause the problem? Is there anything I should try?
Attachments
microsdbreakout_kl.jpg
microsd upper and lower side
microsdbreakout_kl.jpg (52.66 KiB) Viewed 1934 times
fuesika
 
Posts: 6
Joined: Sat Mar 10, 2012 4:06 am

Re: SDMicro Breakout - volume.init(card) fails

Postby adafruit_support_bill » Sat Mar 10, 2012 7:00 am

There is a formatting sketch written by the author of the library:
I have included a sketch for formatting cards in the new SdFat. It will format the card FAT16 with an optimal file system for the Arduino that can be read/written on PCs and Macs.


http://forums.adafruit.com/viewtopic.php?f=31&t=21916p=114796&hilit=format#p114796
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am

Re: SDMicro Breakout - volume.init(card) fails

Postby fat16lib » Sat Mar 10, 2012 7:59 am

SD cards should not be formatted with OS utilities or programs like gparted.

The format sketch SdFormatter.pde in SdFat/examples will work as suggested by Adafruit support. SdFat is located here http://code.google.com/p/sdfatlib/downloads/list.

Another option is the SD Association's formatter https://www.sdcard.org/downloads/formatter_3/ which runs on a PC.

SD cards must have a MBR partition table with only one partition. Cards with 2GB or less should be formatted FAT16. Cards with 4GB or more must be formatted FAT32.

The SD spec requires special placement and sizes for file structures and OS utilities do not meet this spec. This part of the spec is to optimize use of the flash memory.

A PC or Mac may format an SD card with a GUID Partition Table (GPT). After this happens only the above programs can fix the problem. OS utilities maintain the GPT.
fat16lib
 
Posts: 586
Joined: Wed Dec 24, 2008 12:54 pm

Re: SDMicro Breakout - volume.init(card) fails

Postby fuesika » Sat Mar 10, 2012 9:17 am

Thanks for that hint. I didn't know about that software, yet.
Using QuickStart, I get:
Card successfully initialized.

Card size: 1074 MB (MB = 1,000,000 bytes)
Can't read the card.
Try another SD card or reduce the SPI bus speed.
The current SPI speed is: 4.00 MHz

Edit spiSpeed in this sketch to change it.

I tried different SPI-speeds (FULL, HALF, QUARTER), however the card is always detected wrong (1GB instead of actual 4GB). It's a SanDisk 4GB microSDHC card. Maybe the vendor is the problem?

SdInfo returns
init time: 575 ms

Card type: SD2

Manufacturer ID: 0X4
OEM ID: A
Product: SMI-S
Version: 4.4
Serial number: 3
Manufacturing date: 6/2001

cardSize: 2097152 (512 byte blocks)
flashEraseSize: 128 blocks
eraseSingleBlock: false
read MBR failed
SD errorCode: 0X11
SD errorData: 0XFF

(emphasis added)

SdFormatter returns
Enter option: F

Card Size: 1024 MB, (MB = 1,048,576 bytes)



Erasing

error: erase failed

SD error: e,0

Again telling me the wrong size of the card.

The card works well using it with a PC.

//edit: I'll try SD Association's formatter right now, thanks for that answer!
fuesika
 
Posts: 6
Joined: Sat Mar 10, 2012 4:06 am

Re: SDMicro Breakout - volume.init(card) fails

Postby fuesika » Sat Mar 10, 2012 9:34 am

fat16lib wrote:Another option is the SD Association's formatter https://www.sdcard.org/downloads/formatter_3/ which runs on a PC.


After using the formatter, the problem remains:
The card's size is detected wrongly (1GB) and an error during reading of the card causes the QuickStart.pde to stop running.
fuesika
 
Posts: 6
Joined: Sat Mar 10, 2012 4:06 am

Re: SDMicro Breakout - volume.init(card) fails

Postby fuesika » Sat Mar 10, 2012 10:01 am

Update: Thinking about the problem, my eyes caught the Data-Logger Shield: http://www.ladyada.net/make/logshield/index.html


I inserted the card (with adaptor-card) and wheee:

SD/CardInfo returns:
Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT32

Volume size (bytes): 4112121856
Volume size (Kbytes): 4015744
Volume size (Mbytes): 3921

Files found on the card (name, date and size in bytes):


SdFatlib/QuickStart returns:
Enter the chip select pin number: 10

Card successfully initialized.

Card size: 4124 MB (MB = 1,000,000 bytes)

Volume is FAT32, Cluster size (bytes): 32768

Files found (name date time size):

Success! Type any character to restart


I successfully ran SdFormatter and inserted the card again in the breakout board. This time SD/CardInfo tells me:
Card type: SD2

Could not find FAT16/FAT32 partition.
Make sure you've formatted the card


and SdFatlib/CardInfo once again
Enter the chip select pin number: 10

Card successfully initialized.

Card size: 1074 MB (MB = 1,000,000 bytes)

Can't read the card.
Try another SD card or reduce the SPI bus speed.
The current SPI speed is: 4.00 MHz
Edit spiSpeed in this sketch to change it.

Restarting


This is weird.
fuesika
 
Posts: 6
Joined: Sat Mar 10, 2012 4:06 am

Re: SDMicro Breakout - volume.init(card) fails

Postby adafruit_support_bill » Sat Mar 10, 2012 10:17 am

It is possible that you got a bad breakout board. As you noted, the solder looks a bit rough around the chip. (But your soldering on the header looks excellent :D )

Contact support@adafruit.com with a link to this thread and ask for a replacement breakout board.
User avatar
adafruit_support_bill
 
Posts: 16072
Joined: Sat Feb 07, 2009 9:11 am

Re: SDMicro Breakout - volume.init(card) fails

Postby fuesika » Sat Mar 10, 2012 11:08 am

Thank you so much for your prompt and helpful support! You guys are awesome.
This is not the techie-solution (like finding some awkward bug and fixing it), but I am looking forward to a fully working breakout board. :)
fuesika
 
Posts: 6
Joined: Sat Mar 10, 2012 4:06 am

Re: SDMicro Breakout - volume.init(card) fails

Postby fuesika » Fri Apr 06, 2012 7:35 am

The new breakout board arrived and works like a charm. Thanks once more for your help and the replacement!
fuesika
 
Posts: 6
Joined: Sat Mar 10, 2012 4:06 am

Re: SDMicro Breakout - volume.init(card) fails

Postby buton » Thu May 24, 2012 12:55 pm

I have the same problem...

i am working with an arduino pro mini...

the card i had did not work and windows was able to read it...

i pulled my cellphone 32gb microsd card and it worked....

so i ordered a new card a patrior microsdhc 8gb.. and it did not work y tried everything...

it was the initializing error then i tried formatting in many diferent ways and nothing... after that i tried my cellphone Microsd card and it was able to read it... but it was giving me the error fat32/16 not found...

so i end up doing weird stuff until my new 8gb card was not detected by windows.. i used the sdcard.org formatter and i choose a an option to auto something i dont remeber right now and that was the issue..

i am buying two new cards a kingston and a sandisk... let see the results.. when they arrive..
buton
 
Posts: 51
Joined: Fri May 11, 2012 7:06 am


Return to Other Adafruit products

Who is online

Users browsing this forum: idem, jasmattkrz, mibignistinly and 5 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]