Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

LPC2148 and SD and Write Protect

LPC2148 and SD and Write Protect

2005-10-31 by seangra

Does anyone know (or have any references) for code for connecting an 
SD card to the LPC2148?  I've seen the olimex specs and I know that 
it's a basic SPI interface, but I'm just wondering about any other 
actual documentation or code that uses this.

Additionally how does the write protect circuit function?  I haven't 
been able to find any documentation or specification that tells me how 
the write protect circuit functions.  From what I understand it's a 
simple basic switch, pins 10 and 14 get connected together when the 
switch is closed.  But if this is the case, why did olimex hardwire 
Vcc and Vss (via resistors) on this, why not just leave the pins 
unconnected?  If I wanted to use the WP capability, do I just connect 
one to pull-up'd Vcc, and the other to a GPIO on the LPC?

Thanks for any help.

Re: [lpc2000] LPC2148 and SD and Write Protect

2005-10-31 by Tom Walsh

seangra wrote:

>Does anyone know (or have any references) for code for connecting an 
>SD card to the LPC2148?  I've seen the olimex specs and I know that 
>it's a basic SPI interface, but I'm just wondering about any other 
>actual documentation or code that uses this.
>
>Additionally how does the write protect circuit function?  I haven't 
>been able to find any documentation or specification that tells me how 
>the write protect circuit functions.  From what I understand it's a 
>simple basic switch, pins 10 and 14 get connected together when the 
>switch is closed.  But if this is the case, why did olimex hardwire 
>Vcc and Vss (via resistors) on this, why not just leave the pins 
>unconnected?  If I wanted to use the WP capability, do I just connect 
>one to pull-up'd Vcc, and the other to a GPIO on the LPC?
>
>  
>

Start here: http://www.elinux.org/wiki/MMC


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Re: LPC2148 and SD and Write Protect

2005-10-31 by rtstofer

From the gumstix group (www.gumstix.com or .org) I think I heard 
that the SD interface is proprietary and available to PAYING members 
only.  The MMC interface is available.

This could be way off but I think it is correct.

Richard

--- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote:
>
> seangra wrote:
> 
> >Does anyone know (or have any references) for code for connecting 
an 
> >SD card to the LPC2148?  I've seen the olimex specs and I know 
that 
> >it's a basic SPI interface, but I'm just wondering about any 
other 
> >actual documentation or code that uses this.
> >
> >Additionally how does the write protect circuit function?  I 
haven't 
> >been able to find any documentation or specification that tells 
me how 
> >the write protect circuit functions.  From what I understand it's 
a 
> >simple basic switch, pins 10 and 14 get connected together when 
the 
> >switch is closed.  But if this is the case, why did olimex 
hardwire 
> >Vcc and Vss (via resistors) on this, why not just leave the pins 
> >unconnected?  If I wanted to use the WP capability, do I just 
connect 
Show quoted textHide quoted text
> >one to pull-up'd Vcc, and the other to a GPIO on the LPC?
> >
> >  
> >
> 
> Start here: http://www.elinux.org/wiki/MMC
> 
> 
> -- 
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------------------------------------------
>

Re: [lpc2000] LPC2148 and SD and Write Protect

2005-10-31 by Joel Winarske

Sean wrote:
>Does anyone know (or have any references) for code for connecting an SD 
>card
>to the LPC2148?  I've seen the olimex specs and I know that it's a basic 
>SPI
>interface, but I'm just wondering about any other actual documentation or
>code that uses this.

This is a pretty important document to have:
http://sandisk.com/pdf/oem/ProdManualSDCardv1.9.pdf

>From what I understand it's a simple basic switch, pins 10 and 14 get
>connected together when the switch is closed.  But if this is the case, why
>did olimex hardwire Vcc and Vss (via resistors) on this, why not just leave
>the pins unconnected?  If I wanted to use the WP capability, do I just
>connect one to pull-up'd Vcc, and the other to a GPIO on the LPC?

Yes the Write-Protect and Card Present are just simple switches implemented 
in the socket.  What current is running through the switches on the Olimex 
design? Depending on the current it may be there to help maintain oxidation. 
Just a thought.

Joel

Re: LPC2148 and SD and Write Protect

2005-10-31 by mark_dell555

I was looking into SD a few days ago, and wikipedia has a nice
section, including 2 links to specs in pdf.

check out:
http://en.wikipedia.org/wiki/SD_card

and the 2 links:
http://www.sandisk.com/pdf/oem/SD_SDIO_specsv1.pdf
http://www.sandisk.com/pdf/oem/SD_Physical_specsv101.pdf


I think that should be a good start.

Cheers,
Mark

Re: LPC2148 and SD and Write Protect

2005-11-01 by seangra

--- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@i...> wrote:
>
> Sean wrote:
> This is a pretty important document to have:
> http://sandisk.com/pdf/oem/ProdManualSDCardv1.9.pdf

Thanks, that's exactly what I needed:

------------
A proper, matched, switch on the socket side will indicate to the 
host that the card is write-protected or not. It is the
responsibility of the host to protect the card. The position of the 
write protect switch is un-known to the internal
circuitry of the card.
------------

> What current is running through the switches on the Olimex 
> design? Depending on the current it may be there to help maintain 
oxidation. 

They have Vcc -> 33kohm -> WP1 ... WP2 -> 2kohm -> GND

So since the internal circutry has no idea about this, if I don't 
care about the write protect, then I can just leave WP1 and WP2 not 
connected, so why would they do that?  Unless they were planning at 
some point in time to also connect WP1 to a GPIO on the micro?

Re: [lpc2000] Re: LPC2148 and SD and Write Protect

2005-11-01 by Joel Winarske

>> What current is running through the switches on the Olimex
>> design? Depending on the current it may be there to help maintain
> oxidation.
>
> They have Vcc -> 33kohm -> WP1 ... WP2 -> 2kohm -> GND
>
> So since the internal circutry has no idea about this, if I don't
> care about the write protect, then I can just leave WP1 and WP2 not
> connected, so why would they do that?  Unless they were planning at
> some point in time to also connect WP1 to a GPIO on the micro?

They tie WP and CP to inputs on this design:
http://www.olimex.com/dev/images/sam7-p64-sch.gif

I imagine the resistors are populated as a feature, so if you want either or 
both signals simply add a jumper to the desired input pins.  If you are 
using a socket with higher quality metal, and depending on the end product 
environment, contact oxidation may never be a concern.  The finger contacts 
that connect to the actual SD card are self cleaning.

Joel

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.