Yahoo Groups archive

Lpc2000

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

Message

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

Attachments

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.