- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In cycx3_uvc.h, I comment the line "#define UVC_APPLICATION" so that I can use streamer to get data from the OV5640 imager.. In streamer the endpoint shows up as expected, but when I use USB control center to send the enable commands as described in the test procedure in cycx3_uvc.h, all I get is "error 997" when sending the vendor commands. Can you help me get it working?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please send zero length packet. Refer to the snapshot attached.
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Are you using the firmware from here FX3 / CX3 Firmware for Streaming RAW Image Data using Cypress Driver ?
What are number of bytes that you are sending, the direction of the transfer. Can you share the snapshot of control center while sending the vendor commands.
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi,
I was using a different project from the forums that achieved bulk transfer (instead of UVC) by commenting out a define in cycx3_uvc.h like this:
//define UVC_APPLICATION
However, I tried with the project you suggested (CX3 firmware for streaming raw image data) and I am getting the same result - error 997. Snapshots of USB control center and Streamer are shown below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi,
Thank you - that fixed the error 997.
Now it streams, but I get both successes and failures showing up in streamer. When I plug the USB cable through a 2.0 USB analyzer I get all successes (streaming is slowed down).
Any thoughts why failures at the higher speed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi,
Further investigation shows that failures appear in Streamer when using a USB 3.0 port, but NOT when using a USB 2.0 port. I also noticed that the failure rate tracks with the Streamer settings "Pkts per xfer" and "Xfers to Queue".
With USB 3.0, there are no failures when Pkts per xfer/Xfers to Que are set to 128/16, but failures start appearing when set to 128/32 and get worse with higher settings.
With USB 2.0 there are no failures on any Pkts/2Que setting.
What causes failures to occur with USB 3.0?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let me know the DMA buffer size, DMA buffer count and burst that you are using in the firmware.
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the buffer size from cycx3_uvc.h:
#define CX3_UVC_DATA_BUF_SIZE (0x6000) /* DMA Buffer Data Size Used: 24576 Bytes*/
#define CX3_UVC_PROD_HEADER (0) /* UVC DMA Buffer Header Size */
#define CX3_UVC_PROD_FOOTER (0) /* UVC DMA Buffer Footer Size */
I don't know where to find the dma buffer and count. Please advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It would be helpful if you share your firmware with us.
I have attached the snippets of the fields i am asking for. Please check with your firmware and share them.
The details i need is DMA buffer count (uvc.c), Burst length (endpoint) (uvc.c and dscr.c ( In Superspeed descriptors)).
Try increasing the burst length. Maximum is 15
For this you need to makes changes companion descriptor of BULK endpoint and also in the endpoint configuration (as in snippets)
/* Configure the video streaming endpoint. */
endPointConfig.enable = 1;
endPointConfig.epType = CY_U3P_USB_EP_BULK;
endPointConfig.pcktSize = CY_FX_EP_BULK_VIDEO_PKT_SIZE;
endPointConfig.isoPkts = 1;
endPointConfig.burstLen = 16;
endPointConfig.streams = 0;
apiRetStatus = CyU3PSetEpConfig (CY_FX_EP_BULK_VIDEO, &endPointConfig);
if (apiRetStatus != CY_U3P_SUCCESS)
{
/* Error Handling */
CyU3PDebugPrint (4, "USB Set Endpoint config failed, Error Code = %d\n", apiRetStatus);
CyFxAppErrorHandler (apiRetStatus);
}
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried increasing the burst length to 15 as you suggested and it did not fix the failures in streamer on one PC, but I ran it on a laptop and there were no failures. Consider the problem fixed. Note - you stated maxlen was 15 but the code has 16, which is correct?
endPointConfig.burstLen = 16;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for the update.
The burst length is max 15 for endpoint companion descriptor (counts 0 as first packet) . But the field endPointConfig.burstLen defined as Maximum burst length in packets. This needs to be specified as the number of packets per burst and not as "burst length - 1" as in the case of the Super Speed Companion descriptor. This is why it is defined as 16.
Regards,
Rashi
Rashi