3 Replies Latest reply on Sep 22, 2020 10:28 PM by YatheeshK_36

    CY7C65211A Buffer Operation

    JaMa_3208951

      Hello,

       

      When configured as an SPI slave how does the buffer work on this part? Does the buffer erase the oldest characters, or does it not allow new characters when the buffer becomes full?

       

      Thank you,

      Jake 

        • 1. Re: CY7C65211A Buffer Operation
          YatheeshK_36

          Hello Jake,

           

          In normal USB-Serial SPI slave operation, it is expected to read the exact number of bytes of data written. Else, the Slave will return error. 

          The device operating as SPI slave will not allow new data to be written when the expected count is reached.

           

           

          Thanks,

          Yatheesh

          • 2. Re: CY7C65211A Buffer Operation
            JaMa_3208951

            What should be done if the device is set up as a slave and the master does not know how many bytes will come through?

             

            Could you send a read for an amount larger than what you expect? and potentially get back the desired data and then a bunch of zeros?

            • 3. Re: CY7C65211A Buffer Operation
              YatheeshK_36

              Hello Jake,

               

              You can use the SPI slave CDC class in this case.

              You can define a larger read size than the expected data write size from master, the SPI CDC slave will return the amount of data being received.

              In case you define a smaller slave read size than the master write size, the slave read API will return as soon as the defined size in the SPI read is received.

               

              For application development we have CyUSBSerialVCP library and an example project as well. Please refer to the USB-Serial SDK.

               

              Also, when using SPI CDC class instead of developing a windows application, you can make use of a serial terminal like teraterm to capture the data continuously and display it.

               

              Please let me know if you have any more queries.

               

              Thanks,

              Yatheesh