views:

201

answers:

2

Hi People

I saw a lot of infos about MMC/SD cards and I tried to make a lib to read this.. (modifying the Procyon Avrlib)

But I have some problems here. I Don´t change the original code and tried here. My problem is about the init of SD card. I have 2 here, a 256mb and another 1GB.

I send the init commands like this order: CMD0, CMD55, ACMD41, CMD1

But SD 256mb returns me only 0x01 response for each command.. the CMD1 i send a lot of times, SD 256mb always returs only 0x01.. never 0x00.

The SD 1GB is more crazy... CMD0 returns with 0x01 ..nice but the CMD55 response with 0x05... another times responde with 0xC1... and another ones response 0xF0 with a 0x5F in the next interation...

Around internet have infos and examples, but a bit of confused. Here in my project, I must use 1GB card and I´m trying with a MicroSD with a SD Adapter (I think that this is not the problem).

Please any help are apreciate!

Regards

PS -> my problem like the problem from this guy http://stackoverflow.com/questions/2365897/initializing-sd-card-in-spi-issues but his solution don´t solved my problem.. The SD1GB returns only 0x01 ever... :cry:

A: 

Maybe this helps a bit: SD Specifications Part 1 Physical LayerSimplified Specification

Turbo J
A: 

Why do you need CMD1? And did you read the note below it, that says "CMD1 is valid command for the Thin (1.4mm) Standard Size SD Memory Card only if used after re-initializing a card (not after power on reset)."?

About 1GB card, ideas that come to mind:

  • after every command (send command, get reply), do you send 8 dummy bytes before making CS high?
  • values returned seem weird (0x05 doesn't have busy bit set, so wtf?), maybe there's a hardware issue?
  • does the card work otherwise?
domen