micro-SD card initialization using SPI interface

Posted by Ron on Stack Overflow See other posts from Stack Overflow or by Ron
Published on 2009-06-05T12:20:17Z Indexed on 2010/06/01 6:13 UTC
Read the original article Hit count: 813

Filed under:
|

I'm using a micro-SD card in an embedded design. The card is connected to a microcontroller using the SPI interface. It worked fine for all cards I've used before, but now my new card will not initialize. The card is a Transcend 2GB micro-SD card (TS2GUSD).

After sending the initial clock train to switch to SPI mode I do the following:

1) CMD0 (Argument 0, CRC 0x95) -> Response 0x01 -> OK

2) CMD8 (Argument 0x000001AA, CRC 0x87) -> Response 0x01 0x000001AA -> Means it's SDC V2+ card, the Voltage range 2.7V~3.6V is supported -> OK

Then I should send the ACMD41 command, but when sending the CMD55 (argument 0, CRC 0) that must precede CMD41, I get response 0x05 -> Illegal Command. I've also tried to send CMD1 (for MMC cards), but it gives a similar Illegal Command response. The code works fine with my Sandisk 2GB micro-SD card.

Does anyone have any idea?

Thanks,

-Ron-

© Stack Overflow or respective owner

Related posts about embedded

Related posts about sd-card