Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | Micro-SD card initialisation-problem

There are 34 messages in this thread.

You are currently looking at messages 10 to 20.

Re: Micro-SD card initialisation-problem - rickman - 22:55 18-07-08

On Jul 18, 5:59 pm, "R.Wieser" <addr...@not.available> wrote:
> Hello Arie,
>
> > Depends on the input capacitance of the card, cable
> > length, etc... Someone might have been lucky.
>
> Ofcourse.  That is why I checked with the scope when the card refused to
> initialize.  Just to make sure.
>
> > Yes. that's why I always use buffers - or a spec'ed driver
> > and short connections.
>
> If nothing else works I'll surely try it.  Currently the setup is acceptable
> to the SanDisk card.
>
> But ...  The "bad" card only "gives up" after a number of times (3 to 10
> when using CMD1), never at the first time (and that is after the CMD0 has
> been accepted ofcourse).  That seems to indicate that the communication is
> o.k..
>
> > Without reflections? Or are you using a 10 MHz scope? The card
> > allows up to 25 MHz clock, normally that means edges should
> > be < 5 ns rise/fall time. You  cannot see noise / glitches on a
> > low-bandwidth scope.
>
> The cards SPI speed is defined as 400 KHz max, and my scope can handle 80
> MHz.  I think thats enough to be able to see dirty signals

There is a difference between clock speed and edge rate.  The logic
inside the SD card can be sensitive to a glitch that is only 1 ns wide
which would not show on your scope.  Further, if the clock edge is
slow, when it crosses the threshold of the input, the logic inside the
SD card will put noise on the ground called ground bounce.  This can
make the input appear to return across the threshold and back again
giving two transitions instead of just one.  You will not see any of
this on an 80 MHz scope and may not see it on a much faster scope
since everything other than the slow edge rate is happening inside the
SD card.

I know the SD card is not a high speed device with hugely fast edge
rates, but the same things happen in slow devices, just to a lesser
degree.  When you use a slow clock edge it become sensitive to even a
slight amount of ground bounce or other noise.

Rick



Re: Micro-SD card initialisation-problem - R.Wieser - 03:45 19-07-08

Hello Don,

> I don't know if you are doing this to interface to an
> embedded system or not,

In that case I can use my 36-in-1 card-reading/writing USB-stick. :-)

But yes, the idea is to hook it up to an Atmel so I can retrieve, from the
card, some voice-files (adpcm, pre-loaded onto it by a PC) to replay.

I could buy me a solution like you linked to, but I'm a bit of a hobbyist
and would like to be able to and having fun trying to do it myself.

Thanks for the link though.

Regards,
  Rudy Wieser


Don McKenzie <5V@2.5A> schreef in berichtnieuws
6...@mid.individual.net...
> R.Wieser wrote:
> > Hello all,
> >
> >   I've connected a Micro-SD card to my printerport (using very simple 5v
to
> > 3v voltage-step-down by three diodes and a resistor, signal step-down by
a
> > 1k8, 3k3 resistor combination), and am attempting to read from it.
>
> Rudy,
>
> I don't know if you are doing this to interface to an embedded system or
> not, but this is an off the shelf application, that has the hard work
> done at a cost:
>
>
http://www.dontronics-shop.com/4d-udrive-usd-g1-tiny-disk-drive-data-storage
-module.html
>
> Cheers Don...




Re: Micro-SD card initialisation-problem - R.Wieser - 03:53 19-07-08

Hello rickman,

> When you use a slow clock edge it become sensitive to
> even a slight amount of ground bounce or other noise.

You've described a problem that I can't see and can't check for.  What am I
supposed to do with it ?   Give up ? :-\

Regards,
  Rudy Wieser


rickman <g...@gmail.com> schreef in berichtnieuws
6...@w7g2000hsa.googlegroups.com...
> On Jul 18, 5:59 pm, "R.Wieser" <addr...@not.available> wrote:
> > Hello Arie,
> >
> > > Depends on the input capacitance of the card, cable
> > > length, etc... Someone might have been lucky.
> >
> > Ofcourse.  That is why I checked with the scope when the card refused to
> > initialize.  Just to make sure.
> >
> > > Yes. that's why I always use buffers - or a spec'ed driver
> > > and short connections.
> >
> > If nothing else works I'll surely try it.  Currently the setup is
acceptable
> > to the SanDisk card.
> >
> > But ...  The "bad" card only "gives up" after a number of times (3 to 10
> > when using CMD1), never at the first time (and that is after the CMD0
has
> > been accepted ofcourse).  That seems to indicate that the communication
is
> > o.k..
> >
> > > Without reflections? Or are you using a 10 MHz scope? The card
> > > allows up to 25 MHz clock, normally that means edges should
> > > be < 5 ns rise/fall time. You  cannot see noise / glitches on a
> > > low-bandwidth scope.
> >
> > The cards SPI speed is defined as 400 KHz max, and my scope can handle
80
> > MHz.  I think thats enough to be able to see dirty signals
>
> There is a difference between clock speed and edge rate.  The logic
> inside the SD card can be sensitive to a glitch that is only 1 ns wide
> which would not show on your scope.  Further, if the clock edge is
> slow, when it crosses the threshold of the input, the logic inside the
> SD card will put noise on the ground called ground bounce.  This can
> make the input appear to return across the threshold and back again
> giving two transitions instead of just one.  You will not see any of
> this on an 80 MHz scope and may not see it on a much faster scope
> since everything other than the slow edge rate is happening inside the
> SD card.
>
> I know the SD card is not a high speed device with hugely fast edge
> rates, but the same things happen in slow devices, just to a lesser
> degree.  When you use a slow clock edge it become sensitive to even a
> slight amount of ground bounce or other noise.
>
> Rick




Re: Micro-SD card initialisation-problem - Arie - 04:32 19-07-08

"R.Wieser" <a...@not.available> wrote in message 
news:48819d16$1$14351$e...@news.xs4all.nl...
> Hello rickman,
>
>> When you use a slow clock edge it become sensitive to
>> even a slight amount of ground bounce or other noise.
>
> You've described a problem that I can't see and can't check for.  What am 
> I
> supposed to do with it ?   Give up ? :-\
>
> Regards,
>  Rudy Wieser

Do a differential diagnosis: hook up a schmittrigger buffer in the clock 
line, very close to the card, and see if it makes a difference. If it does, 
the clock edge is a problem, else not. Also keep the GND and VCC connection 
between card and buffer short, and the buffer (and card!!!) supply lines 
well decoupled: 100 nF should do, but check for VCC noise with your scope. 
And yes, an 80 MHz scope is enough.

Arie de Muynck



Re: Micro-SD card initialisation-problem - CBFalconer - 04:57 19-07-08

"R.Wieser" wrote:
> 
>> When you use a slow clock edge it become sensitive to
>> even a slight amount of ground bounce or other noise.
> 
> You've described a problem that I can't see and can't check for. 
> What am I supposed to do with it ?   Give up ? :-\

Please do not top-post.  Your answer belongs after (or intermixed
with) the quoted material to which you reply, after snipping all
irrelevant material.  See the following links:

  <http://www.catb.org/~esr/faqs/smart-questions.html>;
  <http://www.caliburn.nl/topposting.html>;
  <http://www.netmeister.org/news/learn2quote.html>;
  <http://cfaj.freeshell.org/google/>;  (taming google)
  <http://members.fortunecity.com/nnqweb/>;  (newusers)

-- 
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: <http://cbfalconer.home.att.net>;
            Try the download section.


Re: Micro-SD card initialisation-problem - Resolved - R.Wieser - 06:46 19-07-08

R.Wieser <a...@not.available> schreef in berichtnieuws
487f9cf0$0$14357$e...@news.xs4all.nl...
> Hello all,
>
>   I've connected a Micro-SD card to my printerport (using very simple 5v
to
> 3v voltage-step-down by three diodes and a resistor, signal step-down by a
> 1k8, 3k3 resistor combination), and am attempting to read from it.
>
> The problem is that I can't seemto be able to get past the
> initialisation-process.

The cause of the problem was, looking back, a simple one : the power-supply
(the above-mentioned diode step-down) could not handle the "bad" cards
current. :-|

I changed the above setup to, as a test, a standard 220 Ohm - 3v1 zener
configuration, and was rewarded with *both* cards being unable to
initialize.   I than hooked up the scope to the chips powerline and
chip-select, and noticed a power-drop (to below 2.5 volts) just before the
card became un-responsive.

I had noticed it before, but did not think much of it.  But inbetween I did
read in the specs that the card could draw upto 60 mA, which made me
reconsider the drop-down setup.

I made a simple one transistor voltage-stabelizer, and what-do-you-know,
both cards initialized without a problem.

A bit of a lesson I guess : don't assume that a real-world diode behaves
like the theoretical one.  :-)  In this case the internal resistance of the
three diodes (connected from 5v to the cards powerline and than, thru a
led-resistor combination, to ground (so there would allways flow a
reasonable amout of current to get the diodes working) ) was enough to, at
initialize-time, to make the supply-voltage drop enough to make the card got
in rejection-mode ("ina" state(?) as mentioned on page 33 in the
hitachi_hb28b128mm2.pdf docs)

Regards,
  Rudy Wieser




Re: Micro-SD card initialisation-problem - R.Wieser - 11:26 19-07-08

Hello CBFalconer,

> Please do not top-post.

You are welcome to your own preference.  But if I have to listen to all of
them I will have to post multiple versions of everything I write (one top,
one bottom, one interleaved, and than the same but with the *whole* thread
above or below it).

But that would only mean I would be "right" in only 1/5 of those posts, and
"wrong" in all the others (and thats apart from all the troubles I would get
into by "doubleposting" :-\ )

So I have choosen to create interleaved posts (using references from the
origional and my responses to them), whith the origional post *as a
reference* below it (so technically I'm neither a top nor bottom-poster).

Personally I dislike bottom-posting : when I open such a message I see an
*old* message instead of the new information.  Very funny when multiple
people respond to the same message.

Next time just stop reading where you see, after two blank lines, a "<name>
<url> wrote in message" line pop-up.  :-)

Regards,
  Rudy Wieser


CBFalconer <c...@yahoo.com> schreef in berichtnieuws
4...@yahoo.com...
> "R.Wieser" wrote:
> >
> >> When you use a slow clock edge it become sensitive to
> >> even a slight amount of ground bounce or other noise.
> >
> > You've described a problem that I can't see and can't check for.
> > What am I supposed to do with it ?   Give up ? :-\
>
> Please do not top-post.  Your answer belongs after (or intermixed
> with) the quoted material to which you reply, after snipping all
> irrelevant material.  See the following links:
>
>   <http://www.catb.org/~esr/faqs/smart-questions.html>;
>   <http://www.caliburn.nl/topposting.html>;
>   <http://www.netmeister.org/news/learn2quote.html>;
>   <http://cfaj.freeshell.org/google/>;  (taming google)
>   <http://members.fortunecity.com/nnqweb/>;  (newusers)
>
> --
>  [mail]: Chuck F (cbfalconer at maineline dot net)
>  [page]: <http://cbfalconer.home.att.net>;
>             Try the download section.




Re: Micro-SD card initialisation-problem - Resolved - Mark Borgerson - 13:17 19-07-08

In article <4881c5a2$0$14346$e...@news.xs4all.nl>, 
a...@not.available says...
> R.Wieser <a...@not.available> schreef in berichtnieuws
> 487f9cf0$0$14357$e...@news.xs4all.nl...
> > Hello all,
> >
> >   I've connected a Micro-SD card to my printerport (using very simple 5v
> to
> > 3v voltage-step-down by three diodes and a resistor, signal step-down by a
> > 1k8, 3k3 resistor combination), and am attempting to read from it.
> >
> > The problem is that I can't seemto be able to get past the
> > initialisation-process.
> 
> The cause of the problem was, looking back, a simple one : the power-supply
> (the above-mentioned diode step-down) could not handle the "bad" cards
> current. :-|
> 
> I changed the above setup to, as a test, a standard 220 Ohm - 3v1 zener
> configuration, and was rewarded with *both* cards being unable to
> initialize.   I than hooked up the scope to the chips powerline and
> chip-select, and noticed a power-drop (to below 2.5 volts) just before the
> card became un-responsive.
> 
> I had noticed it before, but did not think much of it.  But inbetween I did
> read in the specs that the card could draw upto 60 mA, which made me
> reconsider the drop-down setup.
> 
> I made a simple one transistor voltage-stabelizer, and what-do-you-know,
> both cards initialized without a problem.
> 
> A bit of a lesson I guess : don't assume that a real-world diode behaves
> like the theoretical one.  :-)  In this case the internal resistance of the
> three diodes (connected from 5v to the cards powerline and than, thru a
> led-resistor combination, to ground (so there would allways flow a
> reasonable amout of current to get the diodes working) ) was enough to, at
> initialize-time, to make the supply-voltage drop enough to make the card got
> in rejection-mode ("ina" state(?) as mentioned on page 33 in the
> hitachi_hb28b128mm2.pdf docs)
> 
>
You would have had fewer pins to solder, and a better result,  if you
had used a 3-terminal  3.3V regulator in the first place.  After
many such problems,  I've been keeping a tray full of various regulators
handy for many years now.

In hindsight,  I, and probably others here, should have caught the
potential problem with power supply.  I was aware that SD cards 
consume significant power while writing a block, and have even 
factored that power into battery life calculations for low-power
loggers.


Mark Borgerson


Re: Micro-SD card initialisation-problem - Resolved - R.Wieser - 15:44 19-07-08

Hello Mark,

> You would have had fewer pins to solder, and a better result,
> if you had used a 3-terminal  3.3V regulator in the first place.

If I had one I would probably have used it.   The problem is that I'm living
in a town with a single electronics-store which does not carry much "odd"
components.  A few 78(L)XX and 79(L)XX stabelizers is about all I can get.
And alas, I'm not too happy about ordering stuff off the web ...

> In hindsight,  I, and probably others here, should have caught
> the potential problem with power supply.  I was aware that
> SD cards consume significant power while writing a block,

When I read about the card being able to draw upto 60 or even 80 mA I did
not think much about it myself, cause I was just *initializing* the card,
not *writing* to it, right ?  Guess I thought wrong too. :-)

Regards,
  Rudy Wieser


Mark Borgerson <m...@comcast.net> schreef in berichtnieuws
M...@newsgroups.comcast.net...
> In article <4881c5a2$0$14346$e...@news.xs4all.nl>,
> a...@not.available says...
> > R.Wieser <a...@not.available> schreef in berichtnieuws
> > 487f9cf0$0$14357$e...@news.xs4all.nl...
> > > Hello all,
> > >
> > >   I've connected a Micro-SD card to my printerport (using very simple
5v
> > to
> > > 3v voltage-step-down by three diodes and a resistor, signal step-down
by a
> > > 1k8, 3k3 resistor combination), and am attempting to read from it.
> > >
> > > The problem is that I can't seemto be able to get past the
> > > initialisation-process.
> >
> > The cause of the problem was, looking back, a simple one : the
power-supply
> > (the above-mentioned diode step-down) could not handle the "bad" cards
> > current. :-|
> >
> > I changed the above setup to, as a test, a standard 220 Ohm - 3v1 zener
> > configuration, and was rewarded with *both* cards being unable to
> > initialize.   I than hooked up the scope to the chips powerline and
> > chip-select, and noticed a power-drop (to below 2.5 volts) just before
the
> > card became un-responsive.
> >
> > I had noticed it before, but did not think much of it.  But inbetween I
did
> > read in the specs that the card could draw upto 60 mA, which made me
> > reconsider the drop-down setup.
> >
> > I made a simple one transistor voltage-stabelizer, and what-do-you-know,
> > both cards initialized without a problem.
> >
> > A bit of a lesson I guess : don't assume that a real-world diode behaves
> > like the theoretical one.  :-)  In this case the internal resistance of
the
> > three diodes (connected from 5v to the cards powerline and than, thru a
> > led-resistor combination, to ground (so there would allways flow a
> > reasonable amout of current to get the diodes working) ) was enough to,
at
> > initialize-time, to make the supply-voltage drop enough to make the card
got
> > in rejection-mode ("ina" state(?) as mentioned on page 33 in the
> > hitachi_hb28b128mm2.pdf docs)
> >
> >
> You would have had fewer pins to solder, and a better result,  if you
> had used a 3-terminal  3.3V regulator in the first place.  After
> many such problems,  I've been keeping a tray full of various regulators
> handy for many years now.
>
> In hindsight,  I, and probably others here, should have caught the
> potential problem with power supply.  I was aware that SD cards
> consume significant power while writing a block, and have even
> factored that power into battery life calculations for low-power
> loggers.
>
>
> Mark Borgerson




Re: Micro-SD card initialisation-problem - Resolved - Mark Borgerson - 19:48 19-07-08

In article <488243cf$0$15203$e...@dreader15.news.xs4all.nl>, 
a...@not.available says...
> Hello Mark,
> 
> > You would have had fewer pins to solder, and a better result,
> > if you had used a 3-terminal  3.3V regulator in the first place.
> 
> If I had one I would probably have used it.   The problem is that I'm living
> in a town with a single electronics-store which does not carry much "odd"
> components.  A few 78(L)XX and 79(L)XX stabelizers is about all I can get.
> And alas, I'm not too happy about ordering stuff off the web ...

A matter of personal preferences, I suppose.  I couldn't be a self-
employed embedded systems designer without being able to order
my parts from Digi-Key and others.   I  try to group up orders so
that the $20 for 2nd day air shipment is less than 10% of the
order cost.   Since I build prototypes and small-volume parts
with a good margin,  a parts shipment cost of 10% is not 
an issue.
> 
> > In hindsight,  I, and probably others here, should have caught
> > the potential problem with power supply.  I was aware that
> > SD cards consume significant power while writing a block,
> 
> When I read about the card being able to draw upto 60 or even 80 mA I did
> not think much about it myself, cause I was just *initializing* the card,
> not *writing* to it, right ?  Guess I thought wrong too. :-)

There's a little processor in there that cranks up to full speed when
it receives those commands---so as to be ready for reads or writes
with minimal latency.


Mark Borgerson


> 
> Regards,
>   Rudy Wieser
> 
> 
> Mark Borgerson <m...@comcast.net> schreef in berichtnieuws
> M...@newsgroups.comcast.net...
> > In article <4881c5a2$0$14346$e...@news.xs4all.nl>,
> > a...@not.available says...
> > > R.Wieser <a...@not.available> schreef in berichtnieuws
> > > 487f9cf0$0$14357$e...@news.xs4all.nl...
> > > > Hello all,
> > > >
> > > >   I've connected a Micro-SD card to my printerport (using very simple
> 5v
> > > to
> > > > 3v voltage-step-down by three diodes and a resistor, signal step-down
> by a
> > > > 1k8, 3k3 resistor combination), and am attempting to read from it.
> > > >
> > > > The problem is that I can't seemto be able to get past the
> > > > initialisation-process.
> > >
> > > The cause of the problem was, looking back, a simple one : the
> power-supply
> > > (the above-mentioned diode step-down) could not handle the "bad" cards
> > > current. :-|
> > >
> > > I changed the above setup to, as a test, a standard 220 Ohm - 3v1 zener
> > > configuration, and was rewarded with *both* cards being unable to
> > > initialize.   I than hooked up the scope to the chips powerline and
> > > chip-select, and noticed a power-drop (to below 2.5 volts) just before
> the
> > > card became un-responsive.
> > >
> > > I had noticed it before, but did not think much of it.  But inbetween I
> did
> > > read in the specs that the card could draw upto 60 mA, which made me
> > > reconsider the drop-down setup.
> > >
> > > I made a simple one transistor voltage-stabelizer, and what-do-you-know,
> > > both cards initialized without a problem.
> > >
> > > A bit of a lesson I guess : don't assume that a real-world diode behaves
> > > like the theoretical one.  :-)  In this case the internal resistance of
> the
> > > three diodes (connected from 5v to the cards powerline and than, thru a
> > > led-resistor combination, to ground (so there would allways flow a
> > > reasonable amout of current to get the diodes working) ) was enough to,
> at
> > > initialize-time, to make the supply-voltage drop enough to make the card
> got
> > > in rejection-mode ("ina" state(?) as mentioned on page 33 in the
> > > hitachi_hb28b128mm2.pdf docs)
> > >
> > >
> > You would have had fewer pins to solder, and a better result,  if you
> > had used a 3-terminal  3.3V regulator in the first place.  After
> > many such problems,  I've been keeping a tray full of various regulators
> > handy for many years now.
> >
> > In hindsight,  I, and probably others here, should have caught the
> > potential problem with power supply.  I was aware that SD cards
> > consume significant power while writing a block, and have even
> > factored that power into battery life calculations for low-power
> > loggers.
> >
> >
> > Mark Borgerson
> 
> 
> 
> 

previous | 1 | 2 | 3 | 4 | next