Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Not applicable

Assuming I have a 1920x1080 camera sensor connected to CX3, could it be possible to have a 1920x1081 UVC video streaming interface reported to PC by creating a faked line in start of every video frame in CX3 firmware?

Apart from modifying VS Frame Descriptor, what else should I do in CX3 firmware to make it work? Many thanks!

const uint8_t CyCx3USBSSConfigDscr[] =



    /* Class specific Uncompressed VS Frame Descriptor 1 - 1080p@30fps */

    0x1E,                               /* Descriptor size */

    CX3_CS_INTRFC_DESCR,                /* Descriptor type*/

    0x05,                               /* Subtype: Uncompressed frame interface*/

    0x01,                               /* Frame Descriptor Index: 1 */

    0x00,                               /* No Still image capture supported */

    0x80, 0x07,                         /* Width in pixel:  1920 */

    0x38, 0x39, 0x04,                         /* Height in pixel: 1080 1081 */

    0x00, 0x80, 0x53, 0x90, 0x61, 0x3B,             /* Min bit rate (bits/s): 1080 1081 x 1920 x 2 x 30 x 8 = 995328000 996249600*/

    0x00, 0x80, 0x53, 0x90, 0x61, 0x3B,             /* Max bit rate (bits/s): Fixed rate so same as Min */

    0x00, 0x48, 0x57, 0x3F, 0x00,             /* Maximum video or still frame size in bytes(Deprecated): 1920 x 1080 1081 x 2 */

    0x15, 0x16, 0x05, 0x00,             /* Default frame interval (in 100ns units): (1/30)x10^7 */

    0x01,                               /* Frame interval type : No of discrete intervals */

    0x15, 0x16, 0x05, 0x00,             /* Frame interval 3: Same as Default frame interval */



1 Solution


Yes, you have to adjust the DMA Buffer size that meets your requirement - dmaBuffer.size > dmaBuffer.count + sizeof (fake_line). This is the only working case for you.

In other case ( dmaBuffer.size < dmaBuffer.count + sizeof (fake_line)), buffer over flow occurs. Therefore, avoid this case.

And in dmaBuffer.size = dmaBuffer.count + sizeof (fake_line) case, the host does not know when the frame ends for particular resolutions.

Becasue host expects a partial packet (less than 1024 bytes) to know that the transfer has ended. If the total frame including the fake line is exactly multiple of 1024, the host does not know the end of transfer. Hence, avoid this case too.

View solution in original post

8 Replies