metalm
Joined: 22 Mar 2007 Posts: 23 Location: Buenos Aires, Argentina
|
|
Posted: Thu Aug 16, 2007 6:48 am |
|
|
[quote="ckielstra"]Ok, I see where I went wrong: in the SD-datasheet figure 4-7 I overlooked the 'Power on' arrow and assumed the flow chart to start at the upper left.
I never used the SD-bus mode so can't really help you with that. Did you follow my suggestion to look up the SD-card driver software in Linux? Maybe they are using SPI as well, but you might be lucky.
From the datasheet figure 3-5 you can see that at power-up you have to send at least 74 clock pulses _and_ wait for 1ms (whichever of these two takes the longest).
Check chapter 4.8.2 Command Format, every command is 8 bytes long, not 1 byte like you have now. This includes the commands 0 and 55.
Maybe CMD0 has no response, but ACMD41 does! You will have to check for the busy flag to clear.[/quote]
I have search for the linux driver, but what I see, this uses SPI because the SD mode isn't "open code" :(
In chapter 4.8.2 indicates that the command is 48 bits long = 6 bytes long, isn't it?
I have already found the error! The CMD0 is a BC command with NO response, but the CMD55 is an AC command, wich has no data flow thru DAT lines, but it has an R1 response!! I hope post my code in the "working code" section instead of the "problems" hehe |
|