USB superspeed peripherals Forum Discussions
I have been testing out various configurations of the FX3 and CyUSB driver to optimize throughput, and I've found something I don't fully understand.
First I installed the modified driver here to enable 32MB buffer sizes on Windows 10: https://community.cypress.com/t5/USB-Superspeed-Peripherals/Maximum-transfer-size-for-BeginDataXfer-FinishDataXfer-with-bulk/m-p/138780
Then I set up a GPIF firmware that grabs 32 bit samples at 80 MHz continually using an external function generator as clock. DMA transfers were configured with 2 threads, each having 2 buffers holding 13 1024 byte USB packets. I then stream data across the USB bus to a Windows 10 host using different buffer sizes and the async API in CyUSB. To make sure my software doesn't influence throughput, all buffers are posted to the driver before the transfer starts and the software immediately discards buffers to minimize CPU load. After the transfer I check how many times the overflow flag was asserted and how much data was actually transferred.
I expected that smaller buffers should have more overhead and that larger would be slightly better. When I tested it however, I found that larger buffers seem to have lower throughput. For example:
832 MB using 64 individual 13MB buffers:
Configuring FX3 acquisition with parameters:
Samples per trigger: 6656 (26624 bytes)
Number of triggers: 32768
Total acquisition size: 872415232 bytes (832 MB)
CYUSB bufferSize: 13631488 (40.625001 percent of max), 13312.000000 USB packets (32 total buffers)
Total CYUSB buffers per acquisition: 64 (512.000000 triggers per buffer)
0: Got 13631488 bytes (512.000000 triggers) with buffer 0 (0.000000)!
...
63: Got 13631488 bytes (512.000000 triggers) with buffer 32256 (63.000000)!
Overflows: 0
Total FX3 DMA transfers Produced: 16384
acquisition succeeded!
After 10 repetitions, not a single overflow and all data is accounted for.
832 MB using 32 individual 26MB buffers:
Configuring FX3 acquisition with parameters:
Samples per trigger: 6656 (26624 bytes)
Number of triggers: 32768
Total acquisition size: 872415232 bytes (832 MB)
CYUSB bufferSize: 27262976 (81.250002 percent of max), 26624.000000 USB packets (32 total buffers)
Total CYUSB buffers per acquisition: 32 (1024.000000 triggers per buffer)
Beginning Transfer...
0: Got 27262976 bytes (1024.000000 triggers) with buffer 0 (0.000000)!
...
30: Got 27262976 bytes (1024.000000 triggers) with buffer 30720 (30.000000)!
WaitForXfer failed!
Overflows: 198
Total FX3 DMA transfers Produced: 16336
ERROR: requested 872415232 bytes but got 845152256 bytes!
acquisition failed!
After 10 repetitions, not a single one was able to do the whole transfer without 160-200 overflows.
Since the data rate is identical in both cases, and all host-side buffers are preallocated, I am surprised that there is such a large difference in throughput. I did some more testing, and it seems that buffers above about 16 MB begin to have overflows, and the number of overflows per second increases as the buffer size increases. What is the functional difference between a 10 or 15 MB buffer and a 20 or 30MB buffer? I had thought that 1024 byte USB packets are simply being written sequentially into the buffer, but maybe I am missing something about how the driver works?
Show LessHello,
I am trying to integrate some custom vendor requests and I am looking for a method to respond to these requests, but on a separate endpoint from EP0. I know that CyU3PUsbSendEP0Data() exists for responding on the EP0 endpoint, but I am looking for the ability to send a response to a different endpoint in addition. For instance, sending data to an interrupt endpoint I have defined, or potentially even over GPIF?
Is there anything put in place for this already, or is there a recommended approach for doing this?
Thanks in advance.
Show LessWe want to use CYUSB3KIT-3 kit for host to host application for UBUNTU 18.04 . We downloaded the FX3_SDK_1.3.4_Linux and installed in line with your document cybus_linux_user_guide.pdf. Then we are able to open the GUI screen “cyusb_linux” but it is not showing any USB device in list of device.
What could be the issue?
Show LessI've developed my own UVC camera based on Cypress FX3. I have my own Vendor ID registered at usb.org
When I use Cypress's Vendor ID and Product ID, all operating systems recognize it as a UVC camera.
Did anyone here added their ID to a standard driver that it will automatically detect it?
Thanks, Ofer.
Show LessHello everyone,
I have been trying to program FX3 RAM and Boot from USB in my Custom Cypress Device Board, I'm using the CYUSB3014 chip on my custom board that I copied from the Superspeed Explorer KIT, as Boot mode I chose RAM Boot, so I properly configured the pin as shown in doc AN76405.
When I connect my board the device enumerates as 'Cypress FX3 USB BootLoader Device' as shown in figure 1
after the programming, the device doesn't enumerate and on the bottom left corner appears the label Programming Succeded (Fig 2)
I try to load my code and also the USBBulkSourceSink firmware example but it never works, on the Superspeed Explorer Kit everything works fine, also my code.
I've tried to connect both USB 2.0 and 3.0 but nothing changes
I also check with a USB sniffer the USB commands and they are identical both in my custom board and in the superspeed explorer kit.
Does anyone have any suggestions?
Thanks
Riccardo
Show LessHi,
I'm developing some products using CYUSB3KIT-003(FX3) these days.
And I would like to use printf() functions of standard C library to send out data on UART.
Is it possible on this product? Is this development environment support this?
If supported, please let me know how to do that.
Show LessHardware:
CYUSB3025 (SD3) and Toshiba eMMC (5.1)
Issue:
CYUSB3025 is not able to boot from boot partition of eMMC, while boot from user partition works fine.
Details:
As far as I understood from the documentation, there are two options when it comes to loading firmware to eMMC.
1) Load firmware into one of boot partition (created by factory) of eMMC, either boot1 or boot2.
For this we used command:
cyfwstorprog.exe -vid:<VID> -pid:<PID> -img:<IMG> -bootp:boot1
Looking at print outs in command line, we spot no errors, and programming is performed successfully.
After this, when we reset CYUSB3025 with PMODE[2:0] set to FF0, it is not able to boot from eMMC and instead boots from USB.
2) Load firmware into virtual partition created in user data area.
For this we used command:
cyfwstorprog.exe -vid:<VID> -pid:<PID> -img:<IMG>
This creates the fourth partition in user area successfully and programming is performed successfully.
Upon resetting CYUSB3025 with PMODE[2:0] set to FF0, it is successfully able to boot from eMMC as expected.
So, the question is, why does it work when firmware is programmed to virtual partition in user area of eMMC, but it does not work when we program it to boot partition of eMMC ?
Hi Team
目前開發CX3專案
可以正常在同一執行序下 Streaming Sensor 與使用 UART Register mode TX & RX
但是我想要把Streaming Sensor & UART 功能分別使用兩個Thread去執行
想請教一下是否可以提供 Multi Thread 的範例程式參考
以上謝謝
Show LessI have done both of uac and uvc in fx3 development board that refer to USBAudioClass and USBVedioClass demo project of SDK,the usb3.0 connect to windows10,and my computer device manager dispaly follows:
the uvc was Identified in camera,but uac Identify failed.
Show LessHello,
I made a custom board based on Lattice USB3.0 Video Bridge devkit that's use an CYUSB3014-ZXI.
When I connected it through USB cable in USB Boot mode (F11), computer detected it as peripheral : Cypress USB Bootloader.
Then I flashed firmware USBVideoBridge_bulk.img with Control Center in the EEPROM (failed) and in the flash memory through SPI (success).
But when we go in mode : SPI, On Failure, USB boot is enable(0F1), the board is not detected by the computer.
Is it necessary to flash memory with JTAG for the first power up? Or did I missed something in the datasheet of bootmode? Because I think that memory never get flashed.
If you have any idea about what's append, please tell me.
Waiting for your return.
Matthieu
PS: attached devkit datasheet and FX3 boot mode datasheet.
Show Less