USB superspeed peripherals Forum Discussions
I'm working on a UVC application using the CX3 microcontroller and I need to configure over 1000 registers for my imager. For an array containing address/value pairs for 1000 registers, the expected memory is around 4KB, but when it exceeds 500 members, the application fails to work. Given the CX3's 512 KB RAM, I believe there should be sufficient memory to accommodate this array. The image file for the application is 148 KB.
Question: Do you have any guidance on optimizing memory usage for this scenario? I know that cyfxtx.c file needs to be modified, but I don't know which area and how.
This must be a silly question, but I can't find any documentation or example of how to interface EZ-USB FX3 to another processor. All the examples are talking about FPGA. The scenario I have in mind is this:
A USB webcam is connected to FX3. FX3 controls the webcam and streams the video over GPIF II to another processor which does something with the stream
Show LessCannot generate ttyUSB0 after connecting CYUSB3KIT-003 to Ubuntu 22.04.
No driver shown in lsusb -t. brltty has been deleted.
I still can't generate ttyUSB0 after running make in cyusb_linux_1.0.5.
I can't run install.sh due to a possible problem with the version of qt4, but I don't think this should be the reason affecting the failure to install the driver? If anyone can help me I would greatly appreciate it!
Here is the lsusb -t
Port 1: Dev 11, If 0, Class=Vendor Specific Class, Driver=, 480M
Here is the dmesg
[ 1469.484254] usb 3-2.1: new high-speed USB device number 11 using xhci_hcd
[ 1469.778634] usb 3-2.1: New USB device found, idVendor=04b4, idProduct=00f1, bcdDevice= 0.00
[ 1469.778642] usb 3-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1469.778644] usb 3-2.1: Product: FX3
[ 1469.778646] usb 3-2.1: Manufacturer: Cypress
We are developing a USB UVC camera and are experiencing a strange issue where Wireshark shows there is UVC headers appended to data right before a freeze occurs on our HDMI monitor. I have included a portion of my DMA callback and header append function and I cannot see a way for the data to get through without having a header appended. Are there any KBAs or other reasons this may be happening? It is happening quite rarely, about once ever few hours of continuous playback. This is streaming 1080p60 uncompressed over USB 3. I have included a zip file which contains a Wireshark capture of the issue.
static void
CyFxUVCApplnMultiDmaCB (
CyU3PDmaMultiChannel *chHandle,
CyU3PDmaCbType_t type,
CyU3PDmaCBInput_t *input
)
{
CyU3PDmaBuffer_t dmaBuffer;
CyU3PReturnStatus_t apiRetStatus = CY_U3P_SUCCESS;
if (type == CY_U3P_DMA_CB_PROD_EVENT)
{
glUVCEventProd++;
apiRetStatus = CyU3PDmaMultiChannelGetBuffer(chHandle, &dmaBuffer, CYU3P_NO_WAIT);
while (apiRetStatus == CY_U3P_SUCCESS)
{
/* Add headers */
if (dmaBuffer.count == CY_FX_DMA_BUF_FULL_SIZE(glDMABufSize))
{
CyFxUVCApplnAddHeader(dmaBuffer.buffer - CY_FX_UVC_MAX_HEADER, CY_FX_UVC_HEADER_FRAME);
}
else
{
CyFxUVCApplnAddHeader(dmaBuffer.buffer - CY_FX_UVC_MAX_HEADER, CY_FX_UVC_HEADER_EOF);
}
/* Commit buffer to USB */
/* Buffer size is header + actual data length */
apiRetStatus = CyU3PDmaMultiChannelCommitBuffer(chHandle, (dmaBuffer.count + CY_FX_UVC_MAX_HEADER), 0);
if (apiRetStatus == CY_U3P_SUCCESS)
{
glOutBuffers++;
}
else
{
glDmaCommitErrorReason = apiRetStatus;
glUVCEventError++;
REQUEST_DMA_RESET(CY_FX_UVC_DMA_RESET_COMMIT_BUFFER_FAILURE);
break;
}
/* Check for more buffers */
apiRetStatus = CyU3PDmaMultiChannelGetBuffer(chHandle, &dmaBuffer, CYU3P_NO_WAIT);
}
}
else if (type == CY_U3P_DMA_CB_CONS_EVENT)
{
glUVCEventCons++;
if (glOutBuffers > 0)
glOutBuffers--;
glStreamingStarted = CyTrue;
glCommitBufferFailureCount = 0;
}
}
static void
CyFxUVCApplnAddHeader (
uint8_t *buffer_p, /* Buffer pointer */
uint8_t frameInd /* EOF or normal frame indication */
)
{
/* Copy header to buffer */
CyU3PMemCopy(buffer_p, (uint8_t *)glUVCHeader, CY_FX_UVC_MAX_HEADER);
if (frameInd == CY_FX_UVC_HEADER_EOF)
{
glUVCHeader[1] ^= CY_FX_UVC_HEADER_FRAME_ID;
buffer_p[1] |= CY_FX_UVC_HEADER_EOF;
}
}
Show Less
Hi Everyone,
I am facing an issue on interfacing full hd sensor with CX3. I've taken the necessary constraints from directly from our Sensor Vendor. I must note that i am using our custom design board
Solution for FIFO delay value was to use slower CSI Clock/less data lanes/faster output pixel clock but;
CSI Clock: Exact value given by Sensor Vendor -> i believe i cant change
Data Lanes: Camera has 4 Data Lanes connected to it's Serializer. My matching Deserializer daughter board has 2 lanes connected to CX3. -> Already reduced to 2 data lanes from 4.
Output Pixel Clock: Even though sensor is capable of streaming 30 fps, i had to reduce FPS option to 26.8 which was the exact value i've calculated to generate 100 MHz output pixel clock -> can not be exceeded.
Is it okay to reduce CSI Clock as my favor?(Min value was calculated as 266MHz by configurator)
Show Less
Hi
How can i adjust mipi timing delay for Clock or Data Lane?
hi,
如标题所示。
当前我尝试将flagB逻辑中强制置1,发现外部输入的flagA和flagB都能正常变化,什么情况导致标题中flag状态异常的情况呢?
As in the title, I would like to ask two questions about the use of FX3:
1. In F1F mode, after successfully burning, WIN10 cannot recognize the device. After the flash is successful, WIN10 also cannot recognize the device, so now my board can only be booted using USB, and the flash to RAM works properly. What is the reason for this, it is no longer usable under EEPROM and SPI. Is there any way to rescue it?
2. It can be used normally under WIN10, but in PYTHON programming, when running to dev_handle.set_configuration (), it is prompted that Operation is not supported or unsupported on this platform. After I use ZADIG to replace the driver, it can run in PYTHON, but the usage is abnormal in WIN10. What is this The reason!! How to solve it???
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/%E8%B6%85%E9%AB%98%E9%80%9FUSB%E5%A4%96%E8%AE%BE/%E5%92%A8%E8%AF%A2FX3%E7%9A%84%E4%B8%A4%E4%B8%AA%E4%BD%BF%E7%94%A8%E9%97%AE%E9%A2%98/td-p/679867
Show LessI am trying to develop USB 2 functionality for a UVC camera but am having difficulty with USB 2 enumeration. When we plug in our device to a USB 2 port, USB 3 port with a USB 3 cable or a USB 2 hub, we are seeing a Windows error saying that the device could not be recognized and USBTreeView reports that enumeration failed with error code 43. I have inserted logs to the enumeration/plug-in process and this is the USB 2 error case (the value in parentheses is the event data):
UsbEventCB: CY_U3P_USB_EVENT_VBUS_VALID (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SUSPEND (0x0)
UsbEventCB: CY_U3P_USB_EVENT_CONNECT (0x0)
UsbEventCB: CY_U3P_USB_EVENT_RESET (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SPEED (0x1)
UsbEventCB: CY_U3P_USB_EVENT_RESET (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SPEED (0x1)
UsbEventCB: CY_U3P_USB_EVENT_RESET (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SPEED (0x1)
UsbEventCB: CY_U3P_USB_EVENT_RESET (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SPEED (0x1)
UsbEventCB: CY_U3P_USB_EVENT_SUSPEND (0x0)
We are able to get USB 3 to work and sometimes USB 2 works. The USB 3 logs are below:
UsbEventCB: CY_U3P_USB_EVENT_VBUS_VALID (0x0)
UsbEventCB: CY_U3P_USB_EVENT_CONNECT (0x1)
UsbEventCB: CY_U3P_USB_EVENT_SET_SEL (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SETCONF (0x1)
And the working USB 2 case:
UsbEventCB: CY_U3P_USB_EVENT_VBUS_VALID (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SUSPEND (0x0)
UsbEventCB: CY_U3P_USB_EVENT_CONNECT (0x0)
UsbEventCB: CY_U3P_USB_EVENT_RESET (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SPEED (0x1)
UsbEventCB: CY_U3P_USB_EVENT_RESUME (0x0)
UsbEventCB: CY_U3P_USB_EVENT_SETCONF (0x1)
Show Less
Hi, I am working on a USB based data acquisition device with 8 analog channels and 2 digital edge or frequency counters. I have configured 1 endpoint as bulk in 512 bytes for 8 analog channels with auto in (its working flawless). And another bulk in endpoint for digital edge or frequency counter i set this as bulk in 512 bytes auto in and AUTOINLEN is set to 20Bytes as payload is small. Bothe endpoints work flawlessly when not acquired simultaneously in 2 separate threads. However, when i create two independant threads, they seems to cross talk sometimes as one thread is running fast (digital edge counter) while other thread ia running slower due to some data processing overhead. I have given priority to analog data endpoint in fpga (if flagd and flagc is high, give priority to flagd. If flagd is low and flagc is high transfer edge count data). I woud like to know what is the best method for using 2 endpoints simultaneously. Am i doing something wrong? Also, i see flagc going high for 20 bytes and then going down and then again going high for 512 bytes. Is it normal or it should only go high for 20 bytes or equal to whats requested in Autolen Registers.
Show Less