Hi NXP,
We are using LPC1833 SSP peripheral for communicating with SPI Flash.
We are using it in polling mode.
Function SSP_ReadWrite (Inbuilt CMSIS library function) is used for accessing SPI flash.
When IC is connected function works fine, but when IC is not connected then also functions does not give error and works normally.
How can we identify that Read/Write gets failed when IC is not connected or due to any other failure?
Thanks
Hi,
As you know that the SPI protocol does not use any handshaking signal, the spi master transmits/receives data from slave spi in a blind mode, the master spi receiver will receive 0xFFFF in 16 bits mode when the slaver spi is not connected generally.
In conclusion, there is not any way for the master spi to know if the slave spi device is connected or not, but as a trick, I think if you receive multiple 0xFFFF(if you do not receive 0xFFFF with slave spi device is connected, you can connect a pull-up resistor on the MISO pin), you see that slave is connected.
Hope it can help you
BR
XiangJun Rong
XiangJun Rong
Thanks for your quick reply.