Hi All
I have been working with the LPC2138 for about 12 months on and
off and have had NO problems with getting any of the peripherals
working until now.
I have two LPC2138's connected via SPI0 and am intending to setup one
as a master and the other a slave that adds two serial ports to my
master.
There are two issues:
1) With MOSI to MOSI, P1.24 (master) to SSEL0 (slave), SCLK0 to SCLK0
and MISO floating i am seeing a mirror of what is being transmitted
by the master on the MISO pin of the slave????? And i mean a perfect
mirror with no time shift, with the 4 channel CRO i am using i can
overlay one waveform ontop of the other and they match perfectly. Yes
i have put a multimeter across the pins to check for conductivity and
no there is no solder across the MOSI and MISO.
2) I can get the SPI interrupt the fire on both the master and the
slave but randomly the master will just lock up (something i have
never had happen before). Also the upon power reset the SPI wont
start but the serial port start perfectly everytime.
My program has three basic sections
a) In main i call an init interrupt routine which initialises the SPI
port on the master.
b) In my ISR i read the S0SPSR (clear it), write 0xA0 to S0SPCR,
clear the interrupt by writing 0x01 to S0SPINT, clear the VicVectAddr.
c) In main i write 0x5A to S0SPDR then wait 4ms and repeat (while(1)
loop)
If anyone can help me it would be greatly appreciated.Message
LPC2138 SPI Problem
2006-02-09 by johnleerberg
Attachments
- No local attachments were found for this message.