2 Replies Latest reply on Mar 22, 2017 12:58 AM by userc_38982

    cy7c65211 SPI slave mode

      I am trying to do a simple SPI based data logger and using cy7c65211 came with psoc4 kit in spi slave mode.


      i am on windows10 and have written a simple c based application but its not working consistently. some time it works some times spi_read_write request fails with CY_ERROR_REQUEST_FAILED.


      share your thoughts!



        • 1. Re: cy7c65211 SPI slave mode



          I have gone through the application. Can you tell me whether the error is occurring due to Write operation or Read operation of CySpiReadWrite() API?


          Are you seeing that error in the following debug print in the thread handler:


          printf("read write :- ERROR(%d)\r\n", rtnStatus);





          • 2. Re: cy7c65211 SPI slave mode

            I am interested in only reading the SPI in slave mode so here txbuff is used as dummy


            Txdata and Rxdata has same buffer length and txdata buffer is filled with '00' dummy


            CySpiReadWrite(hSPI, &myRxData, &myTxData, 5000);


            as per above case some time it works some time it does not.




            if I use it like this telling the read/write api that i dont want write operation


            CySpiReadWrite(hSPI, &myRxData, NULL, 5000);


            then it never reads the SPI data, first call returns error:6 and subsequent calls returns timeout