USB superspeed peripherals Forum Discussions
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 LessThe GPIF2 user guide, has the following description for the COMMIT action:
The COMMIT action commits the data packet / buffer on the selected Ingress DMA channel. This action is typically used to force “buffer / packet end” using state machine. For committing short buffers, this action should be used along with the IN_DATA action. If the buffer is partially filled and the COMMIT action is performed without IN_DATA action, a zero length buffer will be committed in addition to the partially filled buffer.
It mentions what happens when the COMMIT action is performed when the current thread's buffer is only partially filled. However, it is not immediately clear what happens when the COMMIT action is performed WITH an IN_DATA action where the IN_DATA action will fill the buffer. Can I get a clarification on what happens in this scenario?
In this scenario, does the COMMIT action do anything since the IN_DATA action will completely fill a buffer and that should automatically commit the filled buffer to the consumer socket?
In this scenario, does the COMMIT action additionally commit a ZLP after the filled buffer is committed to the consumer socket?
Furthermore, what does COMMIT action do if the current buffer is empty (i.e. no IN_DATA action was done beforehand)? Does it commit a ZLP to the consumer socket?
Thanks
Show LessWhat is the behavior of the ARM926EJ-S core when a division by zero or an underflow/overflow occurs during arithmetic operations. I know some architectures have defined behavior or can be configured to trigger an interrupt in response to one of these arithmetic exceptions. Does this processor have any such capabilities to detect one of these conditions at runtime?
Hello,
I'm having an image sensor that supports up to 3840x2160 resolution ,in both super and high speeds.
I could able to get all still captures in super speed . But when I try to get still capture of higher resolution(3840x2160) , while streaming lower resolutions (640x480,1280x720,1920x1080) in high speed ,the still request got triggered and it is shifting from one resolution to another resolution ,but it can't able to get still capture .
I observed the following while debugging :
1. That the buffer is not getting filled , while taking the still of higher resolution from lower resolutions .
2. The start of frame and end of frame getting changed .
the following is the log when still capture happened.
the following is the logs for not getting still capture.
3. After still triggered the video is restreaming without showing fps .
What could be the reason that I can't able to get the still in this particular case?
Thanks in advance for the help.
Regards,
StarDust.
Show Less