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:
>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.
>
>
>----------Message
Re: [lpc2000] LPC2214 SPI0 and SPI1 not working?
2006-05-09 by Herbert Larbie
Attachments
- No local attachments were found for this message.