- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I saw there is a link for this discussionResolutions with multiple Frame rates in CX3 UVC-CDC ,
I try the suggested solution, and update the value " the length of Class-specific Video Streaming Input Header Descriptor and the total length of CyCx3USBSSConfigDscr"(
I assume the new length is original length+4 for both values in this solution setting). After apply this setting, in the device manager, system report the device cannot start with error code 10. Could someone give me a simple project files to check what I am missing for the multiple framerate setting?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I calculate it again. The legth is correct. I checked the descr file again and have found the root cause.
In frame descriptor, you need to set Max bits/s first then Min bits/s. For the frame intervals, you should set the smallest one in first order.
Change the desscriptor below
/* Class specific Uncompressed VS Frame Descriptor 1 - VGA */
0x22, /* Descriptor size */
CX3_CS_INTRFC_DESCR, /* Descriptor type*/
0x05, /* Subtype: frame interface*/
0x01, /* Frame Descriptor Index: 1 */
0x00, /* No Still image capture method supported */
0x80,0x02, /* Width in pixel: 640 */
0xe0,0x01, /* Height in pixel: 480 */
0x00,0x00,0x77,0x01, /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 49152000 */
0x00,0x00,0xee,0x02, /* Max bit rate (bits/s): Fixed rate so same as Min */
0x00,0x60,0x09,0x00, /* Maximum video or still frame size in bytes(Deprecated): 640 x 480 x 2 */
0x40,0x42,0x0f,0x00, /* Default frame interval (in 100ns units): (1/30)x10^7 */
0x02, /* Frame interval type : No of discrete intervals */
0x80,0x84,0x1e,0x00, /* 5 fps */
0x40,0x42,0x0f,0x00, /* Frame interval 3: Same as Default frame interval */
to
0x22, /* Descriptor size */
CX3_CS_INTRFC_DESCR, /* Descriptor type*/
0x05, /* Subtype: frame interface*/
0x01, /* Frame Descriptor Index: 1 */
0x00, /* No Still image capture method supported */
0x80,0x02, /* Width in pixel: 640 */
0xe0,0x01, /* Height in pixel: 480 */
0x00,0x00,0xee,0x02, /* Max bit rate (bits/s): Fixed rate so same as Min */
0x00,0x00,0x77,0x01, /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 49152000 */
0x00,0x60,0x09,0x00, /* Maximum video or still frame size in bytes(Deprecated): 640 x 480 x 2 */
0x40,0x42,0x0f,0x00, /* Default frame interval (in 100ns units): (1/30)x10^7 */
0x02, /* Frame interval type : No of discrete intervals */
0x40,0x42,0x0f,0x00, /* Frame interval 3: Same as Default frame interval */
0x80,0x84,0x1e,0x00, /* 5 fps */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may get something wrong in configuration desscriptor. Please share the descriptor file for checking.
- 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
The total length is incorrect. Re-calculate it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Thanks for your feedback. I have re-calculate the total length of descriptor. It is correct. And I use wireshark to capture USB traffic. The length of the descriptor is the same as I count( 0xD2 for USBHSConfDscr). You can observe wireshark packet No.8 to check,
And I observe that the last two byes(0x04 0x00) in wireshark are not the same as written in code.
Angus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I calculate it again. The legth is correct. I checked the descr file again and have found the root cause.
In frame descriptor, you need to set Max bits/s first then Min bits/s. For the frame intervals, you should set the smallest one in first order.
Change the desscriptor below
/* Class specific Uncompressed VS Frame Descriptor 1 - VGA */
0x22, /* Descriptor size */
CX3_CS_INTRFC_DESCR, /* Descriptor type*/
0x05, /* Subtype: frame interface*/
0x01, /* Frame Descriptor Index: 1 */
0x00, /* No Still image capture method supported */
0x80,0x02, /* Width in pixel: 640 */
0xe0,0x01, /* Height in pixel: 480 */
0x00,0x00,0x77,0x01, /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 49152000 */
0x00,0x00,0xee,0x02, /* Max bit rate (bits/s): Fixed rate so same as Min */
0x00,0x60,0x09,0x00, /* Maximum video or still frame size in bytes(Deprecated): 640 x 480 x 2 */
0x40,0x42,0x0f,0x00, /* Default frame interval (in 100ns units): (1/30)x10^7 */
0x02, /* Frame interval type : No of discrete intervals */
0x80,0x84,0x1e,0x00, /* 5 fps */
0x40,0x42,0x0f,0x00, /* Frame interval 3: Same as Default frame interval */
to
0x22, /* Descriptor size */
CX3_CS_INTRFC_DESCR, /* Descriptor type*/
0x05, /* Subtype: frame interface*/
0x01, /* Frame Descriptor Index: 1 */
0x00, /* No Still image capture method supported */
0x80,0x02, /* Width in pixel: 640 */
0xe0,0x01, /* Height in pixel: 480 */
0x00,0x00,0xee,0x02, /* Max bit rate (bits/s): Fixed rate so same as Min */
0x00,0x00,0x77,0x01, /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 49152000 */
0x00,0x60,0x09,0x00, /* Maximum video or still frame size in bytes(Deprecated): 640 x 480 x 2 */
0x40,0x42,0x0f,0x00, /* Default frame interval (in 100ns units): (1/30)x10^7 */
0x02, /* Frame interval type : No of discrete intervals */
0x40,0x42,0x0f,0x00, /* Frame interval 3: Same as Default frame interval */
0x80,0x84,0x1e,0x00, /* 5 fps */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. It's working now.
Angus