- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I'm having a CX3 device which is programmed to act as a UVC-CDC device(based on the sample code Cx3UvcOV5640_UVC_CDC).
The Stream is having some issue in USB 2.0 for some resolutions but it's working perfectly in USB 3.0.
Please find the observations when streaming in USB 2.0.
Resolution 640 * 180 @ 60fps is successfully streaming but the 960 *360 @15fps is having issue. Frame format used is RGB24.
When trying to stream "CB failure" occurs and CX3 tries to restart the stream repeatedly.
If the restart sequence is commented I get the following debug prints. Adequate data is not received in this case, the actual size should be ( 960 * 360 *3 = 1036800 B )
Prod = 20 Cons = 15 Prtl_Sz = 5952 Frm_Cnt = 28 Frm_Sz = 742272 B
Prod = 20 Cons = 15 Prtl_Sz = 5952 Frm_Cnt = 29 Frm_Sz = 742272 B
Prod = 20 Cons = 15 Prtl_Sz = 5952 Frm_Cnt = 30 Frm_Sz = 742272 B
The DMA configuration for CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE is
dmaCfg.size = CX3_UVC_STREAM_BUF_SIZE; // 0x8FD0 + 12 + 4
dmaCfg.count = CX3_UVC_STREAM_BUF_COUNT; // 3
dmaCfg.validSckCount = CX3_UVC_SOCKET_COUNT; // 2
the endpoint configuration is
endPointConfig.pcktSize = CX3_EP_BULK_HIGH_SPEED_PKT_SIZE; // 0x200
endPointConfig.burstLen = CX3_EP_BULK_HIGH_SPEED_BURST_LEN; // 1
Could you please help me on this.
Regards
Ajay
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue was that the sensor was sending data at a high data rate( Data in a quick burst)
So this was above the capability of USB 2.0 to capture.
Now sensor is updated so as to send 720 * 360 @ 15fps at an evenly distributed range.
With this configuration the streaming is working successfully.
Thanks for the support.
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please confirm whether you are receiving 960 * 360 *3 = 1036800 B in debug prints in USB 3.0 case.
Please probe HSYNC_test, VSYNC_test and PCLK pins in both USB 3.0 and USB 2.0 case for 960x360x3 bytes and find the difference between them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In USB 3.0 i'm receiving the 1036800 B print.
Also probing the V sync test signal for 960 * 360 @15 fps gives 15Hz for both USB 3.0 and 2.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the VSYNC_active and HSYNC_active duration are same in USB 3.0 and USB 2.0?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes.
For 15FPs the V sync is 15hz and the H sync is 27Khz in both USB 3.0 and USB 2.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please share the .C file and required header files for review.
- 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
>> When trying to stream "CB failure" occurs and CX3 tries to restart the stream repeatedly.
If the restart sequence is commented I get the following debug prints. Adequate data is not received in this case, the actual size should be ( 960 * 360 *3 = 1036800 B )
The .c file is fine.
It looks like the host is not able to stream the 960 * 360 * 3 at 15 fps. Hence, you are seeing commit buffer failurs. Can you please reduce the frame size to 10 (in USB 2.0 for debugging) and check?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried making it to 5 fps and the same issue persists.
In one or two prints i got the full frame size 1036800 B
Could you share a CX3 project that would ideally stream this data.
960 * 360 @15fps and format RGB24
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue was that the sensor was sending data at a high data rate( Data in a quick burst)
So this was above the capability of USB 2.0 to capture.
Now sensor is updated so as to send 720 * 360 @ 15fps at an evenly distributed range.
With this configuration the streaming is working successfully.
Thanks for the support.
Ajay