SSP0 Receive problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SSP0 Receive problem

197 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karthik.s on Thu Jul 29 00:34:18 MST 2010
I am using SSP0 SPI module for transmitting and receiving data between LPC1114 and a NIC card.In this process while receiving data from the NIC card,i am frequently stuck at the following statement in the SSPReceive driver module

while ( (LPC_SSP->SR & (SSPSR_BSY|SSPSR_RNE)) != SSPSR_RNE );

BSY bit is shown as 0b0.Not able to figure out the cause.Any help is appreciated.
0 Kudos
1 Reply

187 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by george on Thu Jul 29 09:00:15 MST 2010
Not sure exactly what you are trying to do... From my reading of the manual the BSY bit is zero when the SSP is idle and the RNE bit is zero when the receiver is empty.

So if this code is supposed to test if the SSP is busy/empty I think it should be

while ( (LPC_SSP->SR & (SSPSR_BSY|SSPSR_RNE)) != 0 );
0 Kudos