USB superspeed peripherals Forum Discussions
Hi,
We are working at slave FIFO interface with 32 bits. With this setup of configuration, we would like to use GPIO[50,51,52,57] and GPIO[45] as GPIO – input and output function.
These GPIO at slave FIFO configuration are assign to I2S interface, can we change it to GPIO in and out ports?
Do we need special code for it?
I assume we need to perform the structure change from the GUI, do we need special code to run polling and generating output signals on those pins ?
Oded.D
Show LessHi,
I'm having trouble getting data from my sensor to my Windows application and I'm seeing that my multi-channel DMA callback is being executed when the board is powered up before anything has been sent over the GPIF port. I'm using AUTO_MANY_TO_ONE mode but I have a callback installed for debug printfs.
@StartApplication, running at SuperSpeedStarting Application
USB App Start Complete
USB LOG: 17
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
Sending OS Feature ID
Sending OS Feature ID
Received a Class request
Sending CDC Config Data
Received a Class request
Received a Class request
Setting CDC Configuration
Received a Class request
Sending CDC Config Data
My DMA buffers are 48k and there are two of them (1 for each of the 2 threads); when I had the configuration set for 2 buffers per thread I would see the callback executed 4 times. I'm following the Video_Class_UVC_Framework (AN75779) example with two producer sockets (threads on the GPIF) and one consumer socket (USB endpoint). When the application starts up I request 66k from the endpoint and I expect to see 48k and 18k buffers for each frame but I only see 48k buffers. Also, the first 96k of data that the application gets is always all zero, 96k is two 48k buffers and I suspect that data goes to the USB endpoint because of the first two callback executions when the application starts up. I know that my state machine must be wrong because things seem to fall apart after a handful of frames but I figured I needed to fix the initial callback executions first. Any assistance would be greatly appreciated.
<< Continuation of printf from above) >>
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
bReqType: 0x2 bType: 0x0 bTarget: 0x2 bRequest: 0x1 wValue: 0x0 wIndex: 0x86 wLength: 0x0
CyFxUsbHandleClearFeature: Resetting Imaging Endpoint...
CyFxBulkSrcSinkApplnUSBSetupCB: Resetting Imaging Endpoint...
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
bReqType: 0x2 bType: 0x0 bTarget: 0x2 bRequest: 0x1 wValue: 0x0 wIndex: 0x86 wLength: 0x0
CyFxUsbHandleClearFeature: Resetting Imaging Endpoint...
CyFxBulkSrcSinkApplnUSBSetupCB: Resetting Imaging Endpoint...
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
bReqType: 0x2 bType: 0x0 bTarget: 0x2 bRequest: 0x1 wValue: 0x0 wIndex: 0x86 wLength: 0x0
CyFxUsbHandleClearFeature: Resetting Imaging Endpoint...
CyFxBulkSrcSinkApplnUSBSetupCB: Resetting Imaging Endpoint...
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
bReqType: 0x2 bType: 0x0 bTarget: 0x2 bRequest: 0x1 wValue: 0x0 wIndex: 0x86 wLength: 0x0
CyFxUsbHandleClearFeature: Resetting Imaging Endpoint...
CyFxBulkSrcSinkApplnUSBSetupCB: Resetting Imaging Endpoint...
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
bReqType: 0x2 bType: 0x0 bTarget: 0x2 bRequest: 0x1 wValue: 0x0 wIndex: 0x86 wLength: 0x0
CyFxUsbHandleClearFeature: Resetting Imaging Endpoint...
CyFxBulkSrcSinkApplnUSBSetupCB: Resetting Imaging Endpoint...
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
bReqType: 0x2 bType: 0x0 bTarget: 0x2 bRequest: 0x1 wValue: 0x0 wIndex: 0x86 wLength: 0x0
CyFxUsbHandleClearFeature: Resetting Imaging Endpoint...
CyFxBulkSrcSinkApplnUSBSetupCB: Resetting Imaging Endpoint...
CyFxUsbGpifDmaCallback ENTERED type=0x8 w/ Buffer Length=49152
bReqType: 0x2 bType: 0x0 bTarget: 0x2 bRequest: 0x1 wValue: 0x0 wIndex: 0x86 wLength: 0x0
CyFxUsbHandleClearFeature: Resetting Imaging Endpoint...
CyFxBulkSrcSinkApplnUSBSetupCB: Resetting Imaging Endpoint...
Show LessHello
The following is described in 5.5.1 CX3 MIPI Receiver Configuration of AN90369.
>
>Currently, the tool does not use THS-Prepare and THS-Zero value fields. To modify the THS-Prepare and Zero values, the SDK supports an API >‘CyU3PMipicsiSetPhyTimeDelay’. See the FX3 SDK API guide for details on this API. A PHY Time Delay of 9 (2nd argument of above API) works with most >sensors/ISPs.
>
Q1) Does it mean that it is not necessary to set the THS-Prepare and THS-Zero values? Or does it have to be set with CyU3PMipicsiSetPhyTimeDelay instead of the MIPI configuration tool?And What happens when nothing is set?
Q2)If THS-Prepare and THS-Zero have MAX and MIN values, which value is required?Please tell me about the rules at the time of setting, if there is a relationship with other setting values.
Best Regards
Arai
Show LessI have a Linux (Ubuntu) FX3 app running just fine - using the cyusb library (wrapper for libusb-1.0).
What do you suggest to port this app to Windows, more specifically the cyusb library or equivalent? I don't see an equivalent library in the FX3 Windows folders?!
I'd obviously like to reuse as much of my app as possible
Show LessHi Sir,
A very Good Day to you !
The customer's product is an industrial camera, which uses cyusb3014-bzxc. When performing ESD 4KV test, no data will be sent out from CYUSB3014. The following figure is detected by bushound.All the control commands sent from the host failed, and the reset device can be used to restore normal operation.How to solve this problem?
Best regards!
Paddy
Show Less
Hello the specialist team,
After go through the AN75779 doc and sample project. I found the DMA was set to 16K byte and whole UVC solution supports 4 DMA bufs.
And I have a question "What's the biggest sensor the FX3 could support? Did it supports 64M or 48M sensors?"
I'm not sure whether it can support the sensors which row size is bigger that the DMA buffer size. ex.row size=9000 pixel * 16bit DCMI=18000 bytes, this value is bigger than DMA size 16K byte. Did the AN75779 sample project still works? Will there be some data missing, Cause exchanging DMA chain when row data on transmission?
If it works, please help to explain more about the relationship between DMA settings and actually image data
If not , what can I do to figure it out?
Show LessGetting a compile error from Install.sh script in FX3 SDK. In main.cpp. Looks disturbing, should be ok?
Loading the SDK on a Raspberry PI 4-B with Raspbian OS:
root@raspberrypi:/home/pi/Documents/FX3SDK/cyusb_linux_1.0.5/lib# uname -a
Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
I previously loaded 'LIBUSB' when working with the FTDI device, if that matters?
Here is copy of shell and snippet of main.cpp, looks as if caller to function and function both declare parm1 as int, but compiler
says trying to convert from int to int*(*)()?
root@raspberrypi:/home/pi/Documents/FX3SDK/cyusb_linux_1.0.5# ./install.sh
Your current directory is /home/pi/Documents/FX3SDK/cyusb_linux_1.0.5. This is where the cyusb_suite software will be installed...
g++ -fPIC -o lib/libcyusb.o -c lib/libcyusb.cpp
g++ -shared -Wl,-soname,libcyusb.so -o lib/libcyusb.so.1 lib/libcyusb.o -l usb-1.0 -l rt
cd lib; ln -sf libcyusb.so.1 libcyusb.so
rm -f lib/libcyusb.o
rm -f moc_controlcenter.cpp
rm -f ui_controlcenter.h
rm -f controlcenter.o main.o fx2_download.o fx3_download.o streamer.o moc_controlcenter.o
rm -f *~ core *.core
/usr/lib/arm-linux-gnueabihf/qt4/bin/uic controlcenter.ui -o ui_controlcenter.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o controlcenter.o controlcenter.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
main.cpp: In function :
main.cpp:133:17: error: invalid conversion from 'int' to 'int* (*)()' [-fpermissive]
libusb_error(r, "Error in 'get_active_config_descriptor' ");
^
In file included from /usr/include/c++/8/cerrno:42,
from /usr/include/c++/8/ext/string_conversions.h:44,
from /usr/include/c++/8/bits/basic_string.h:6400,
from /usr/include/c++/8/string:52,
from /usr/include/qt4/QtCore/qstring.h:54,
from /usr/include/qt4/QtCore/qobject.h:48,
from /usr/include/qt4/QtCore/qiodevice.h:46,
from /usr/include/qt4/QtCore/qxmlstream.h:45,
from /usr/include/qt4/QtCore/QtCore:3,
from main.cpp:11:
main.cpp:74:30: note: initializing argument 1 of
static void libusb_error(int errno, const char *detailedText)
^
snippet main.cpp code in ~/cyusb_linux_1.0.5/gui_src:
static void libusb_error(int errno, const char *detailedText)
{
char msg[30];
char tbuf[60];
memset(msg,'\0',30);
memset(tbuf,'\0',60);
QMessageBox mb;
if ( errno == LIBUSB_ERROR_IO )
strcpy(msg, "LIBUSB_ERROR_IO");
else if ( errno == LIBUSB_ERROR_INVALID_PARAM )
strcpy(msg, "LIBUSB_ERROR_INVALID_PARAM" );
else if ( errno == LIBUSB_ERROR_ACCESS )
strcpy(msg, "LIBUSB_ERROR_ACCESS");
else if ( errno == LIBUSB_ERROR_NO_DEVICE )
strcpy(msg, "LIBUSB_ERROR_NO_DEVICE");
else if ( errstatic void libusb_error(int errno, const char *detailedText)
{
char msg[30];
char tbuf[60];
memset(msg,'\0',30);
memset(tbuf,'\0',60);
QMessageBox mb;
if ( errno == LIBUSB_ERROR_IO )
strcpy(msg, "LIBUSB_ERROR_IO");
else if ( errno == LIBUSB_ERROR_INVALID_PARAM )
strcpy(msg, "LIBUSB_ERROR_INVALID_PARAM" );
else if ( errno == LIBUSB_ERROR_ACCESS )
strcpy(msg, "LIBUSB_ERROR_ACCESS");
else if ( errno == LIBUSB_ERROR_NO_DEVICE )
strcpy(msg, "LIBUSB_ERROR_NO_DEVICE");
else if ( errno == LIBUSB_ERROR_NOT_FOUND )
strcpy(msg, "LIBUSB_ERROR_NOT_FOUND");
else if ( errno == LIBUSB_ERROR_BUSY )
strcpy(msg, "LIBUSB_ERROR_BUSY");
else if ( errno == LIBUSB_ERROR_TIMEOUT )
strcpy(msg, "LIBUSB_ERROR_TIMEOUT");
else if ( errno == LIBUSB_ERROR_OVERFLOW )
strcpy(msg, "LIBUSB_ERROR_OVERFLOW");
else if ( errno == LIBUSB_ERROR_PIPE )
strcpy(msg, "LIBUSB_ERROR_PIPE");
else if ( errno == LIBUSB_ERROR_INTERRUPTED )
strcpy(msg, "LIBUSB_ERROR_INTERRUPTED");
else if ( errno == LIBUSB_ERROR_NO_MEM )
strcpy(msg, "LIBUSB_ERROR_NO_MEM");
else if ( errno == LIBUSB_ERROR_NOT_SUPPORTED )
strcpy(msg, "LIBUSB_ERROR_NOT_SUPPORTED");
else if ( errno == LIBUSB_ERROR_OTHER )
strcpy(msg, "LIBUSB_ERROR_OTHER");
else strcpy(msg, "LIBUSB_ERROR_UNDOCUMENTED");
sprintf(tbuf,"LIBUSB_ERROR NO : %d, %s",errno,msg);
mb.setText(tbuf);
mb.setDetailedText(detailedText);
mb.exec();
return;
}
static void update_devlist()
{
int i, r, num_interfaces, index = 0;
char tbuf[60];
struct libusb_config_descriptor *config_desc = NULL;
mainwin->listWidget->clear();
for ( i = 0; i < num_devices_detected; ++i ) {
h = cyusb_gethandle(i);
sprintf(tbuf,"VID=%04x,PID=%04x,BusNum=%02x,Addr=%d",
cyusb_getvendor(h), cyusb_getproduct(h),
cyusb_get_busnumber(h), cyusb_get_devaddr(h));
mainwin->listWidget->addItem(QString(tbuf));
r = cyusb_get_active_config_descriptor (h, &config_desc);
if ( r ) {
libusb_error(r, "Error in 'get_active_config_descriptor' ");
return;
}
root@raspberrypi:/home/pi/Documents/FX3SDK/cyusb_linux_1.0.5/lib# uname -a
Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
I do not have access to the UART pins on the device, so I am attempting to perform all debugging over the USB connection.
I know there is a `cyfxusbdebug` example, but there isn't any example host (Windows) code or applications which show how to retrieve and parse the log data dumped to the USB endpoint. If someone does know where such an example application is, let me know.
My other thought was to use the USB-UART Bridge example (https://www.cypress.com/documentation/code-examples/ez-usb-fx3-usb-uart-bridge-example ) and dump all of the debug logging to this USB-COM serial port.
However, while I *am* able to connect to the COM port w/ Putty or other serial-port software, I am unable to get any of the `CyU3PDebugPrint()` data to be sent over the port.
I have tried to call `CyU3PDebugInit()` and supply the endport socket ID created for the USB->UART endpoint, like so:
`CyU3PDebugInit(CY_FX_EP_CONSUMER1_SOCKET, 0);`
I also tried `CY_FX_EP_CONSUMER2_SOCKET`, but same thing. No debug data is sent to the UART connection.
How can I get this to work? Is it possible?
I've attached my primary source file for the attempt described above.
Show LessHi, all
I got two 2592*2048 cameras, i tried 8 bit mode set UVC as Y16 format everything is right
when i use 10bit mode add 2bits pad i tried change display resultion as 3888*2048(2592*1.5 *2048) e-camview show 0 fps
then i keep resultion as 2592*2048 set format as RGB24 e-cam still shows 0fps
i checked data stream on bushound it shows correct data size on transmission(15925248bytes without uvc header)
Show LessI can see in /usr/local/lib the link libcyusb -> /usr/local/lib/libcyusb.s0.1 and libcyusb.s0.1.
But install.sh has a problem, copy of my terminal:
jbrehm@jbrehm-desktop:~/FX3_SDK/FX3_SDK_1.3.4_Linux/cyusb_linux_1.0.5$ sudo ./install.sh
[sudo] password for jbrehm:
Your current directory is /home/jbrehm/FX3_SDK/FX3_SDK_1.3.4_Linux/cyusb_linux_1.0.5. This is where the cyusb_suite software will be installed...
g++ -fPIC -o lib/libcyusb.o -c lib/libcyusb.cpp
g++ -shared -Wl,-soname,libcyusb.so -o lib/libcyusb.so.1 lib/libcyusb.o -l usb-1.0 -l rt
cd lib; ln -sf libcyusb.so.1 libcyusb.so
rm -f lib/libcyusb.o
./install.sh: line 50: qmake-qt4: command not found
make: *** No rule to make target '/usr/share/qt4/mkspecs/linux-g++-64/qmake.conf', needed by 'Makefile'. Stop.
make: *** No rule to make target '/usr/share/qt4/mkspecs/linux-g++-64/qmake.conf', needed by 'Makefile'. Stop.
jbrehm@jbrehm-desktop:~/FX3_SDK/FX3_SDK_1.3.4_Linux/cyusb_linux_1.0.5$ cyusb_linux
cyusb_linux: error while loading shared libraries: libcyusb.so: cannot open shared object file: No such file or directory
Followed all the guidelines before install.sh. Attempting to install on a x86 platform.
Also, can I install the FX3 SDK on a ARM Linux platform?
Its Ubuntu 18.
Thanks
Show Less