Posted: Mon Feb 03, 2014 11:55 pm Post subject: Working out how I killed a micro SD (uSD) card
Firstly, please understand that I'm not even fully sure this is the right forum to be posting this in, so if I'm wide of the mark, please let me know. In a nutshell, I have some micro SD cards that a circuit of mine has killed, and I want to understand why / how / if they are recoverable.
This circuit uses SPI mode to read data from a FAT formatted uSD card via the SPI interface. The user puts the data they want to be played back there using a full SD interface (on their PC etc). So it's a case of SD write (using standard hardware I do not control) and SPI read by me.
The circuitry is simple, based around an Arduino type core (Atmega32u4) - the schematic (of this block) is equivalent to this: [url]https :// www . sparkfun . com/datasheets/DevTools/Arduino/microSD_Shield-v13%20Schematic . pdf[/url]
For those who don't want to go into the schematic, the nuts and bolts are:
3.3V regulated power
SD->MCU inputs directly connected
MCU->SD inputs run through proper level shifter
So, I've been using this successfully with the Arduino SDFat library for ages. And then, a few days ago, I started getting "dead" cards out of it. Putting them in a PC results in no identification whatsoever - not even as an uninitialised drive. Using the SPI interface, I can get manufacturer details, serial number and size back out, but all read and write commands give me a failure.
So my question is: how did I kill them? Incorrect voltage seems unlikely, given the circuit design and the fact that I can still get some data out of them. Is it possible to send some sort of botched SPI command that leaves the card in limbo? Is there any software out there that allows me to send individual SD commands to probe this further? Or are there any companies out there that would take this on and give me a diagnosis?
Any help offered would be gratefully received. I'm just trying to learn! And if this is the wrong forum, please let me know and I shall slope off...
Thanks for the suggestion cybercop. I'm actually a fair bit further on than hobbyist, as I'm an electronic engineer by profession This is for an Arduino compatible board for a client that I'm building, and I've never had a problem working with SD cards in SPI mode before.
Thing is, with the failure mode being so hard to decipher, I was hoping that a forensics expert or company might be able to take my damaged cards and tell me what I did to destroy them. That way I might understand more about why one of the simplest circuits going is messing me around!
Just thought I would update this as I had some success and it may be useful info for others. After some more Googling, it turns out that SD cards have a password lock feature. From other people's forum posts, comparing various data I COULD extract from my cards with that from other people, it looked like my cards were exhibiting evidence of being locked.
I didn't know the password (because I hadn't ever intentionally set it) but further reading showed that you can send an "unlock and erase" emergency reset command. Doing so (via SPI) let the cards turn up as raw when inserted back into my laptop - and I could format them happily.
This may not be ideal for everyone, as I didn't recover the data (but I didn't want to anyway).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum