1 Reply Latest reply on Jun 30, 2017 3:45 AM by AnkitaS_51

    Why SPI Communication not working properly?

      Hello Every one,


      I am making a SPI master slave test program with certain conditions:


      I want to do the following:


      Master is sending an 8 bit data in order to start the communication.


      At the same time slave will directly send some dummy value.


      Then: if the master has send a value 0x02 then the slave should send 0x10u.


      otherwise it will give 0x58u.


      I write the program (please have a look at the attachment). But, some how its not working as it supposed to work! there must be something wrong.


      I will look forward to hearing from you.

        • 1. Re: Why SPI Communication not working properly?

          Please go through the component datasheet properly and see the API explaination too.


          uint8 SPIS_ReadRxStatus(void):_
          Returns the current state of the Rx status register. 


          Return Value:
          uint8: Current Rx status register value 


          Description:Rx FIFO empty


          Description:Rx FIFO not empty


          Description:Rx Buf overrun


          Description:Rx FIFO full