1 Reply Latest reply on Mar 26, 2020 9:52 AM by GaneshD_41

    PSOC4 UDB SPI Slave Continuous Transfer

    WaSI_2022226

      Hi All,

       

      I'm using Cy8CKIT-049 with CY8C4245-AXI.

       

      I'm trying to do continuous transfers with a UDB SPI 16bit Slave clocked from an external 4MHz clock. The TX buffer is 6 words wide. The transfer should be (0xAABBCCAABBCC.............AABBCC),but the I'm getting only AABBCC  and the orther bytes  are junk. I'm really can't guess what is going wrong on my code.

       

      Please help me.

        • 1. Re: PSOC4 UDB SPI Slave Continuous Transfer
          GaneshD_41

          Hi,

           

          In your application, you please add the following line also before filling the buffers for the second time:

           

          /* We need to know the moment when SPI communication is complete

              * to display received data. SPIS_SPI_DONE status should be polled.

              */

              while(!(SPIS_ReadTxStatus() & SPIS_STS_SPI_DONE));

           

          Also, in the SPI component select the clock selection tab as "External".

           

          Please find the attached code examples for UDB based SPI slave. The attached code examples are basically for PSoC 5LP device but the UDB SPI component will be same in both PSoC 5 and PSoC 4 devices. You can compare your configuration with the attached code examples and check once.

           

          If still you are getting the issue, please update.

           

          Thanks

          Ganesh