Yahoo Groups archive

Lpc2000

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

Thread

LPC2214 SPI0 and SPI1 not working?

LPC2214 SPI0 and SPI1 not working?

2006-05-09 by Mukadder CEYHAN

Hi everbody!

I am trying to solve some problems regarding with the
SPI  in LPC2214 controller from philips. 
The code snippet is below:

#define SPIF (1<<7)
#define SPI0_SEL        0x00000000
#define SPI0_MSTR       0x00000020
#define DATA 0xC1

void main(void)
{
    S0SPCR = 0x00;
    PINSEL0 &= 0xFFFF00FF;
    PINSEL0 |= 0x00005500;
    IO0DIR = SPI0_SEL;
    IO0SET = SPI0_SEL;
    S0SPCCR = 0x08; // also used 0x20
    S0SPCR = SPI0_MSTR;

	while(1)
	{ 
        S0SPDR = DATA;
        while(!(S0SPSR & SPIF)){}
	}
}

This is not working!

I also faced with the same problem with SPI-1 channel.
In philips website there is a document about lpc2214
bugs, actually related about register and
configuration problems. Inside this document there is
no explanaton about this issue. I am wondering that is
philips producing defective or faulty chips?

I am tired since I tried many times to solve this and
I have 10 lpc2214 chips and tried with 4 chips, still
not working!!!

Help please?

regards...

mukadder

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

Re: LPC2214 SPI0 and SPI1 not working?

2006-05-09 by Gus

ssel pin on SPI works as enable to the SPI hardware!! I don't know 
why it is that way. You need to connect ssel to 3.3V and forget 
about this pin and everything will work after

Gus

--- In lpc2000@yahoogroups.com, Mukadder CEYHAN <mukadder_c@...> 
wrote:
Show quoted textHide quoted text
>
> Hi everbody!
> 
> I am trying to solve some problems regarding with the
> SPI  in LPC2214 controller from philips. 
> The code snippet is below:
> 
> #define SPIF (1<<7)
> #define SPI0_SEL        0x00000000
> #define SPI0_MSTR       0x00000020
> #define DATA 0xC1
> 
> void main(void)
> {
>     S0SPCR = 0x00;
>     PINSEL0 &= 0xFFFF00FF;
>     PINSEL0 |= 0x00005500;
>     IO0DIR = SPI0_SEL;
>     IO0SET = SPI0_SEL;
>     S0SPCCR = 0x08; // also used 0x20
>     S0SPCR = SPI0_MSTR;
> 
> 	while(1)
> 	{ 
>         S0SPDR = DATA;
>         while(!(S0SPSR & SPIF)){}
> 	}
> }
> 
> This is not working!
> 
> I also faced with the same problem with SPI-1 channel.
> In philips website there is a document about lpc2214
> bugs, actually related about register and
> configuration problems. Inside this document there is
> no explanaton about this issue. I am wondering that is
> philips producing defective or faulty chips?
> 
> I am tired since I tried many times to solve this and
> I have 10 lpc2214 chips and tried with 4 chips, still
> not working!!!
> 
> Help please?
> 
> regards...
> 
> mukadder
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
>

Re: [lpc2000] Re: LPC2214 SPI0 and SPI1 not working?

2006-05-09 by Mukadder CEYHAN

Hi Gus,

thanks for your help, it working well!!!
I do not know why philips made such a bug???
it is not written in all documents!

this is a failure of philips!

bye...

--- Gus <gus_is_working@...> wrote:

> ssel pin on SPI works as enable to the SPI
> hardware!! I don't know 
> why it is that way. You need to connect ssel to 3.3V
> and forget 
> about this pin and everything will work after
> 
> Gus
> 
> --- In lpc2000@yahoogroups.com, Mukadder CEYHAN
> <mukadder_c@...> 
> wrote:
> >
> > Hi everbody!
> > 
> > I am trying to solve some problems regarding with
> the
> > SPI  in LPC2214 controller from philips. 
> > The code snippet is below:
> > 
> > #define SPIF (1<<7)
> > #define SPI0_SEL        0x00000000
> > #define SPI0_MSTR       0x00000020
> > #define DATA 0xC1
> > 
> > void main(void)
> > {
> >     S0SPCR = 0x00;
> >     PINSEL0 &= 0xFFFF00FF;
> >     PINSEL0 |= 0x00005500;
> >     IO0DIR = SPI0_SEL;
> >     IO0SET = SPI0_SEL;
> >     S0SPCCR = 0x08; // also used 0x20
> >     S0SPCR = SPI0_MSTR;
> > 
> > 	while(1)
> > 	{ 
> >         S0SPDR = DATA;
> >         while(!(S0SPSR & SPIF)){}
> > 	}
> > }
> > 
> > This is not working!
> > 
> > I also faced with the same problem with SPI-1
> channel.
> > In philips website there is a document about
> lpc2214
> > bugs, actually related about register and
> > configuration problems. Inside this document there
> is
> > no explanaton about this issue. I am wondering
> that is
> > philips producing defective or faulty chips?
> > 
> > I am tired since I tried many times to solve this
> and
> > I have 10 lpc2214 chips and tried with 4 chips,
> still
> > not working!!!
> > 
> > Help please?
> > 
> > regards...
> > 
> > mukadder
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com
> >
> 
> 
> 
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

Re: [lpc2000] LPC2214 SPI0 and SPI1 not working?

2006-05-09 by Herbert Larbie

The code does work, if you keep the define SPI0_SEL  as I posted it, 
it is equivalent to setting spi_sel0 high. I captured all the 
waveforms with a scope for documentation.

Herbert Larbie

#define SPI0_SEL          0x00000080

At 13:09 09/05/2006, you wrote:
Show quoted textHide quoted text
>Hi everbody!
>
>I am trying to solve some problems regarding with the
>SPI  in LPC2214 controller from philips.
>The code snippet is below:
>
>#define SPIF (1<<7)
>#define SPI0_SEL          0x00000080 not  0x00000000
>#define SPI0_MSTR       0x00000020
>#define DATA 0xC1
>
>void main(void)
>{
>     S0SPCR = 0x00;
>     PINSEL0 &= 0xFFFF00FF;
>     PINSEL0 |= 0x00005500;
>     IO0DIR = SPI0_SEL;
>     IO0SET = SPI0_SEL;
>     S0SPCCR = 0x08; // also used 0x20
>     S0SPCR = SPI0_MSTR;
>
>       while(1)
>       {
>         S0SPDR = DATA;
>         while(!(S0SPSR & SPIF)){}
>       }
>}
>
>This is not working!
>
>I also faced with the same problem with SPI-1 channel.
>In philips website there is a document about lpc2214
>bugs, actually related about register and
>configuration problems. Inside this document there is
>no explanaton about this issue. I am wondering that is
>philips producing defective or faulty chips?
>
>I am tired since I tried many times to solve this and
>I have 10 lpc2214 chips and tried with 4 chips, still
>not working!!!
>
>Help please?
>
>regards...
>
>mukadder
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
><http://mail.yahoo.com>http://mail.yahoo.com
>
>
>SPONSORED LINKS
><http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&c=3&s=69&.sig=c-HXthtbZy4TZbI3ib0PMg>Microcontrollers 
><http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&c=3&s=69&.sig=ijt0SspWtjogcHCuFD0lUQ>Microprocessor 
><http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&c=3&s=69&.sig=WOZdpklkgHbXR5quAgrl5w>Intel 
>microprocessors
>
>
>----------
>YAHOO! GROUPS LINKS
>
>    *  Visit your group 
> "<http://groups.yahoo.com/group/lpc2000>lpc2000" on the web.
>    *
>    *  To unsubscribe from this group, send an email to:
>    * 
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>lpc2000-unsubscribe@yahoogroups.com 
>
>    *
>    *  Your use of Yahoo! Groups is subject to the 
> <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
>
>
>----------

Re: LPC2214 SPI0 and SPI1 not working?

2006-05-09 by rtstofer

--- In lpc2000@yahoogroups.com, Mukadder CEYHAN <mukadder_c@...> wrote:
>
> 
> Hi Gus,
> 
> thanks for your help, it working well!!!
> I do not know why philips made such a bug???
> it is not written in all documents!
> 
> this is a failure of philips!
> 
> bye...

I don't think so...  If SSEL is low it selects the SPI as a slave;
clearly documented.  To prevent the SPI from being selected as a
slave, the signal must be high and held there - a pullup resistor is
appropriate.

Further, SSEL is an input and inputs can never be allowed to float.  I
agree that there could be a note in the datasheet but I have never
seen a 'perfect' datasheet.  But I do think that Philips is doing much
better than most with their technical writing.

Richard

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.