SD card problem!
2005-03-25 by Atanas Tulbenski
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2005-03-25 by Atanas Tulbenski
I'm using SD card with LPC2124. At first I used software SPI and everything was fine. When I start using hardware SPI got problem. The SD card initializes, I can read serial numbers, but I cant read data using CMD17. The card returns error code 0x04 "ilegal command". Any sugestions?
2005-03-25 by garg_priti
Can you please explain in a bit detail what you mean by Software SPI and hardware SPI. --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" <top4e@y...> wrote: > > I'm using SD card with LPC2124. At first I used software SPI and > everything was fine. When I start using hardware SPI got problem. The > SD card initializes, I can read serial numbers, but I cant read data > using CMD17. The card returns error code 0x04 "ilegal command". Any > sugestions?
2005-03-25 by Atanas Tulbenski
Software SPI I mean SPI interface realized by software "bitbanging" and the hardware SPI means using hardware SPI module. --- In lpc2000@yahoogroups.com, "garg_priti" <garg_priti@y...> wrote: > > > Can you please explain in a bit detail what you mean by Software SPI
> and hardware SPI. > --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" <top4e@y...> > wrote: > > > > I'm using SD card with LPC2124. At first I used software SPI and > > everything was fine. When I start using hardware SPI got problem. > The > > SD card initializes, I can read serial numbers, but I cant read > data > > using CMD17. The card returns error code 0x04 "ilegal command". > Any > > sugestions?
2005-03-25 by Gus
check your polarity and idle state of SCLK. Why don't you scope it and compare sotware sPI to hardware SPI? We have it working, no problems. http://www.ghielectronics.com/ALFAT-SD.htm Gus --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" <top4e@y...> wrote: > > I'm using SD card with LPC2124. At first I used software SPI and > everything was fine. When I start using hardware SPI got problem. The > SD card initializes, I can read serial numbers, but I cant read data > using CMD17. The card returns error code 0x04 "ilegal command". Any > sugestions?
2005-03-28 by Atanas Tulbenski
The SPI now is fine. I can read registers of the SD card. But I cant read the flash memmory. On CMD17 command the card returns ilegal command, and CSR (Card Status Register) is 0x01FF, which means "CARD IS LOCKED". How can I unlock the card? Any ideas! --- In lpc2000@yahoogroups.com, "Gus" <gus_is_working@y...> wrote:
> > check your polarity and idle state of SCLK. Why don't you scope it > and compare sotware sPI to hardware SPI? > > We have it working, no problems. > http://www.ghielectronics.com/ALFAT-SD.htm > > Gus > > --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" <top4e@y...> > wrote: > > > > I'm using SD card with LPC2124. At first I used software SPI and > > everything was fine. When I start using hardware SPI got problem. > The > > SD card initializes, I can read serial numbers, but I cant read > data > > using CMD17. The card returns error code 0x04 "ilegal command". > Any > > sugestions?
2005-04-02 by Michael Anburaj
Where can I buy SDIO connectors in retail quantity (1 or 2) \ufffd In-store California or online? Thanks, -Mike. --- Gus <gus_is_working@...> wrote: > > check your polarity and idle state of SCLK. Why > don't you scope it > and compare sotware sPI to hardware SPI? > > We have it working, no problems. > http://www.ghielectronics.com/ALFAT-SD.htm > > Gus > > --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" > <top4e@y...> > wrote: > > > > I'm using SD card with LPC2124. At first I used > software SPI and > > everything was fine. When I start using hardware > SPI got problem. > The > > SD card initializes, I can read serial numbers, > but I cant read > data > > using CMD17. The card returns error code 0x04 > "ilegal command". > Any > > sugestions? > > > > __________________________________ Yahoo! Messenger Show us what our next emoticon should look like. Join the fun. http://www.advision.webevents.yahoo.com/emoticontest
2005-04-02 by donhamilton2002
http://www.sparkfun.com/shop/index.php?shop=1&cart=204636&cat=1&itemid=330& http://www.sparkfun.com/shop/index.php?shop=1&cart=204636&cat=1&itemid=331&
2005-04-03 by Dan Beadle
Mouser (www.mouser.com) has 17 items listed if you seach on mmc then drill down to connectors. A typical part is 688-SCDA1A0701. Cost is $2.16 for one.
-----Original Message----- From: Michael Anburaj [mailto:embeddedeng@yahoo.com] Sent: Saturday, April 02, 2005 11:02 AM To: lpc2000@yahoogroups.com Subject: Re: [lpc2000] Re: SD card problem! Where can I buy SDIO connectors in retail quantity (1 or 2) In-store California or online? Thanks, -Mike. --- Gus <gus_is_working@...> wrote: > > check your polarity and idle state of SCLK. Why > don't you scope it > and compare sotware sPI to hardware SPI? > > We have it working, no problems. > http://www.ghielectronics.com/ALFAT-SD.htm > > Gus > > --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" > <top4e@y...> > wrote: > > > > I'm using SD card with LPC2124. At first I used > software SPI and > > everything was fine. When I start using hardware > SPI got problem. > The > > SD card initializes, I can read serial numbers, > but I cant read > data > > using CMD17. The card returns error code 0x04 > "ilegal command". > Any > > sugestions? > > > > __________________________________ Yahoo! Messenger Show us what our next emoticon should look like. Join the fun. http://www.advision.webevents.yahoo.com/emoticontest Yahoo! Groups Links
2005-05-08 by Sunil Jha
Hi Atanas,
I am trying to initialize my Mini SD memory card in SPI mode
using LPC2129, but after lots of effort not able to do so. The SPI
bus is working with another SPI IC, i have tested it before
connecting to memory. I have incorporated corrections - Pull SSEL to
high and use another GPIO as SSEL.Every time i am getting response
0xFF from memory. Below is my code:
---------------------------------------------------------------------
void init_SPI0 (void)
{
PINSEL0 |= 0x00005500;
//Enable SPI0 pins
IODIR0 |= 0x00000001;
//Enable Chipselect pin as output
S0SPCCR = 0x0000001E;
//Set bit timing PCLK/30
S0SPCR = 0x000000A0;
//Configure as SPI Master interrupts enabled
IOSET0 |= CS; //Pull Chipselect high
}
void init_memory(void)
{
unsigned char txstatus, byteread;
IOCLR0 |= CS; //Pull Chipselect low
S0SPDR = 0x40;
while (!(S0SPSR & 0x80))
putchar('+');
txstatus = S0SPSR;
S0SPDR;
sprintf(str,"Transmit Status 0x40 %x\n",txstatus);
putstr(str);
S0SPDR = 0x00;
while (!(S0SPSR & 0x80))
putchar('+');
txstatus = S0SPSR;
S0SPDR;
sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
putstr(str);
S0SPDR = 0x00;
while (!(S0SPSR & 0x80))
putchar('+');
txstatus = S0SPSR;
S0SPDR;
sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
putstr(str);
S0SPDR = 0x00;
while (!(S0SPSR & 0x80))
putchar('+');
txstatus = S0SPSR;
S0SPDR;
sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
putstr(str);
S0SPDR = 0x00;
while (!(S0SPSR & 0x80))
putchar('+');
txstatus = S0SPSR;
S0SPDR;
sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
putstr(str);
S0SPDR = 0x95;
while (!(S0SPSR & 0x80))
putchar('+');
txstatus = S0SPSR;
S0SPDR;
sprintf(str,"Transmit Status 0x95 %x\n",txstatus);
putstr(str);
S0SPDR = 0xFF;
while (!(S0SPSR & 0x80))
putchar('.');;
txstatus = S0SPSR;
byteread = S0SPDR;
sprintf(str,"Byte Read %x\n",byteread);
putstr(str);
}
-----------------------------------------------------------------
If you have acheived this can you please help me in getting my card
initialized for SPI mode?
regards,
Sunil
--- In lpc2000@yahoogroups.com, "Atanas Tulbenski" <top4e@y...>
wrote:
>
> I'm using SD card with LPC2124. At first I used software SPI and
> everything was fine. When I start using hardware SPI got problem.
The
> SD card initializes, I can read serial numbers, but I cant read
data
> using CMD17. The card returns error code 0x04 "ilegal command".
Any
> sugestions?2005-05-08 by Sunil Jha
Hi Gus, What should be the polarity and phase for SD memory card? thanks, Sunil --- In lpc2000@yahoogroups.com, "Gus" <gus_is_working@y...> wrote: > > check your polarity and idle state of SCLK. Why don't you scope it > and compare sotware sPI to hardware SPI? > > We have it working, no problems. > http://www.ghielectronics.com/ALFAT-SD.htm > > Gus > > --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" <top4e@y...> > wrote: > > > > I'm using SD card with LPC2124. At first I used software SPI and > > everything was fine. When I start using hardware SPI got problem.
> The > > SD card initializes, I can read serial numbers, but I cant read > data > > using CMD17. The card returns error code 0x04 "ilegal command". > Any > > sugestions?
2005-05-08 by Gus
change these in your code
S0SPCCR=8;
S0SPCR=0x30;
Make sure the hardware CS pin of SPI is connected to VCC
look at the schematics on our website
www.ghielectronics.com
Gus
--- In lpc2000@yahoogroups.com, "Sunil Jha" <jha0574@y...> wrote:
> Hi Atanas,
> I am trying to initialize my Mini SD memory card in SPI mode
> using LPC2129, but after lots of effort not able to do so. The SPI
> bus is working with another SPI IC, i have tested it before
> connecting to memory. I have incorporated corrections - Pull SSEL
to
> high and use another GPIO as SSEL.Every time i am getting response
> 0xFF from memory. Below is my code:
> -------------------------------------------------------------------
--
> void init_SPI0 (void)
> {
> PINSEL0 |= 0x00005500;
> //Enable SPI0 pins
> IODIR0 |= 0x00000001;
> //Enable Chipselect pin as output
>
> S0SPCCR = 0x0000001E;
> //Set bit timing PCLK/30
> S0SPCR = 0x000000A0;
> //Configure as SPI Master interrupts enabled
>
> IOSET0 |= CS; //Pull Chipselect high
>
> }
>
> void init_memory(void)
> {
> unsigned char txstatus, byteread;
>
> IOCLR0 |= CS; //Pull Chipselect low
>
> S0SPDR = 0x40;
> while (!(S0SPSR & 0x80))
> putchar('+');
> txstatus = S0SPSR;
> S0SPDR;
> sprintf(str,"Transmit Status 0x40 %x\n",txstatus);
> putstr(str);
>
> S0SPDR = 0x00;
> while (!(S0SPSR & 0x80))
> putchar('+');
> txstatus = S0SPSR;
> S0SPDR;
> sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> putstr(str);
>
> S0SPDR = 0x00;
> while (!(S0SPSR & 0x80))
> putchar('+');
> txstatus = S0SPSR;
> S0SPDR;
> sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> putstr(str);
>
> S0SPDR = 0x00;
> while (!(S0SPSR & 0x80))
> putchar('+');
> txstatus = S0SPSR;
> S0SPDR;
> sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> putstr(str);
>
> S0SPDR = 0x00;
> while (!(S0SPSR & 0x80))
> putchar('+');
> txstatus = S0SPSR;
> S0SPDR;
> sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> putstr(str);
>
> S0SPDR = 0x95;
> while (!(S0SPSR & 0x80))
> putchar('+');
> txstatus = S0SPSR;
> S0SPDR;
> sprintf(str,"Transmit Status 0x95 %x\n",txstatus);
> putstr(str);
>
> S0SPDR = 0xFF;
> while (!(S0SPSR & 0x80))
> putchar('.');;
> txstatus = S0SPSR;
> byteread = S0SPDR;
> sprintf(str,"Byte Read %x\n",byteread);
> putstr(str);
> }
> -----------------------------------------------------------------
>
> If you have acheived this can you please help me in getting my
card
> initialized for SPI mode?
>
> regards,
> Sunil
>
> --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" <top4e@y...>
> wrote:
> >
> > I'm using SD card with LPC2124. At first I used software SPI
and
> > everything was fine. When I start using hardware SPI got
problem. > The > > SD card initializes, I can read serial numbers, but I cant read > data > > using CMD17. The card returns error code 0x04 "ilegal command". > Any > > sugestions?
2005-05-08 by Sunil Jha
Hi Gus,
Actually setting S0SPCCR = 8 makes SPI clock rate = 1.875 MHz
(Xtal=12 MHz, PLL MSEL=5 PSEL=2, VPBDIV=2). Can you let me know
which speed will be fine with mini SD memory card? At present I am
working with 0.5 MHz.
S0SPCR=0x30 makes CPOL=1 which is not working in my case. With this
I am getting Response of CMD0 as 0x00. With CPOL=0, setting
S0SPCR=0x20, the response byte of CMD0=0x01. Which indicates card in
Idle State and is expected.
One more help.. After Initializing in SPI Mode through CMD0 what
would be the command sequence for reading CID register or performing
any Read/Write operation? Also is it required to pull-up MOSI and
MISO lines?
In one Forum at Microchip, I saw it is recommended to pad oxFF
before and after CMD0 command. Now CMDO is 0xFF 0x40 0x00 0x00 0x00
0x00 0x95 0xFF. I tried it and it is giving response 0x01.
Please help me in understanding these problems and rectifying them.
regards,
Sunil
--- In lpc2000@yahoogroups.com, "Gus" <gus_is_working@y...> wrote:
> change these in your code
>
> S0SPCCR=8;
> S0SPCR=0x30;
>
> Make sure the hardware CS pin of SPI is connected to VCC
>
> look at the schematics on our website
>
> www.ghielectronics.com
>
> Gus
>
> --- In lpc2000@yahoogroups.com, "Sunil Jha" <jha0574@y...> wrote:
> > Hi Atanas,
> > I am trying to initialize my Mini SD memory card in SPI mode
> > using LPC2129, but after lots of effort not able to do so. The
SPI
> > bus is working with another SPI IC, i have tested it before
> > connecting to memory. I have incorporated corrections - Pull
SSEL
> to
> > high and use another GPIO as SSEL.Every time i am getting
response
> > 0xFF from memory. Below is my code:
> > -----------------------------------------------------------------
--
> --
> > void init_SPI0 (void)
> > {
> > PINSEL0 |= 0x00005500;
> > //Enable SPI0 pins
> > IODIR0 |= 0x00000001;
> > //Enable Chipselect pin as output
> >
> > S0SPCCR = 0x0000001E;
> > //Set bit timing PCLK/30
> > S0SPCR = 0x000000A0;
> > //Configure as SPI Master interrupts enabled
> >
> > IOSET0 |= CS; //Pull Chipselect high
> >
> > }
> >
> > void init_memory(void)
> > {
> > unsigned char txstatus, byteread;
> >
> > IOCLR0 |= CS; //Pull Chipselect low
> >
> > S0SPDR = 0x40;
> > while (!(S0SPSR & 0x80))
> > putchar('+');
> > txstatus = S0SPSR;
> > S0SPDR;
> > sprintf(str,"Transmit Status 0x40 %x\n",txstatus);
> > putstr(str);
> >
> > S0SPDR = 0x00;
> > while (!(S0SPSR & 0x80))
> > putchar('+');
> > txstatus = S0SPSR;
> > S0SPDR;
> > sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> > putstr(str);
> >
> > S0SPDR = 0x00;
> > while (!(S0SPSR & 0x80))
> > putchar('+');
> > txstatus = S0SPSR;
> > S0SPDR;
> > sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> > putstr(str);
> >
> > S0SPDR = 0x00;
> > while (!(S0SPSR & 0x80))
> > putchar('+');
> > txstatus = S0SPSR;
> > S0SPDR;
> > sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> > putstr(str);
> >
> > S0SPDR = 0x00;
> > while (!(S0SPSR & 0x80))
> > putchar('+');
> > txstatus = S0SPSR;
> > S0SPDR;
> > sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> > putstr(str);
> >
> > S0SPDR = 0x95;
> > while (!(S0SPSR & 0x80))
> > putchar('+');
> > txstatus = S0SPSR;
> > S0SPDR;
> > sprintf(str,"Transmit Status 0x95 %x\n",txstatus);
> > putstr(str);
> >
> > S0SPDR = 0xFF;
> > while (!(S0SPSR & 0x80))
> > putchar('.');;
> > txstatus = S0SPSR;
> > byteread = S0SPDR;
> > sprintf(str,"Byte Read %x\n",byteread);
> > putstr(str);
> > }
> > -----------------------------------------------------------------
> >
> > If you have acheived this can you please help me in getting my
> card
> > initialized for SPI mode?
> >
> > regards,
> > Sunil
> >
> > --- In lpc2000@yahoogroups.com, "Atanas Tulbenski" <top4e@y...>
> > wrote:
> > >
> > > I'm using SD card with LPC2124. At first I used software SPI
> and
> > > everything was fine. When I start using hardware SPI got
> problem.
> > The
> > > SD card initializes, I can read serial numbers, but I cant
read
> > data
> > > using CMD17. The card returns error code 0x04 "ilegal
command".
> > Any
> > > sugestions?2005-05-09 by Gus
We never tried miniSD but I am assuming it is the same as SD!! and
for that I gave you the SPI settings that we have been using for 2
years! By the way, I am not the one who wrote the driver for SD so I
don't know much about it.
The SD manual is available at http://sandisk.com/oem/manuals.asp
If you need consulting, contact our company dirrectly and we will be
happy to help.
Gus
--- In lpc2000@yahoogroups.com, "Sunil Jha" <jha0574@y...> wrote:
> Hi Gus,
> Actually setting S0SPCCR = 8 makes SPI clock rate = 1.875 MHz
> (Xtal=12 MHz, PLL MSEL=5 PSEL=2, VPBDIV=2). Can you let me know
> which speed will be fine with mini SD memory card? At present I am
> working with 0.5 MHz.
>
> S0SPCR=0x30 makes CPOL=1 which is not working in my case. With
this
> I am getting Response of CMD0 as 0x00. With CPOL=0, setting
> S0SPCR=0x20, the response byte of CMD0=0x01. Which indicates card
in
> Idle State and is expected.
>
> One more help.. After Initializing in SPI Mode through CMD0 what
> would be the command sequence for reading CID register or
performing
> any Read/Write operation? Also is it required to pull-up MOSI and
> MISO lines?
>
> In one Forum at Microchip, I saw it is recommended to pad oxFF
> before and after CMD0 command. Now CMDO is 0xFF 0x40 0x00 0x00
0x00
> 0x00 0x95 0xFF. I tried it and it is giving response 0x01.
>
> Please help me in understanding these problems and rectifying them.
>
> regards,
> Sunil
>
>
> --- In lpc2000@yahoogroups.com, "Gus" <gus_is_working@y...> wrote:
> > change these in your code
> >
> > S0SPCCR=8;
> > S0SPCR=0x30;
> >
> > Make sure the hardware CS pin of SPI is connected to VCC
> >
> > look at the schematics on our website
> >
> > www.ghielectronics.com
> >
> > Gus
> >
> > --- In lpc2000@yahoogroups.com, "Sunil Jha" <jha0574@y...> wrote:
> > > Hi Atanas,
> > > I am trying to initialize my Mini SD memory card in SPI
mode
> > > using LPC2129, but after lots of effort not able to do so. The
> SPI
> > > bus is working with another SPI IC, i have tested it before
> > > connecting to memory. I have incorporated corrections - Pull
> SSEL
> > to
> > > high and use another GPIO as SSEL.Every time i am getting
> response
> > > 0xFF from memory. Below is my code:
> > > ---------------------------------------------------------------
--
> --
> > --
> > > void init_SPI0 (void)
> > > {
> > > PINSEL0 |= 0x00005500;
> > > //Enable SPI0 pins
> > > IODIR0 |= 0x00000001;
> > > //Enable Chipselect pin as output
> > >
> > > S0SPCCR = 0x0000001E;
> > > //Set bit timing PCLK/30
> > > S0SPCR = 0x000000A0;
> > > //Configure as SPI Master interrupts enabled
> > >
> > > IOSET0 |= CS; //Pull Chipselect high
> > >
> > > }
> > >
> > > void init_memory(void)
> > > {
> > > unsigned char txstatus, byteread;
> > >
> > > IOCLR0 |= CS; //Pull Chipselect low
> > >
> > > S0SPDR = 0x40;
> > > while (!(S0SPSR & 0x80))
> > > putchar('+');
> > > txstatus = S0SPSR;
> > > S0SPDR;
> > > sprintf(str,"Transmit Status 0x40 %x\n",txstatus);
> > > putstr(str);
> > >
> > > S0SPDR = 0x00;
> > > while (!(S0SPSR & 0x80))
> > > putchar('+');
> > > txstatus = S0SPSR;
> > > S0SPDR;
> > > sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> > > putstr(str);
> > >
> > > S0SPDR = 0x00;
> > > while (!(S0SPSR & 0x80))
> > > putchar('+');
> > > txstatus = S0SPSR;
> > > S0SPDR;
> > > sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> > > putstr(str);
> > >
> > > S0SPDR = 0x00;
> > > while (!(S0SPSR & 0x80))
> > > putchar('+');
> > > txstatus = S0SPSR;
> > > S0SPDR;
> > > sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> > > putstr(str);
> > >
> > > S0SPDR = 0x00;
> > > while (!(S0SPSR & 0x80))
> > > putchar('+');
> > > txstatus = S0SPSR;
> > > S0SPDR;
> > > sprintf(str,"Transmit Status 0x00 %x\n",txstatus);
> > > putstr(str);
> > >
> > > S0SPDR = 0x95;
> > > while (!(S0SPSR & 0x80))
> > > putchar('+');
> > > txstatus = S0SPSR;
> > > S0SPDR;
> > > sprintf(str,"Transmit Status 0x95 %x\n",txstatus);
> > > putstr(str);
> > >
> > > S0SPDR = 0xFF;
> > > while (!(S0SPSR & 0x80))
> > > putchar('.');;
> > > txstatus = S0SPSR;
> > > byteread = S0SPDR;
> > > sprintf(str,"Byte Read %x\n",byteread);
> > > putstr(str);
> > > }
> > > ---------------------------------------------------------------
--
> > >
> > > If you have acheived this can you please help me in getting my
> > card
> > > initialized for SPI mode?
> > >
> > > regards,
> > > Sunil
> > >
> > > --- In lpc2000@yahoogroups.com, "Atanas Tulbenski"
<top4e@y...>
> > > wrote:
> > > >
> > > > I'm using SD card with LPC2124. At first I used software
SPI > > and > > > > everything was fine. When I start using hardware SPI got > > problem. > > > The > > > > SD card initializes, I can read serial numbers, but I cant > read > > > data > > > > using CMD17. The card returns error code 0x04 "ilegal > command". > > > Any > > > > sugestions?
2005-05-10 by Clyde Stubbs
On Sun, May 08, 2005 at 10:50:38AM -0000, Sunil Jha wrote: > What should be the polarity and phase for SD memory card? The clock line idle state is high, data is latched on the second (rising) edge. Note that when the card is first accessed, the data output is open drain and requires a pullup - you must use a slow clock speed - the spec says 400kHz but I have found that even that is too fast for some cards - I use 200kHz. After initialization the output is push-pull and it will run at full speed (25MHz). Clyde -- Clyde Stubbs | HI-TECH Software Email: clyde@... | Phone Fax WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885 PGP: finger clyde@... | AUS: +61 7 3552 7777 +61 7 3552 7778 --------------------------------------------------------------------------- HI-TECH C: compiling the real world.
2005-05-10 by Sunil Jha
Thanks Clyde for your valuable feedback. It would be further great help to me if you can please let me know.. After Initializing in SPI Mode through CMD0 what would be the response value and what would be the command sequence for reading CID register or performing any Read/Write operation? Also is it required to pull-up MOSI and MISO lines? regards, Sunil Jha --- In lpc2000@yahoogroups.com, Clyde Stubbs <clyde@h...> wrote: > On Sun, May 08, 2005 at 10:50:38AM -0000, Sunil Jha wrote: > > What should be the polarity and phase for SD memory card? > > The clock line idle state is high, data is latched on the second > (rising) edge. > > Note that when the card is first accessed, the data output is open > drain and requires a pullup - you must use a slow clock speed - the > spec says 400kHz but I have found that even that is too fast for some > cards - I use 200kHz. After initialization the output is push-pull and > it will run at full speed (25MHz). > > Clyde > > -- > Clyde Stubbs | HI-TECH Software > Email: clyde@h... | Phone Fax > WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885 > PGP: finger clyde@h... | AUS: +61 7 3552 7777 +61 7 3552 7778 > ------------------------------------------------------------------- -------- > HI-TECH C: compiling the real world.