CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Help! SD card in 4-bit mode
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
metalm



Joined: 22 Mar 2007
Posts: 23
Location: Buenos Aires, Argentina

View user's profile Send private message

PostPosted: Thu Aug 16, 2007 6:48 am     Reply with quote

[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? Shocked

I have already found the error! Very Happy Very Happy Exclamation Exclamation 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!! Very Happy I hope post my code in the "working code" section instead of the "problems" hehe
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group