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 support@ccsinfo.com

Unable to put some SD cards in idle state
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
asmallri



Joined: 12 Aug 2004
Posts: 1630
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Jul 31, 2017 6:11 pm     Reply with quote

JerryR wrote:

Really wished i had started with my own code rather than using the "canned" Brush code. Andrew insists that his stock code is compatible with all SD card formats.


I am sorry to hear you are having problems but years of experience working with customers using this code shows the opposite to be the norm. The quickest way to get a working implementation is to start with my code.

JerryR wrote:
Ttelmah:

Yes, re-worked Brush code to work with my hardware and are working with the basic Brush code. All pull-ups are IDENTICAL to brush hardware requirements. Power supply is practically flat during mount attempts.

Thanks


Others in this thread have covered the known challenges. If you are running a processor at 64MHz (you're not) then there is a potential issue with initialising the card because the minimum clock speed is about the 400KHz specified in the standard however, having said that, I have tested lots of cards and have been able to successfully initialise all but fakes at 10MHz which is significantly higher that the 400KHz specified in the standard. At very high SPI clock speeds, you can have SPI clock slew problems and, at these speeds, circuit trace layout becomes critical.

If you are running at high clock CPU speeds you could follow Ttelmah's suggestion of performing the first stage of the SD card initialisation using software SPI mode. I have not needed to do this in my own applications, nor have I needed to suggest it to other users however it is a very valid approach.

Ttelmah has also identified another issue with some cards. SD cards contain embedded processors, these processors must perform their own power on reset processes. It is possible that some cards are not yet ready before you attempt to initialize them. This is handled in two ways, one is to delay the SD initialisation a few seconds after power up and the other is to repeatedly issue the initialisation sequence until the card responds successfully after initialisation (the latter approach is called out in the standard). The sample includes debug information to advise how many times the driver attempted to perform initialisation until it was successful. In most cases (when combined with a small start up delay) the card initialises on the first attempt whereas 10 years ago the cards took multiple attempts to initialise.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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