Hi Friends,
Thanks for the reply Dan
I have connected both the master and slave as CPHA =1,CPOL = 0 and LSB.
I have noticed one point in the LPC2214, and i do not know whether it could be a cause of concern.
With the above configuration, and with LPC as master. The data is driven 1/2 bit time prior to the first clock edge. This is not as per the User manual.
I have given below my code snippet for the LPC as a slave.
Is there anything wrong with this loop for testing SPI in polling for LPC as slave.
unsigned char dat;
while(1)
{
while( !(S0SPSR & 0x80) ){}
dat = S0SPDR;
S0SPDR = S0SPDR;
}
Here i am facing a problem that if the master has transmitted 0x01 then i get some different value in dat. Where as the value that is received at the master is 0x01.
Regards,
Jerome
Dan Beadle <dan.beadle@...> wrote:
Is it possible that you have the SPI modes mis-matched? I.e., clocking
on the wrong edges? That might explain the incorrect data.
_____
From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf
Of Jerome
Sent: Wednesday, January 04, 2006 7:18 AM
To: lpc2000@yahoogroups.com
Subject: [lpc2000] LPC to MSC SPI interface
Hi Friends,
Im a newbie to LPC.
Currently i am working on a project which requires me to interface
the LPC2214 chip with MSC1210 using SPI, and is proving to be very
problematic.
In both the below cases i have tried debugging using JTAG.
Case 1
I have tried with LPC as a Master and also connected the SS- pin to
High. Here, the transmission from LPC to MSC is perfectly fine, and
also the reception of bytes at MSC is perfect, but the MSC Tx i.e.
slave output doesnot respond at all. The MSC doesnot shift the data
out from its SPIData register on receiving the clock from the master.
STRANGE!!!!! na
Case 2
Having tried the above, i then tried with the MSC as master and LPC
as slave. Here the things are even interesting. I am able to transfer
data both ways. But the data received at the Slave i.e MSC, doesnot
match the data which was sent by the Master. However, the data is
received in correctly at the Master end. The data was verified using
UART's on both the controllers.
I hope some one has tried this and will be able to help me out. Its
been over 2 weeks now that i have been struggling with this problem.
Is there any compatibility issues between the LPC2214 and MSC1210.
Regards,
Jerome
_____
YAHOO! GROUPS LINKS
* Visit your group "lpc2000
<http://groups.yahoo.com/group/lpc2000> " on the web.
* To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
<mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
_____
[Non-text portions of this message have been removed]
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "lpc2000" on the web.
To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Send instant messages to your online friends http://in.messenger.yahoo.com
[Non-text portions of this message have been removed]Message
RE: [lpc2000] LPC to MSC SPI interface
2006-01-05 by jk jlkj
Attachments
- No local attachments were found for this message.