USB superspeed peripherals Forum Discussions
Hi,
My question is regarding running an auto exposure algorithm on the CX3 chip but only for images and not large video formats.
From my understanding as there is no ISP on the CX3, the only way to adjust the image parameters such as exposure on the fly, is to send these data to the PC through the USB3.0 connection, do the processing there on a host application and then send back commands through the UVC to adjust the gain or other parameters to the CX3. Then the CX3 can write to the the image sensor these new parameters through the I2C connection and adjust the gain. so to summarize:
Image sensor ------I2C read ------> CX3 ----- (USB 3.0) UVC connection ------> PC (process) ----> (USB 3.0) UVC connection -----> CX3 ------I2C write ------> Image sensor
Is this correct?
If so I have the following questions:
1) What is a typical round trip time for an update like this. From reading the values from the sensor to writing new ones to it given that the processing step in the PC is known and is not too large? If you don't know this can you please refer me to some documentation with which I could find out the timings of the I2C read/writes ans the UVC read/Writes?
2) Can the ARM9 processor on the CX3 not process the information such as exposure and automatically adjust and reply with a correct gain value. This will obviously take a lot of time but for single image this time might be acceptable. I am wondering if the FX3 SDK comes with any API functions to help with this.
3) the ultimate goal here is to have an automatic way of adjusting the exposure of the sensor based on the surrounding on the fly. I know that having and ISP is the easiest way but for our application we only care about still images so a high performance custom ISP is not required and we might be able to get by with the ARM9. Are there any resources that could help us calculate how performant the ARM9 could be? What is the performance overhead of all the UVC and other peripherals?
Thanks for your help in advance
Cheers
Ali
Show LessHi
I have a second stage bootloader that uses the FX3 boot firmware library; I'm testing using the FX3 superspeed explorer kit with a custom daughterboard attached.
The bootloader works correctly when connected via USB3. However, I get unexpected USB control transfer failures when connected by USB2 in specific circumstances.
When calling CyFx3BootUsbDmaXferData() to receive data for an OUT control transfer, sometimes it will return CY_FX3_BOOT_ERROR_ABORTED unexpectedly. Setup processing doesn't block (and there is no visible delay in debug output at the point of failure), and as far as I am aware there should be no second control transfer / setup packet being received; but the SUDAV interrupt bit is definitely set at the point of failure, which is why ERROR_ABORTED ends up being returned, and the transfer does fail on the host side.
This shows up both during USB enumeration, and when using vendor control transfers. It happens when directly connected to a USB2 port, or when connected to a USB3 port with a USB2 cable, or when connected to a USB3 port but with USB3 functionality disabled in the call to CyFx3BootUsbConnect().
It seems like it is a timing- or bus-state-related problem as:
1) it only happens when the FX3 is connected directly to the host. If there is a USB hub in between, everything works fine.
2) when USB enumeration fails due to the error, the host will do a USB reset and subsequent enumeration then works OK.
3) the specific transfer which it fails on varies depending on how much debug output I have enabled (debug output is going to the UART only)
I get this failure both when loading the second-stage bootloader from EEPROM, and when loading via USB using the ROM bootloader.
I do _not_ get a failure when my separate main firmware that uses the full FX3 library is used (same USB descriptors, different code).
Any ideas what is causing this / how to work around it?
Here is an example of an enumeration failure, with the FX3 directly connected to the host. After the ERROR_ABORTED, the host does a USB reset and re-enumerates successfully:
pv2boot: USB_RESET
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x100 wLength=64
pv2boot: -> EP0 write 18 bytes to host
pv2boot: -> done
pv2boot: USB_RESET
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x100 wLength=18
pv2boot: -> EP0 write 18 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=5
pv2boot: -> EP0 write 5 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=22
pv2boot: -> EP0 write 22 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x200 wLength=9
pv2boot: -> EP0 write 9 bytes to host
pv2boot: xferdata (write) failed: ERROR_ABORTED
pv2boot: SUDAV=64
pv2boot: SUTOK=0
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x100 wLength=64
pv2boot: -> EP0 write 18 bytes to host
pv2boot: -> done
pv2boot: USB_RESET
pv2boot: USB_RESET
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x100 wLength=18
pv2boot: -> EP0 write 18 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=5
pv2boot: -> EP0 write 5 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=22
pv2boot: -> EP0 write 22 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x200 wLength=9
pv2boot: -> EP0 write 9 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x200 wLength=41
pv2boot: -> EP0 write 41 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x300 wLength=255
pv2boot: -> EP0 write 4 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x409 wValue=0x302 wLength=255
pv2boot: -> EP0 write 24 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x409 wValue=0x301 wLength=255
pv2boot: -> EP0 write 24 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x409 wValue=0x303 wLength=255
pv2boot: -> EP0 write 18 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x0 request=0x9 wIndex=0x0 wValue=0x1 wLength=0
pv2boot: -> ACK
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=5
pv2boot: -> EP0 write 5 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=22
pv2boot: -> EP0 write 22 bytes to host
pv2boot: -> done
(I suspect the first of two USB resets and the setup request immediately following the error may actually have occurred in the other order)
The host reported this enumeration failure (and successful retry):
[696630.259280] usb 1-6: new high-speed USB device number 29 using xhci_hcd
[696630.463468] usb 1-6: unable to read config index 0 descriptor/start: -71
[696630.463487] usb 1-6: can't read configurations, error -71
[696630.799003] usb 1-6: new high-speed USB device number 30 using xhci_hcd
[696631.106032] usb 1-6: New USB device found, idVendor=04b4, idProduct=fafb
Also on the host side, a wireshark capture of USB activity shows the GetDescriptor control transfer failing with -EPROTO ("protocol error", which is unfortunately a catchall for a lot of different unexpected-device-behaviour errors)
Here is an example of the same USB2 enumeration working correctly, with a hub between the FX3 and the host. The requests appear to be identical to the failing case:
pv2boot: USB_RESET
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x100 wLength=64
pv2boot: -> EP0 write 18 bytes to host
pv2boot: -> done
pv2boot: USB_RESET
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x100 wLength=18
pv2boot: -> EP0 write 18 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=5
pv2boot: -> EP0 write 5 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=22
pv2boot: -> EP0 write 22 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x200 wLength=9
pv2boot: -> EP0 write 9 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x200 wLength=41
pv2boot: -> EP0 write 41 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0x300 wLength=255
pv2boot: -> EP0 write 4 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x409 wValue=0x302 wLength=255
pv2boot: -> EP0 write 24 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x409 wValue=0x301 wLength=255
pv2boot: -> EP0 write 24 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x409 wValue=0x303 wLength=255
pv2boot: -> EP0 write 18 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x0 request=0x9 wIndex=0x0 wValue=0x1 wLength=0
pv2boot: -> ACK
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=5
pv2boot: -> EP0 write 5 bytes to host
pv2boot: -> done
pv2boot: setup: type=0x80 request=0x6 wIndex=0x0 wValue=0xF00 wLength=22
pv2boot: -> EP0 write 22 bytes to host
pv2boot: -> done
Show LessHi there,
I'm designing a PCB in Altium for prototyping and I want to put the CYUSB3KIT-003 on the PCB. Therefor I need the distancing between the two 40 pins Female Headers on the backside of the board. The following link regarding to the Hardware files(.brd file) from following link:
can not be opened in EAGLE(9.6.2). I get the following error:
Error:
line 1, column 1: Start tag expected.
Is there any 3D body of the CYUSB3KIT-003 available as well?
Kind regards
Shervin
Show LessI have made a PCB with CYUSB3014, when doing test, about 2/3 boards can link to usb3.0 and works very well, I can get 430MB/s use the streamer program with no error.
but about 1/3 boards can only link with usb2.0, only 40MB/s with streamer program.
I have checked the clock, power, sstx/ssrx connections on board, seems all good.
Do you have any idea, how to check this issue?
Thanks a lot.
Show LessHello,
I have a question that if I can stop a thread while running?
I have tried to search by Google but found nothing useful.
For example, I have started a thread in CyFxApplicationDefine like:
retThrdCreate = CyU3PThreadCreate (&cdcThread, /* UVC Thread structure */
"32:CDC UARTtoUSB Thread", /* Thread Id and name */
CDCAppThread_Entry, /* UVC Application CDC Thread Entry function */
0, /* No input parameter to thread */
ptr3, /* Pointer to the allocated thread stack */
UVC_APP_CDC_THREAD_STACK, /* UVC Application Thread stack size */
UVC_APP_CDC_THREAD_PRIORITY, /* UVC Application Thread priority */
UVC_APP_CDC_THREAD_PRIORITY, /* Threshold value for thread pre-emption. */
CYU3P_NO_TIME_SLICE, /* No time slice for the application thread */
CYU3P_AUTO_START /* Start the Thread immediately */
);
And CDCAppThread_Entry is like:
void CDCAppThread_Entry (uint32_t input)
{
for(;;)
{
//do something
CyU3PThreadSleep(600);
}
}
If I want to stop the thread while running, should I add a flag in the for loop, and check it if true then break the loop?
And the thread will be auto finished after this?
(I have tried this actually, but firmware run freeze. I donot know why.)
Or I should just leave the loop to run freely?
(I have tried this also, everything seems work fine, but I think it is a waste of time to run this thread.)
I am not familiar with the ThreadX RTOS, and do not know what is the correct way to do this.
Thanks.
Show LessQuestions about EEPROM of CYUSB3014 for booting.
The AN76405 Boot Options document contains a list of EEPROM-tested vendors as shown below.
Currently, EEPROM is being reviewed as a smaller package due to the PCB size limitation of the oral scanner model being developed by our company.
I excluded the BGA Type and checked it and found ONSEMI's CAT24M01HU5I−GT3.
Please check if there are any problems when using onsemi eeprom.
<AN76405>
<ONSEMI / CAT24M01HU5I-GT3>
Show Less
Hi all,
I am stuck for a few days with this issue:
To begin with, my setup is the following:
Altera Cyclone V attached through GPIF 2 interface to FX3, which is connected to a windows desktop through USB 3.0 cable.
I validated the system with application note: 001-65974_AN65974_Designing_with_the_EZ-USB_FX3_Slave_FIFO_Interface
The only difference is that, my FPGA is the Cyclone V and the appnote was made to Cyclone III. Just made the porting and everything was up and running.
On the FPGA side, I just merged the two examples of streamIn and streamOut, because I wanted the system to be bidirectional. And when generating data to send to the desktop I was incrementing it, to be as follows: 32'd0000_0000, 32'd0000_0001, 32'd0000_0002, 32'd0000_0003, etc etc etc
On the FX3 is running the SlaveFIFOsync.img which setups the DMA to dispatch data in AUTO mode with two sockets.
On windows desktop I am using the streamer demo from cypress, to measure the XferRate and to watch the data coming through the USB 3.0.
Now, the issue is:
If I select one packet for transfer, I can see the data coming correctly like this:
32'd0000_0000,
32'd0000_0001,
32'd0000_0002,
32'd0000_0003,
....
If I select two packet for transfer, I can see the data coming correctly like this:
32'd0000_0000,
32'd0000_0002,
32'd0000_0004,
32'd0000_0006,
....
If I select four packet for transfer, I can see the data coming correctly like this:
32'd0000_0000,
32'd0000_0004,
32'd0000_0008,
32'd0000_000C,
....
I dont want to use just one packet for Xfer because the Xfer rate is xtremely low.
Maybe the data sampling on the streamer app is being done wrong. I think it is only printing the last 32-bit packet of each Xfer. I cannot access to all the packets in the Xfer.
Can anybody help me on this issue please ?
Thanks in advance,
Pedro
Show LessI have following error during build the project in EZ-USB Suite
11:22:21 **** Incremental Build of configuration Default for project Firmware ****
make all
Cannot run program "make": CreateProcess error=2, The system cannot find the file specified
Error: Program "make" not found in PATH
PATH=
11:22:21 Build Finished (took 50ms
Thanks
Esakki
Show LessHi,
We are working on a solution that involves transmitting 5120x720 video at 60fps, from FPGA through FX3 (32-bit parallel interface) to PC (USB3)
Each pixel size is 8-bit and since UVC does not support raw image data we want to convert the 8 bit pixels to 16 bit pixels by apending a color byte 127 (which means grayscale in YUV format). We want to perform this conversion in the FX3 before transmitting the data to the PC
That way our RAW 8 pixels from FPGA will be converted to YUV format and we can view the video on the PC through UVC.
Is this possible? If not, what is an alternative way viewing the data on the PC without using a custom windows driver.
Thanks,
Show LessHi,
I'm starting a new product with CYUSB3014 FX3 chip.
My simple question is, how many devices I am allowed to put to the market, using Cypress default PID/VID, before having to purchase my own VID ?
My target market is not a consumer market, and 200 devices per year is the maximum number of devices I expect to manufacture in the first couple of years, So it would be very helpful if there was a way to kickstart the project with the defaut PID/VID.
Some other manufacturers (like NXP) provide custom PID to be used with their VID, and limited to a few thousands devices. Do you happen to offer a similar service?
Thank you,
Show Less