SSP0 Receive problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SSP0 Receive problem

370 次查看
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 项奖励
回复
1 回复

360 次查看
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 项奖励
回复