HELP SPI

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

HELP SPI

830 次查看
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 */
}
标签 (1)
0 项奖励
回复
2 回复数

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

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