Hi Mustahsin, Have you looked at the SPI communication on an oscilloscope? I highly recommend doing so when starting out because it may help you see what is happening on the SPI bus that you otherwise wouldn't be able to know from looking at the code. I don't see anything particularly wrong, but you may want to use the "SSIDataGetNonBlocking()" function before starting SPI communication to make sure the SPI FIFO has been cleared. Also, when sending two bytes of data, make sure to read out two bytes of data. Perhaps all you need to do is read the next value in the FIFO.
↧