Forums

SPI SD card help

Started by tanermutlu September 17, 2006
Hello
I need raw(with no file system) SPI code for driving
SD/MMC memory card for Keil or GNU compiler. I am
using Olimex LPC2294 board. I would appreciate any
help. I am in a kind of hurry..

Thanks in advance...

Taner Mutlu
Elektronik M.

__________________________________________________

An Engineer's Guide to the LPC2100 Series

Try this:

http://www.nxp.com/acrobat_download/applicationnotes/AN10406_2.pdf

--- In l..., tanermutlu wrote:
>
> Hello
> I need raw(with no file system) SPI code for driving
> SD/MMC memory card for Keil or GNU compiler. I am
> using Olimex LPC2294 board. I would appreciate any
> help. I am in a kind of hurry..
>
> Thanks in advance...
>
> Taner Mutlu
> Elektronik M.
>
> __________________________________________________



Thanks for the link..
I have seen this file..In LPC2294 there is no SSP port, so I had to
convert the code for SPI, I probably have done something wrong, and I
cant pass over the "IDLE_STATE_TIMEOUT" mode. That is why I asked if
somebody has code for directly "SPI" not SSP(Synchronous Serial Port).
Or how should I change the initialization part of the code?

Thanks in advance

--- In l..., "Sutton Mehaffey" wrote:
>
> Try this:
>
> http://www.nxp.com/acrobat_download/applicationnotes/AN10406_2.pdf
>
>
>
>
> --- In l..., tanermutlu wrote:
> >
> > Hello
> > I need raw(with no file system) SPI code for driving
> > SD/MMC memory card for Keil or GNU compiler. I am
> > using Olimex LPC2294 board. I would appreciate any
> > help. I am in a kind of hurry..
> >
> > Thanks in advance...
> >
> > Taner Mutlu
> > Elektronik M.
> >
> > __________________________________________________
> >
>



I got the app note code to work on SPI0 and SPI1 (SSP) on LPC2148
using Embedded Artists prototype board. I do think that there were a
few errors in the code, if I remember correctly. I don't have the
code at my disposal right this minute, but I will look when I have a
chance.

Sutton

--- In l..., "tanermutlunun" wrote:
>
> Thanks for the link..
> I have seen this file..In LPC2294 there is no SSP port, so I had to
> convert the code for SPI, I probably have done something wrong, and I
> cant pass over the "IDLE_STATE_TIMEOUT" mode. That is why I asked if
> somebody has code for directly "SPI" not SSP(Synchronous Serial Port).
> Or how should I change the initialization part of the code?
>
> Thanks in advance
>
> --- In l..., "Sutton Mehaffey" wrote:
> >
> > Try this:
> >
> > http://www.nxp.com/acrobat_download/applicationnotes/AN10406_2.pdf
> >
> >
> >
> >
> > --- In l..., tanermutlu wrote:
> > >
> > > Hello
> > > I need raw(with no file system) SPI code for driving
> > > SD/MMC memory card for Keil or GNU compiler. I am
> > > using Olimex LPC2294 board. I would appreciate any
> > > help. I am in a kind of hurry..
> > >
> > > Thanks in advance...
> > >
> > > Taner Mutlu
> > > Elektronik M.
> > >
> > > __________________________________________________
> > >
> > >
>



Thanks Sutton,

Luckily, I found one in the files section called "raw sd-mmc
access.zip". I will try that one..

Bye...

--- In l..., "Sutton Mehaffey" wrote:
>
> I got the app note code to work on SPI0 and SPI1 (SSP) on LPC2148
> using Embedded Artists prototype board. I do think that there were a
> few errors in the code, if I remember correctly. I don't have the
> code at my disposal right this minute, but I will look when I have a
> chance.
>
> Sutton
>
Taner,

I havce placed the file raw sd-mmc access.zip in the files section.
Works for both SPI0 and SSP, compiles in Keil (RealView)

Regards,
Carsten

--- In l..., tanermutlu wrote:
>
> Hello
> I need raw(with no file system) SPI code for driving
> SD/MMC memory card for Keil or GNU compiler. I am
> using Olimex LPC2294 board. I would appreciate any
> help. I am in a kind of hurry..
>
> Thanks in advance...
>
> Taner Mutlu
> Elektronik M.
>
> __________________________________________________



Thanks Carsten,
Now I will port it to Olimex board. I will only change the CS pin I
guess which is P0_10 in Olimex.

Bye..

--- In l..., Carsten Gr wrote:
>
> Taner,
>
> I havce placed the file raw sd-mmc access.zip in the files section.
> Works for both SPI0 and SSP, compiles in Keil (RealView)
>
> Regards,
> Carsten
>
> --- In l..., tanermutlu wrote:
> >
> > Hello
> > I need raw(with no file system) SPI code for driving
> > SD/MMC memory card for Keil or GNU compiler. I am
> > using Olimex LPC2294 board. I would appreciate any
> > help. I am in a kind of hurry..
> >
> > Thanks in advance...
> >
> > Taner Mutlu
> > Elektronik M.
> >
> > __________________________________________________
> >
>



Hello,

Ive got a problem with the SPI Port on Olimex L2294. I tried the
example code (raw sd-mmc access). When I start debugging, the CS
Signal is working, but the clock (SCK0) stays low. If I change
PINSEL0 to 0x5500 (SSEL0) the clock is working, but the CS Signal is
lost (stays low). I would appreciate any help.

Philipp

--- In l..., "tanermutlunun"
wrote:
>
> Thanks Carsten,
> Now I will port it to Olimex board. I will only change the CS pin
I
> guess which is P0_10 in Olimex.
>
> Bye..
>
> --- In l..., Carsten Gr wrote:
> >
> > Taner,
> >
> > I havce placed the file raw sd-mmc access.zip in the files
section.
> > Works for both SPI0 and SSP, compiles in Keil (RealView)
> >
> > Regards,
> > Carsten
> >
> > --- In l..., tanermutlu wrote:
> > >
> > > Hello
> > > I need raw(with no file system) SPI code for driving
> > > SD/MMC memory card for Keil or GNU compiler. I am
> > > using Olimex LPC2294 board. I would appreciate any
> > > help. I am in a kind of hurry..
> > >
> > > Thanks in advance...
> > >
> > > Taner Mutlu
> > > Elektronik M.
> > >
> > > __________________________________________________
> > >
> > >
>
Hello,

the sample code (raw sd-mmc access) is running with an workaround. I
used another GPIO Pin for the CS. If someones got an idea how its
working with the SSEL Pin, please let me know.

--- In l..., "philippcp" wrote:
>
> Hello,
>
> Ive got a problem with the SPI Port on Olimex L2294. I tried the
> example code (raw sd-mmc access). When I start debugging, the CS
> Signal is working, but the clock (SCK0) stays low. If I change
> PINSEL0 to 0x5500 (SSEL0) the clock is working, but the CS Signal
is
> lost (stays low). I would appreciate any help.
>
> Philipp
>
> --- In l..., "tanermutlunun"
> wrote:
> >
> > Thanks Carsten,
> > Now I will port it to Olimex board. I will only change the CS
pin
> I
> > guess which is P0_10 in Olimex.
> >
> > Bye..
> >
> > --- In l..., Carsten Gr wrote:
> > >
> > > Taner,
> > >
> > > I havce placed the file raw sd-mmc access.zip in the files
> section.
> > > Works for both SPI0 and SSP, compiles in Keil (RealView)
> > >
> > > Regards,
> > > Carsten
> > >
> > > --- In l..., tanermutlu
wrote:
> > > >
> > > > Hello
> > > > I need raw(with no file system) SPI code for driving
> > > > SD/MMC memory card for Keil or GNU compiler. I am
> > > > using Olimex LPC2294 board. I would appreciate any
> > > > help. I am in a kind of hurry..
> > > >
> > > > Thanks in advance...
> > > >
> > > > Taner Mutlu
> > > > Elektronik M.
> > > >
> > > > __________________________________________________
> > > >
> > > >
> > >
>
> -----Original Message-----
> From: l...
> [mailto:l...]On Behalf
> Of philippcp
> Sent: Tuesday, April 24, 2007 12:49 AM
> To: l...
> Subject: [lpc2000] Re: SPI SD card help
> Hello,
>
> the sample code (raw sd-mmc access) is running with an workaround. I
> used another GPIO Pin for the CS. If someones got an idea how its
> working with the SSEL Pin, please let me know.

The SSEL0 pin is not used in master mode, so for SD card access, you
must configure this as a GPIO, and toggle it in software (if this is
allowed on the LPC2294, as on some parts, this must be used, and held
high). Even if it could be used in master mode, the SSEL0 line must
be held low for the entire SD card access, so you cannot raise this
line in between bytes.

Mike

>
> --- In l..., "philippcp" wrote:
> >
> > Hello,
> >
> > Ive got a problem with the SPI Port on Olimex L2294. I tried the
> > example code (raw sd-mmc access). When I start debugging, the CS
> > Signal is working, but the clock (SCK0) stays low. If I change
> > PINSEL0 to 0x5500 (SSEL0) the clock is working, but the CS Signal
> is
> > lost (stays low). I would appreciate any help.
> >
> > Philipp
> >
> > --- In l..., "tanermutlunun"
> > wrote:
> > >
> > > Thanks Carsten,
> > > Now I will port it to Olimex board. I will only change the CS
> pin
> > I
> > > guess which is P0_10 in Olimex.
> > >
> > > Bye..
> > >
> > > --- In l..., Carsten Gr wrote:
> > > >
> > > > Taner,
> > > >
> > > > I havce placed the file raw sd-mmc access.zip in the files
> > section.
> > > > Works for both SPI0 and SSP, compiles in Keil (RealView)
> > > >
> > > > Regards,
> > > > Carsten
> > > >
> > > > --- In l..., tanermutlu
> wrote:
> > > > >
> > > > > Hello
> > > > > I need raw(with no file system) SPI code for driving
> > > > > SD/MMC memory card for Keil or GNU compiler. I am
> > > > > using Olimex LPC2294 board. I would appreciate any
> > > > > help. I am in a kind of hurry..
> > > > >
> > > > > Thanks in advance...
> > > > >
> > > > > Taner Mutlu
> > > > > Elektronik M.
> > > > >
> > > > > __________________________________________________
> > > > >
> > > > >
> > > >
> > >
> > Yahoo! Groups Links
>