SPI problems

Started by johnnorgaard2003 September 27, 2004
Hi
I use SPI interface with lpc2106.
I have setup the SPI and load the dataregister. After that I can see
SPSR is 0x80 and SPINT is 0x01. It ok. But when the while loop start
SPSR get cleared. SPIF is the SPI Transfer complete flag, should only
be cleared when reading the status register and accessing the data
register according to p.129 in user manual.
I know also that the rev. A,B have some problems with SPI.
But what I can see is it onlyclearing of SPI Interrupt flag, when
writing to SPI registers, NOT reading SPI register...
Is there anyone who has som comments on this ??

best regards
John --------------
SPINT = 0x01;
SPDR = AddressLSB;

// here I can See that SPSR is 0x80 and SPINT is 0x01,
// but when the while loop start SPSR get cleared !!
do
{

}while (!(SPSR & 0x80));
--------------------


An Engineer's Guide to the LPC2100 Series