HELP SPI

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

HELP SPI

309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by marcos_naut on Wed Nov 07 04:35:14 MST 2012
I need clear the SPI's buffer i used soft bellowbut not clear full???

for ( i = 0; i < FIFOSIZE; i++ )
{
  Dummy = LPC_SSP1->DR;/* clear the RxFIFO */
}
Labels (1)
0 Kudos
2 Replies

292 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by marcos_naut on Thu Nov 08 09:39:07 MST 2012
Thank you!
0 Kudos

292 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Daniel Widyanto on Wed Nov 07 22:25:31 MST 2012
Hi,

Use RNE bit at SR (Status Register) to check whether SPI receive FIFO is empty or not.

<code>
while (LPC_SSP1->SR & (1 << RNE)) {
  uint32_t dummy = LPC_SSP1->DR;
}
</code>
0 Kudos