Yahoo Groups archive

Lpc2000

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

Message

RE: [lpc2000] SPI on LPC2106

2005-02-25 by Ronnie Leighty

Hi Mark,

	I am having similar issue with the 2119 part where I noticed your PINSEL0
setting of 0x00000050 is misaligned with p78 or P127 of the 2119 user
manual. I'm I reading the table incorrectly? I register the value of
0x00001505 to have SPI 0 and UART 0 selected. But hey, mine is not
working...

Help anyone??

Regards

Ronnie Leighty
Principle Engineer
2802 Leslie Rd
Tampa, FL 33619
voice (813) 630-1229 ext. 111
fax     (813) 630-2619


-----Original Message-----
From: Mark Butcher [mailto:M_J_Butcher@...]
Sent: Wednesday, February 23, 2005 12:07 PM
To: lpc2000@yahoogroups.com
Subject: [lpc2000] SPI on LPC2106




Hi All

Just a quick question about SPI.

Today I tried to use it for the first time but had no luck. Possibly
someone has a tip.

Here's what I am doing:
1. Set SPI ports for SPI operation
     *(unsigned long*)*0xe002C000 |= 0x00000050 // PINSEL0
2. Setup SPI speed
     *(unsigned long*)*0xe002000C = 0x00000020  // SPCCR
3. Setup SPI to master mode
     *(unsigned long*)*0xe0020000 |= 0x00000020  // SPCCR
4. Send a test byte
     *(unsigned long*)*0xe0020008 = 0x00000055  // SPDR

After the last command the status register has the bit 0x80 (SPIF)
set to 1, indicating that the transfer has completed (before it was
at 0), but I see no data sent (neither signals on the clock line nor
the data line nor the SSEL line). In fact they all seem to be in a
high impedence state since I measure zero voltage (or 3V3 with a
pull up resistor).

Therefore I conclude that I have problems setting the SPI ports to
the correct mode but PINSEL0 seems to be correct (which I have
verified several times to be sure).

So what is the trick involved to get it working?

Thanks in advance

regards

Mark Butcher

www.mjbc.ch







Yahoo! Groups Links

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.