3 Replies Latest reply on Feb 20, 2017 10:34 PM by nishanta_46

    USB Serial Device which takes SPI data and send to to USB



      I tried running the USB-UART example code in linux. I need the same setup in which the data is read from SPI port and sent to the USB end point. For this, the data should be first coming to CPU and after processing that data, CPU should sent it to the USB.


      What are the necessary changes to be made in the USB-UART example for this? I need the device to be registered as a Serial device (USB-UART Bridge).

        • 1. Re: USB Serial Device which takes SPI data and send to to USB

          We have an example firmware in FX3 SDK. USBFlashProg-  after building and programming the device, you can send vendor command to read and write from SPI/I2C. The vendor command for each of these can be found in the firmware itself. Here, the data is coming to the FX3-CPU, which is then sending the data to the USB endpoint. I suppose this is exactly what you are looking for.


          You have mentioned, that you are looking the device to come-up as USB-UART Bridge. Can you clarify, why is this required? Do you want a CDC interface, or do you want a Vendor interface? 


          Have you looked for CY7C65211A:  




          This is a configurable part, where you can configure the device to come up as CDC class, and the device can be configured for I2C/SPI. This works as a USB to serial (I2C/SPI) bridge.

          • 2. Re: USB Serial Device which takes SPI data and send to to USB

            Hi Nishant,
            The purpose of doing this is to implement audio IN using CDC class. CX3 will be registered as USB-UART bridge which is working. I have implemented a CPLD logic to convert the external I2S audio data to CX3 SPI. Now I want to send the audio data over USB serial/COM port. I have a application that will read serial audio data.


            What would be the easiest way to do this? What are the parameters I need to tweak/consider in order to get this running? 

            • 3. Re: USB Serial Device which takes SPI data and send to to USB

              For USB-SPI channel, you need to create DMA channel similar to UsbSpiDmaMode example in the FX3 SDK. Along-with this, you will have to use the descriptors similar to UAB-UART example. The  USB-UART  makes the device to enumerate as a COM device on the host. The UsbSpiDmaMode is responsible for the data transfer from SPI to the USB endpoint. Please try and let us know if you face any problem.