USB superspeed peripherals Forum Discussions
I'm wondering the best way to handle a partial data transfer on the PC side? On the FX3, my DMA callback gets executed during a partial buffer like it should and performs the proper steps however, on the PC side I don't know the proper way to handle data xfer. I always get out of sync. I don't know what the size of the data xfer is and what to put in "bytes" length to xferdata function on the PC side. Is there away to stuff the buffer on the FX3 side so the buffer is always the same size? What is the best way to handle this situation?
Thanks a ton for the help!
Brandon
Show LessCurrently, I use FX3 as a bridge for communication between a PC and an external FPGA board as shown below:
read/write FPGA register request
PC ----------------------------------------------> FX3 ------------------------------------> FPGA
read FPGA data request
In this design, FX3 GPIF is a synchronous master and used to:
1. read/write register space from/to FPGA;
2. read data space (FIFO) from FPGA.
The two spaces of the FPGA are distinguished by an adress line of the GPIF interface, e.g. 1 for register space and 0 for data space.
on FX3 side, I tried to use three threads: the first thread (thread0) is used to read register value from the FPGA, the second one for writing FPGA register, and the thrid one for reading FPGA data, so I create three DMA channels as follows:
1.DMA1.prodSckId = 0x0102; 01: GPIF; 02: Thread 2; //for reading FPGA registers
DMA1.consSckId = 0x0302 03: USBOUT; 02: socket number 2 and mapped to end point IN 2;
2.DMA2.prodSckId = 0x0401; 04: USBIN; 01: socket number 1 ; //for writing FPGA registers
DMA2.consSckId = 0x0103 01: GPIF; 03: thread 3;
3.DMA3.prodSckId = 0x0100; 01: GPIF; 00: Thread 0; //for reading FPGA data
DMA1.consSckId = 0x0301 03: USBOUT; 01: socket number 1 and mapped to end point IN 1;
Now, the DMA2 and DMA3 can work well, that is, PC can sucessfully write register to FPGA and read data back from FPGA, but PC can not read FPGA register through DMA1 channel.
My question is that, if FX3 GPIF as a synchronous master, can more than one thread be used to transfer data from outside to FX3 engress end points? or there are any configuration errors in the DMA channel creation?
Your suggestions are very appreciated!
Scott
Show LessI've tried to run the USBVideoClassBulk example from the sdk as is. It is compiled and uploaded to CX3 evaluation board, but I can't see the video device on my linux machine.
There is some problem with usb descriptors, cause I get this message in dmesg:
[71795.430285] usb 3-2.2: Product: FX3
[71795.430287] usb 3-2.2: Manufacturer: Cypress
[71795.431324] uvcvideo: Probing generic UVC device 2.2
[71795.431330] uvcvideo: no class-specific streaming interface descriptors found.
[71795.431337] uvcvideo: Found a Status endpoint (addr 82).
[71795.431340] uvcvideo: Found UVC 1.00 device FX3 (04b4:4722)
[71795.431522] uvcvideo: Scanning UVC chain: OT 4 <- XU 3 <- PU 2 <- IT 1
[71795.431528] uvcvideo: Found a valid video chain (1 -> 4).
[71795.431529] uvcvideo: No streaming interface found for terminal 4.
[71795.431591] input: FX3 as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.2/3-2.2:1.0/input/input75
and the "lsusb -v" for cypress device seems to be cut in th middle.
Show LessHello all,
I am currenlty trying to use the CYUSB3014 to send data synchronously from USB to GPIO. The application would be a 16-bit parallel digital data generator with a clock.
What I have done so far is to configure a DMA auto channel between UIB(producer) and PIB(consumer) usign GPIF II designer. The state with "DR_DATA" is triggered by "DMA_RDY_TH1" and exits when "!DMA_RDY_TH1". There are 4 DMA buffers and each is 16kB.
My problem is, there is a gap during buffer change. Please see the attached image.
I am thinking two ways to solve this, but need some guidance on implementation. If neither of them is possbile, is there anyway to do it with CYUSB3014? Thanks
Okay, here are two ideas;
(1) implement a circular buffer with two pointers: one for UIB, one for PIB. Since USB is faster that the GPIF, most of the time, the DMA buffer is full and it won't be necessary to switch buffers. So I can use a single large buffers. Therefore, there won't be buffer switching. However, I don't know how to do this on a low level or if this is possible.
(2) implement two sockets with GPIF and switch threads to avoid the delay. Just like reversing the configuration in AN75779 (UVC example). However, GPIF doesn't allow me to switch states when they have "DR_DATA" on different sockets. Maybe there is another way?
Thanks again.
Show LessHi,
I am trying to use UVC and UAC composite device in CX3. The UAC device in Windows 10 report error whereas UVC device got driver installed. If I make it as standalone UAC device, it works fine (device driver got installed).
Can you give me descriptor file for UVC and UAC composite device for either high speed or super speed?
Show LessHello there,
We are having problems making the FX3 read and write data in serial mode (data out + data in + PCLK) through GPIF interface. We followed the instructions given in another forum post http://www.cypress.com/?app=forum&id=167&rID=75590, where the 14th bit of the CY_U3P_PIB_GPIF_CONFIG was advised to be set high and changed the CY_U3P_PIB_GPIF_SERIAL_OUT_CONFIG appropriately. But it doesn’t seem to work. As a starting point we modified the example program "gpiftousb" to be "usb to gpif" and included modifications suggested in the post above. The 8 bit configuration works fine, but 1-bit (only data out) configuration doesn’t seem to work. Basically no data coming from the DQ15. Could someone possibly point in the right direction what else needs to be modified to make it work. We attached the GPIF include file before and after serial communication modification.
Cheers,
Sebastian and Dima
Show LessHello,
How can we add serial number descriptor to FX3 firmware design? "boot_fw" example firmware has serial number descriptor.
I looked at the example and I added following serial number definition and I called following function in the code but Control Center did not show the serial number. By the way, we can see the bootloader's serial number in Control Center.
Regards,
Ali
const uint8_t CyFxUSBSerialNumDesc [] =
{
0x1A, /* Descriptor size */
CY_U3P_USB_STRING_DESCR, /* Device descriptor type */
'0',0,'0',0,'0',0,'0',0,'0',0,'0',0,
'0',0,'0',0,'0',0,'A',0,'A',0,'A',0,
0,0, /* long word align */
};
apiRetStatus = CyU3PUsbSetDesc(CY_U3P_USB_SET_STRING_DESCR, 3, (uint8_t *)CyFxUSBSerialNumDesc);
Hi,
I'm working with the FX3, Slave fifo setup, Control EP(0) and bulk in EP.
I start read data from the Bulk EP and at the same time work with the Control EP. After few transactions the CyU3PUsbSendEP0Data function fails with CY_U3P_ERROR_TIMEOUT error code. From that time all calls to CyU3PUsbSendEP0Data fails. The control OUT direction continue to work. The situation appears more frequently when the FX3 device connect to USB2 port (host side).
I use SDK 1.3.1.
Thanks!
Show LessIf we want to have an NDA with OmniVision,in order to get the source code of registers configuration for OV5640, what should we do?
Do we need to firstly get the NDA template from you ?
Thank you so much.
Show Less