SD card reading problem

Hi All,

I have a SD card inserted to a Arduino SD card module. The SD card worked fine for a year.
However, the card suddenly failed to work today. I ruled out any hardware problems
by testing it with another SD card, so I probably have a damaged SD card.

Here is the mysterious part. The probably damaged SD card can actually be read/write/format on a PC, but not on the Arduino.

How's that possible?

Yours faithfully,
Gary

Does someone need to tell you to reformat it?
:stuck_out_tongue:

Try fat16 and fat32.

aShadow:
Does someone need to tell you to reformat it?
:stuck_out_tongue:

Try fat16 and fat32.

I did format my SD card (both fat16 and fat32 x quick format and low level format) before asking.

You must not use an OS utility to format the SD card.

SD cards used on Arduino must be formatted MBR (Master Boot Record).

If an SD card becomes formatted GPT (GUID Partition Table), OS utilities maintain this format. This format can be used on a Mac, PC, or Linux but not on an Arduino.

Try formatting the card with SD Formatter https://www.sdcard.org/downloads/formatter_3/. This will produce a standard format for your SD card.

It is possible but very rare for an SD card to have a hardware failure so it can be read on a PC but not on an Arduino. This is because the Arduino uses the SPI bus and the PC uses the SDIO bus.

More information would be useful. If SD Formatter fails, download SdFat http://code.google.com/p/sdfatlib/downloads/list and run the SdInfo example and post the results.

fat16lib:
...
More information would be useful. If SD Formatter fails, download SdFat http://code.google.com/p/sdfatlib/downloads/list and run the SdInfo example and post the results.

I formatted the possibly damaged SD card with SD Formatter and tried again. The Arduino device (Arduino Mega with some shields) still couldn't read it. I followed your instructions to prepare the SD cards info with an Arduino UNO board (for both the working SD card and the not working SD card). Unfortunately, I have no idea how to analysis the info.

Can you help me out?

Here is the info of the possibly damaged SD card,

Card type: SD1

Manufacturer ID: 0X2
OEM ID: TM
Product: SD02G
Version: 2.8
Serial number: 449635488
Manufacturing date: 3/2007

cardSize: 2059.40 MB (MB = 1,000,000 bytes)
flashEraseSize: 128 blocks
eraseSingleBlock: true

SD Partition Table
part,boot,type,start,length
1,0X0,0X6,243,4019175
2,0X0,0X0,0,0
3,0X0,0X0,0,0
4,0X0,0X0,0,0

Volume is FAT16
blocksPerCluster: 64
clusterCount: 62791
freeClusters: 62791
freeSpace: 2057.54 MB (MB = 1,000,000 bytes)
fatStartBlock: 244
fatCount: 2
blocksPerFat: 246
rootDirStart: 736
dataStartBlock: 768

Here is the info of the SD card that can work with the Arduino device,

Card type: SD1

Manufacturer ID: 0X15
OEM ID: MC
Product: SMI
Version: 0.0
Serial number: 3720085777
Manufacturing date: 12/2003

cardSize: 513.28 MB (MB = 1,000,000 bytes)
flashEraseSize: 128 blocks
eraseSingleBlock: false

SD Partition Table
part,boot,type,start,length
1,0X0,0X6,233,1002030
2,0X0,0X0,0,0
3,0X0,0X0,0,0
4,0X0,0X0,0,0

Volume is FAT16
blocksPerCluster: 32
clusterCount: 31304
freeClusters: 31304
freeSpace: 512.88 MB (MB = 1,000,000 bytes)
fatStartBlock: 234
fatCount: 2
blocksPerFat: 123
rootDirStart: 480
dataStartBlock: 512

Both cards look fine.

What doesn't work with the "possibly damaged SD card"?

Does it work with the SdFat QuickStart example?

What happens when you run the SD.h CardInfo example?