Yahoo Groups archive

Lpc2000

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

Message

SPI problems

2004-09-27 by johnnorgaard2003

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));
--------------------------------------------------------

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.