USB superspeed peripherals Forum Discussions
Hi. For a few proto PCBAs, we are sourcing CYUSB3014-BZXI devices but the datecode is '12xx'. Concerned about the 'ES' devices which had some erratas. Specifically, unable to soft-enumerate on the 'ES' version of the component.
Have some questions:
1) Will the engineering samples of the CYUSB3014-BZXI devices have the 'ES' laser markings ? This datecode does not but wish to understand the markings.
2) Which datecode of the CYUSB3014-BZXI is considered to be bug free silicon ? Saw some mention of Rev B and Rev C silicon but how can we determine if our device is one of these iterations with erratas ?
Please assist asap as so far, unable to locate any document with these details.
Thanks.
Show LessHello,
I am working with a custom board that has a CYUSB3065-BZXI chip. I am trying to build one of the examples included in the sdk: cycx3_yuy2_ov564. The example builds successfully and the .img file is generated.In the cyusb tool, i choose the cx3 chip and select the program to RAM option and download the generated .img file into the chip. After this, it says programmed successfully,
However, the CX3 chip is now disconnected but it does not enumerate as a UVC device as expected. I have tried other example programs as well, including USBFlashProg and USBBulkSourceSink and even for those the device simply disconnects and doesnt re-enumerate as a different device.I have tried building in both debug and release mode and both give the same result.
What might be the problem and how do I resolve this?
Show LessHi, Thanks in advance. My hardware is FX3 USB super Speed device with vendorId 04b4 and product Id 00f2. My OS is Ubuntu 18.04. version. I have installed Autoslave and Automaster code in hardware. I am running controlcenter code using Qt 5.15.2. which is provided by cypress. i am trying to do bulk transfer from from slave write to master read, but getting error "LIBUSB_ERROR_IO". The code has complete root access. Apart from this i also tried in my own simple code getting the same error. The below is the code and output.
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <libusb-1.0/libusb.h>
#define EP_DATA_IN 0x81
#define EP_DATA_OUT 0x01
#define DEVICE_CONFIGURATION 0
#define MASTER 0x00f4
#define SLAVE 0x00f2
void writeButtonClicked()
{
int rc;
libusb_context *ctx = NULL;
libusb_device_handle *dev_handle;
QString writeData = "Slave writing !!!";
int actual = writeData.length();
unsigned char *sendData;
sendData = (unsigned char *)malloc(actual);
memcpy(sendData, writeData.toLocal8Bit(), actual);
rc = libusb_init(&ctx);
if(rc < 0) {
std::cout << "Init Error " << rc << std::endl;
}
libusb_set_debug(ctx, 6);
dev_handle = libusb_open_device_with_vid_pid(ctx, 0x04b4, SLAVE); // Give SLAVE or MASTER to perform write operation
if (!dev_handle) {
fprintf(stderr, "Error finding USB device\n");
}
if(libusb_kernel_driver_active(dev_handle, DEVICE_CONFIGURATION) == 1) {
std::cout << "Kernel Driver Active" << std::endl;
if(libusb_detach_kernel_driver(dev_handle, DEVICE_CONFIGURATION) == 0)
std::cout << "Kernel Driver Detached!" << std::endl;
}
rc = libusb_claim_interface(dev_handle, DEVICE_CONFIGURATION);
if(rc != 0) {
std::cout << "Cannot Claim Interface" << std::endl;
rc = libusb_set_interface_alt_setting(dev_handle, DEVICE_CONFIGURATION, 1);
if(rc!=0)
{
std::cout <<"Cannot configure alt setting "<<std::endl;
}
else
{
std::cout <<"configured alt setting "<<std::endl;
}
}
std::cout << "Data->" << sendData << "<-" << std::endl;
std::cout << "Writing Data..." << std::endl;
std::cout << "Trying endpoint " << EP_DATA_OUT << "." << std::endl;
rc = libusb_bulk_transfer(dev_handle, EP_DATA_OUT, sendData, sizeof(sendData), &actual, 1000);
if(rc == 0)
{
std::cout << "Writing Successful!" << std::endl;
}
else
{
std::cout << "Write Error! Rc: " << rc << " Actual transfered bytes: " << actual << "." << std::endl;
std::cout << "Error code means: " << libusb_error_name(rc) << std::endl;
}
rc = libusb_release_interface(dev_handle, 0);
if(rc!=0) {
std::cout << "Cannot Release Interface" << std::endl;
}
if (dev_handle)
libusb_close(dev_handle);
libusb_exit(ctx);
}
void readButtonClicked()
{
int rc;
libusb_context *ctx = NULL;
libusb_device_handle *dev_handle;
int actual = 0;
unsigned char *readData = new unsigned char[512];
rc = libusb_init(&ctx);
if(rc < 0) {
std::cout << "Init Error " << rc << std::endl;
}
libusb_set_debug(ctx, 6);
dev_handle = libusb_open_device_with_vid_pid(ctx, 0x04b4, MASTER); // Give SLAVE or MASTER to perform Read operation
if (!dev_handle) {
fprintf(stderr, "Error finding USB device\n");
}
if(libusb_kernel_driver_active(dev_handle, DEVICE_CONFIGURATION) == 1) {
std::cout << "Kernel Driver Active" << std::endl;
if(libusb_detach_kernel_driver(dev_handle, DEVICE_CONFIGURATION) == 0)
std::cout << "Kernel Driver Detached!" << std::endl;
}
rc = libusb_claim_interface(dev_handle, DEVICE_CONFIGURATION);
if(rc != 0) {
std::cout << "Cannot Claim Interface" << std::endl;
rc = libusb_set_interface_alt_setting(dev_handle, DEVICE_CONFIGURATION, 1);
if(rc!=0)
{
std::cout <<"Cannot configure alt setting "<<std::endl;
}
else
{
std::cout <<"configured alt setting "<<std::endl;
}
}
std::cout << "Trying endpoint " << EP_DATA_IN << "." << std::endl;
rc = libusb_bulk_transfer(dev_handle, EP_DATA_IN, readData, sizeof(readData), &actual, 1000);
if(rc >=0)
{
std::cout << "Read Success! Rc: " << libusb_error_name(rc) << " Actual transfered bytes: " << actual << "." << std::endl;
}
else
{
std::cout << "Read Error! Rc: " << rc << " Actual transfered bytes: " << actual << "." << std::endl;
std::cout << "Error code means: " << libusb_error_name(rc) << std::endl;
}
rc = libusb_release_interface(dev_handle, 0);
if(rc!=0) {
std::cout << "Cannot Release Interface" << std::endl;
}
if (dev_handle)
libusb_close(dev_handle);
libusb_exit(ctx);
}
//Output Slave writing Master reading
libusb: debug [libusb_get_device_list]
libusb: debug [discovered_devs_append] need to increase capacity
libusb: debug [libusb_get_device_descriptor]
libusb: debug [libusb_get_device_descriptor]
libusb: debug [libusb_get_device_descriptor]
libusb: debug [libusb_open] open 2.16
libusb: debug [usbi_add_pollfd] add fd 26 events 4
libusb: debug [libusb_kernel_driver_active] interface 0
libusb: debug [libusb_claim_interface] interface 0
Data->Slave writing !!!<-
Writing Data...
Trying endpoint 1.
Writing Successful!
libusb: debug [libusb_alloc_transfer] transfer 0x563230a5b760
libusb: debug [libusb_submit_transfer] transfer 0x563230a5b760
libusb: debug [add_to_flying_list] arm timerfd for timeout in 1000ms (first in line)
libusb: debug [submit_bulk_transfer] need 1 urbs for new transfer with length 8
libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
libusb: debug [handle_events] poll fds modified, reallocating
libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
libusb: debug [handle_events] poll() returned 1
libusb: debug [reap_for_handle] urb type=3 status=0 transferred=8
libusb: debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1
libusb: debug [handle_bulk_completion] last URB in transfer --> complete!
libusb: debug [disarm_timerfd]
libusb: debug [usbi_handle_transfer_completion] transfer 0x563230a5b760 has callback 0x7f2537dfbb30
libusb: debug [sync_transfer_cb] actual_length=8
libusb: debug [libusb_free_transfer] transfer 0x563230a5b760
libusb: debug [libusb_release_interface] interface 0
libusb: debug [libusb_close]
libusb: debug [usbi_remove_pollfd] remove fd 26
libusb: debug [libusb_exit]
libusb: debug [libusb_exit] destroying default context
libusb: debug [libusb_get_device_list]
libusb: debug [discovered_devs_append] need to increase capacity
libusb: debug [libusb_get_device_descriptor]
libusb: debug [libusb_get_device_descriptor]
libusb: debug [libusb_open] open 2.17
libusb: debug [usbi_add_pollfd] add fd 26 events 4
libusb: debug [libusb_kernel_driver_active] interface 0
libusb: debug [libusb_claim_interface] interface 0
Trying endpoint 129.
libusb: debug [libusb_alloc_transfer] transfer 0x563230a35450
libusb: debug [libusb_submit_transfer] transfer 0x563230a35450
libusb: debug [add_to_flying_list] arm timerfd for timeout in 1000ms (first in line)
libusb: debug [submit_bulk_transfer] need 1 urbs for new transfer with length 8
libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
libusb: debug [handle_events] poll fds modified, reallocating
libusb: debug [handle_events] poll() 3 fds with timeout in 60000ms
Master Read Error! Rc: -1 Actual transfered bytes: 0.
Error code means: LIBUSB_ERROR_IO
libusb: debug [handle_events] poll() returned 1
libusb: debug [reap_for_handle] urb type=3 status=-71 transferred=0
libusb: debug [handle_bulk_completion] handling completion status -71 of bulk urb 1/1
libusb: debug [handle_bulk_completion] low level error -71
libusb: debug [disarm_timerfd]
libusb: debug [usbi_handle_transfer_completion] transfer 0x563230a35450 has callback 0x7f2537dfbb30
libusb: debug [sync_transfer_cb] actual_length=0
libusb: debug [libusb_free_transfer] transfer 0x563230a35450
libusb: debug [libusb_release_interface] interface 0
libusb: debug [libusb_close]
libusb: debug [usbi_remove_pollfd] remove fd 26
libusb: debug [libusb_exit]
libusb: debug [libusb_exit] destroying default context
Show Less
Hi, I have a question with CX3.
Does SPI support 3-wire communication in CX3?
Hello,
I’d like to be able with Visual Studio 2022 to compile the project fwdownload_fx3 included in EZ-USB™ FX3 SDK for Windows (x32) (exe) 1.3.4. The default path of this project is "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\fwdownload_fx3".
The first error I faced when I tried to compile was:
Error RC1015 cannot open include file 'afxres.h'.
I found out that by installing C++ MFC it would fix this error. Now I’m facing an other error:
Error LNK2019 unresolved external symbol sprintf referenced in function "public: void __cdecl CCyUSBDevice::UsbdStatusString(unsigned long,char *)" (?UsbdStatusString@CCyUSBDevice@@QEAAXKPEAD@Z) FwDownloadApp C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\fwdownload_fx3\cyapi.lib(CyAPI.obj) 1
Could you please help me on this issue?
PS: I noticed that I have no trouble to compile all the projects in the C# folder C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\c_sharp by opening the sln files for VS2015.
Thank you very much and have a nice one.
Best regards,
François Delaplace
Show LessI have a USB2 HID device, when I do CyU3PUsbDoRemoteWakeup(); it does not wake up the computer in sleep mode. I see that the status is SUCCESS, but the computer does not wake up. Please advise.
UPDATE:
I noticed that this issue occurs only when going through a USB3 HUB -- but when I use the USB3 ports on the front of my computer, CyU3PUsbDoRemoteWakeup() does wake the computer up....
Why would this issue occur on a USB3 HUB? Please advise.
Show LessI have a USB HID device that I want to wake up when the computer wakes up. How do I check when the computer wakes up? Is there an event produced? I can wake up the computer using CyU3PUsbDoRemoteWakeup, but I don't know how to wake up the device if something else wakes up the computer.
Show LessI have a camera that transfer data using USB3.0 interface.
Which series of device can be used for the purpose?
If the device is not only used to receive data from the camera, but also process the frame, and response it by controlling the motor, which device satisfy this usage?
Show LessCould any series of peripheral device be the host and communicate other USB 3.0 equipment?
I'm trying to write an application to format the logs I have coming out of my FX3. Basically, every time a CyUSB device attaches, we create a new thread that repeatedly polls for new data and puts it in a queue that gets read on the main thread. These threads are each associated with a flag that indicates if the thread should terminate gracefully. This happens if a device is removed, for example. I use the deviceAttached and deviceRemoved events to handle devices adding or removing.
The situation I'm running into is that I receive a deviceRemoved event and request the thread to terminate gracefully using my flag. In the thread, even though the timeout on xferData is set to 1 second, the xferData function doesn't return, which means the thread doesn't read my flag, and thus doesn't terminate.
During normal operation, xferData terminates after a second like it should. It's just after the device is disconnected that it hangs.
Am I doing something wrong, or is there a workaround for this?
I've attached the solution if you'd like to try it out. usbMgr.cs is where the interesting parts are. UsbPoll is the thread body. removeDevice is the function that's trying to join the thread. If you wanted to try this out, you don't actually need your FX3 to transmit anything as long as it's using the PID, VID, and endpoint that I'm expecting.
I'm running into other issues getting xferData to actually receive data, but that's probably going to be a different post.
Show Less