- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I used CX3 to get image sensor with 328 x 744 x 2 (16bit) x 10 (fps) = 4.6MBps bandwidth.
For super speed mode, the result is correct and no image issue.
The correct frame info is as below.
But, when I used high speed mode to get images, I got "CB failure" with these logs.
And sometimes, I got the frame info as below.
The sensor settings are the same in super speed and high speed mode, I only changed the descriptors in super speed and high speed.
Attached the "cycx3_uvcdscr.c" as well, could you please help me figure out what root cause might be?
Thank you.
Bert
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Edited:
Hello,
Thank you for the details.
From the Wireshark traces, I didn't see the USB errors. Can you try streaming (36 KB) on some other Host PC and host application like MPC- HC / eCamView. You can try streaming as YUY2 format (change GUID in descriptor file) for the other application
Please let me know if SDK1.3.4 is used. Please check the build variable (snippet attached) of the project.
For 42 KB, I missed out one point
Please try this configuration
CX3_UVC_DATA_BUF_SIZE (0xA800)
CX3_UVC_STREAM_BUF_COUNT (2)
0x10, 0xA8, 0x00, 0x00, /* No. of bytes device can rx in single payload: 42KB + 16*/
In addition to my previous response, please try Configuring horizontal blanking of the image sensor as high as possible (to do this vertical blanking can be reduced thereby maintaining same frame rate). While doing this make sure that vertical blanking does not go below ~350 us.
Please try this and let me know the results
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
This KBA Invalid Sequence Error in Multi-Channel Commit Buf... - Cypress Developer Community mentions the reason for Commit buffer failure (0x47). This happens when host is slow to consume the DMA buffers.
The video bandwidth (4.6 MBps) could be streamed through USB high speed. Please confirm if the device is in USB High speed mode by printing the return value of CyU3PUsbGetSpeed API after CyU3PConnectState is called.
Please let me know which host application is used to view the video. Also, is the video seen with glitches or the it is black screen.
Please share the firmware ( sensor settings not needed) and share the complete UART debug prints for us to check.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
First of all, when I add CyU3PUsbGetSpeed() right after CyU3PConnectState(), the return speed is 0 (CY_U3P_NOT_CONNECTED), but delay 500 ticks after calling CyU3PConnectState(), the return speed is correct (2: CY_U3P_HIGH_SPEED).
I used Amcap to preview video, and the screen is black.
Attached files are the firmware and the log file for your reference.
Thank you.
Bert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
As AmCap is used for video streaming, please try changing the GUID to YUY2 format (default set by the MIPI configuration tool) for debugging purpose and let me know the results.
Also let me know if there are concurrent Control IN transfers being done (i.e. GET requests to extension unit /processing terminal/input terminal) while streaming through BULK IN.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The AmCap video is the same with previous result after changed to YUY2 format.
It's still black and CB failure issue still exist.
I think there is no other control concurrently, and I also disable extension unit to test.
Is there any different point between super / high speed I can try since it works well in super speed mode?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please let me know if the USB 3.0 streaming done with GUID as RGB on Amcap
Is there any different point between super / high speed I can try since it works well in super speed mode?
>> From the project shared I understand that project is created by the CX3 MIPI receiver tool. You have not done any changes to firmware other than descriptors file.
In the firmware shared I have notices that CyU3PDebugprint is called in DMA callback. Please do not use the CyU3PDebugprint in DMA callback. You can use global variables to check the status.
We can try increasing the DMA buffer size (CX3_UVC_DATA_BUF_SIZE) to 42 KB and decreasing CX3_UVC_STREAM_BUF_COUNT to 2
Also, in probe control structure change the RX payload to 42KB from 36 KB
Increasing the DMA buffer size will help in reducing the speed difference between sensor and host. Please test this with extension unit disabled.
If this doesn't work, please share the USB traces using Wireshark when the issue is seen.
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
>Please let me know if the USB 3.0 streaming done with GUID as RGB on Amcap
>>Bert: Yes, I can see the video on AmCap with RGB565 GUID with USB3.0.
I tried to modify the buffer size, payload size as your instruction, but the issue is existing.
Now, I logged the FW initial sequences of both super speed and high speed, and see some differences (attached PNG file).
One big difference is it doesn't run into CyCx3UvcAppUSBSetupCB() to call CyU3PUsbAckSetup() in high speed mode (No "StpCB:In SET_FTR 0::1" logged).
Is it related to host driver, hardware or firmware?
Will it be a root cause of "CB failure"?
If yes, could you kindly provide any suggestion to solve this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The problem doesn't seem to be with the CyCx3UvcAppUSBSetupCB as checked the function with the default firmware and the streaming works fine with default project.
>> Please share the Wireshark USB traces (.pcap) when the streaming is started to understand the issue.
>> Please share the USB traces and UART traces for both configuration: Buffer size: 36 KB and 42KB along with the firmware for us to check.
Rashi
- 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
Edited:
Hello,
Thank you for the details.
From the Wireshark traces, I didn't see the USB errors. Can you try streaming (36 KB) on some other Host PC and host application like MPC- HC / eCamView. You can try streaming as YUY2 format (change GUID in descriptor file) for the other application
Please let me know if SDK1.3.4 is used. Please check the build variable (snippet attached) of the project.
For 42 KB, I missed out one point
Please try this configuration
CX3_UVC_DATA_BUF_SIZE (0xA800)
CX3_UVC_STREAM_BUF_COUNT (2)
0x10, 0xA8, 0x00, 0x00, /* No. of bytes device can rx in single payload: 42KB + 16*/
In addition to my previous response, please try Configuring horizontal blanking of the image sensor as high as possible (to do this vertical blanking can be reduced thereby maintaining same frame rate). While doing this make sure that vertical blanking does not go below ~350 us.
Please try this and let me know the results
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
In addition to my previous response, please try Configuring horizontal blanking of the image sensor as high as possible (to do this vertical blanking can be reduced thereby maintaining same frame rate). While doing this make sure that vertical blanking does not go below ~350 us.
Rashi