EmbeddedRelated.com
Forums

SD CARDS

Started by Onestone February 8, 2012
Card works in a PC, but the PC interfaces using SD mode through USB and
a dedicated ASIC (I presume) embedded into the small interface dongle.
Which is why I'm thinking this is an SPI related hardware issue, and
probably related to pull-ups or lack of them, even though a few
respondents have suggested that they are able to run without all 5 lines
pulled up.

Cheers

Al

On 10/02/2012 12:51 PM, Donald H wrote:
>
> --- In m..., Onestone wrote:
>> jUST TRIED:-
>>
>> a) multiple repeated CMD0
>> b) slowed clock from 400kHz to 100kHz
>> c) extended numer of 'wake up' clocks
>> d) all combos of above
>>
>> No difference. Nokia works, Sandisk no works
>>
>> Cheers
>>
>> Al
> WOW, I thought when did this I had problems.
>
> At this point I would check the card in a PC.
> Check another Sandisk card, first in a PC, then in the project.
>
> Good Luck
>

Beginning Microcontrollers with the MSP430

Gene,

> I don't think it has ever been officially established as to whether
microSD
> cards MUST support SPI; I am beginning to suspect that the SPI
functionality
> is still present in most microSD cards, but is no longer tested or
otherwise
> validated.

microSD cards are not required to support legacy SPI mode. The ones I have
do, but I keep expanding my collection to ensure our SD drivers continue to
function.

There are a lot of bad cards out there. One of the problems with some of
the SPI controllers is that at high frequencies at 50% duty cycle waveform
isn't 50%--this is documented in LPC2k errata. But that doesn't seem to be
an issue with you if you bring down the frequency. :-(

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore running Defender... http://www.vimeo.com/25709426

> --- In m..., Onestone wrote:
> >
> > jUST TRIED:-
> >
> > a) multiple repeated CMD0
> > b) slowed clock from 400kHz to 100kHz
> > c) extended numer of 'wake up' clocks
> > d) all combos of above
> >
> > No difference. Nokia works, Sandisk no works
> >
> > Cheers
> >
> > Al
>
> WOW, I thought when did this I had problems.
>
> At this point I would check the card in a PC.
> Check another Sandisk card, first in a PC, then in the project.

...or check with a uC that has SD support, such as the LPC2300/2400 and note
the CID, CSD, and perhaps SCR. It would be interesting to see those. I'm
not sure whether you can see these registers under an OS like Windows.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore running Defender... http://www.vimeo.com/25709426

"Paul Curtis" :

> microSD cards are not required to support legacy SPI mode. The ones I have
>
Hi Paul,

Is your information from a official document? According to wikipedia, SPI is
optional for MMC, but MicroSD have a "yes" in the table (bottom of page):
http://en.wikipedia.org/wiki/SD_Memory_Card#Technical_explanation

M.

I couldn't find it in hurry, but I'm fairly certain that one of the many
documents I've read over the last few days stated that SPi support was
mandatory as part of the SD card spec, and that document was discussing
the 2.x physical spec

Al

On 11/02/2012 12:16 AM, Matthias Weingart wrote:
> "Paul Curtis":
>
>> microSD cards are not required to support legacy SPI mode. The ones I have
>>
> Hi Paul,
>
> Is your information from a official document? According to wikipedia, SPI is
> optional for MMC, but MicroSD have a "yes" in the table (bottom of page):
> http://en.wikipedia.org/wiki/SD_Memory_Card#Technical_explanation
>
> M.
>
>
This may help. Page 3 shows pullups on SS, MOSI & MISO. The text asserts it's required by the SD standard but doesn't provide further citation detail.

http://www.cs.ucr.edu/~amitra/sdcard/Additional/sdcard_appnote_foust.pdf

Footnote on p 21 of:

http://www.flashgenie.net/img/productmanualsdcardv2.2final.pdf

states that pins 8 & 9, which are reserved in SPI mode must be pulled up in addition to lines 1, 2 & 7
> I couldn't find it in hurry, but I'm fairly certain that one of the many
> documents I've read over the last few days stated that SPi support was
> mandatory as part of the SD card spec, and that document was discussing
the
> 2.x physical spec

I'll dig up the exact reference tonight. As far as I recall, I have all SD
specifications and the addendums, and somewhere it notes that for microSD
cards, specifically, that SPI mode is an option.

If there is no response to CMD0, then the card believes it should be in SD
mode, and refuses to enter SPI mode.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore running Defender... http://www.vimeo.com/25709426

Sometimes SPI can be a bugger too. There are 4 different possibilities between the phasing of the bits and the clock. The old Motorola 68HC11 'Pink' book has good timing diagrams (8-1&2 in the copy on my lap). If the SD card documentation is sketchy/limited that timing could cause big problems even if all the pull-ups are in place.

HTH

Emmett Redd, Ph.D., Professor mailto:E...@MissouriState.Edu
Physics, Astronomy, and Materials Science Office: 417-836-5221
Missouri State University Dept: 417-838-5131
901 S NATIONAL AVENUE FAX: 417-836-6226
SPRINGFIELD, MO 65897 USA Lab: 417-836-3770

It is clear that thought is not free if the profession of certain opinions make it impossible to earn a living. -- Bertrand Russel

> -----Original Message-----
> From: m... [mailto:m...] On Behalf
> Of Paul Curtis
> Sent: Friday, February 10, 2012 9:12 AM
> To: m...
> Subject: RE: [msp430] RE: Re: SD CARDS
>
> > I couldn't find it in hurry, but I'm fairly certain that one of the
> > many documents I've read over the last few days stated that SPi
> > support was mandatory as part of the SD card spec, and that document
> > was discussing
> the
> > 2.x physical spec
>
> I'll dig up the exact reference tonight. As far as I recall, I have
> all SD specifications and the addendums, and somewhere it notes that
> for microSD cards, specifically, that SPI mode is an option.
>
> If there is no response to CMD0, then the card believes it should be in
> SD mode, and refuses to enter SPI mode.
>
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> SolderCore running Defender... http://www.vimeo.com/25709426
>
>
>
>
>
>
>
>
>
Right, but why would an unitiialised card do that? it simply powers up
and the first thing it sees after the power up delay is CMD0, which is
designed to force SPI mode if received when CS is low, and I've
confirmed that CS is low.

Al

On 11/02/2012 1:41 AM, Paul Curtis wrote:
>> I couldn't find it in hurry, but I'm fairly certain that one of the many
>> documents I've read over the last few days stated that SPi support was
>> mandatory as part of the SD card spec, and that document was discussing
> the
>> 2.x physical spec
> I'll dig up the exact reference tonight. As far as I recall, I have all SD
> specifications and the addendums, and somewhere it notes that for microSD
> cards, specifically, that SPI mode is an option.
>
> If there is no response to CMD0, then the card believes it should be in SD
> mode, and refuses to enter SPI mode.
>
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> SolderCore running Defender... http://www.vimeo.com/25709426
>