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>