SSP0 Receive problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SSP0 Receive problem

380件の閲覧回数
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 返信

370件の閲覧回数
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 件の賞賛
返信