CX3 CB failure in high speed mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
BeCh_1049336
Level 1
Level 1
10 replies posted 5 replies posted 5 sign-ins

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.

BeCh_1049336_0-1613611264139.png

 

But, when I used high speed mode to get images, I got "CB failure" with these logs.

BeCh_1049336_1-1613612009324.png

And sometimes, I got the frame info as below.

BeCh_1049336_2-1613612396449.png

 

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

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

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

Regards,
Rashi

View solution in original post

0 Likes
10 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

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.

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

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

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

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.

Regards,
Rashi
0 Likes

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?

0 Likes

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.

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

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?

 

0 Likes

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.

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

Thanks for your reply.

Logs and firmware are attached.

I'm not sure the configures of 42KB is correct or not, because if I changed "CX3_UVC_DATA_BUF_SIZE" to (0xA800), I can't get image in super speed mode.

Best Regards,

Bert

0 Likes
lock attach
Attachments are accessible only for community members.

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

Regards,
Rashi
0 Likes

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.

Regards,
Rashi
0 Likes