Did I loss something when I setting the uvc 1080p descriptors based on AN75779?

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

cross mob
TaLe_3708091
Level 1
Level 1
First like received

  I have changed the firmware provided in AN75779.zip  to meet the requirement with the following features:

1.32-bit synchronous parallel data interface

2.16 bits per pixel

3.YUY2 color space

4.1920*1080 pixel resolution

5.45 frames per second

6.Active high frame, line valid signals.

For 32-bit synchronous parallel data interface, I go to the interface definition tab in GPIF II Designer and choose 32bit option, and change the counter limit value of LD_DATA_COUNT & LD_ADDR_COUNT to 4091. after that i update the cyfxgpif2config.h

I also make sure the iomatrix configuration in the firmware has the isDQ32Bit parameter set to CyTrue.

For 1920*1080 pixel resolution, I change some descriptions as follow

/* UVC Probe Control Settings for a USB 3.0 connection. */

uint8_t glProbeCtrl[CY_FX_UVC_MAX_PROBE_SETTING] = {

    0x00, 0x00,                 /* bmHint : no hit */

    0x01,                       /* Use 1st Video format index */

    0x01,                       /* Use 1st Video frame index */

    0x0E, 0x64, 0x03, 0x00,     /* Desired frame interval in the unit of 100ns: 45 fps */

    0x00, 0x00,                 /* Key frame rate in key frame/video frame units: only applicable

                                   to video streaming with adjustable compression parameters */

    0x00, 0x00,                 /* PFrame rate in PFrame / key frame units: only applicable to

                                   video streaming with adjustable compression parameters */

    0x00, 0x00,                 /* Compression quality control: only applicable to video streaming

                                   with adjustable compression parameters */

    0x00, 0x00,                 /* Window size for average bit rate: only applicable to video

                                   streaming with adjustable compression parameters */

    0x00, 0x00,                 /* Internal video streaming i/f latency in ms */

    0x00, 0x48, 0x3F, 0x00,     /* Max video frame size in bytes */

    0x00, 0x40, 0x00, 0x00,      /* No. of bytes device can rx in single payload = 16 KB */

const uint8_t CyFxUSBSSConfigDscr[] ={

.....

/* Class specific Uncompressed VS format descriptor */

    0x1B,                           /* Descriptor size */

    0x24,                           /* Class-specific VS I/f Type */

    0x04,                           /* Subtype : uncompressed format I/F */

    0x01,                           /* Format desciptor index */

    0x01,                           /* Number of frame descriptor followed */

    0x59,0x55,0x59,0x32,            /* GUID used to identify streaming-encoding format: YUY2  */

    0x00,0x00,0x10,0x00,

    0x80,0x00,0x00,0xAA,

    0x00,0x38,0x9B,0x71,

    0x10,                           /* Number of bits per pixel */

    0x01,                           /* Optimum Frame Index for this stream: 1 */

    0x10,                           /* X dimension of the picture aspect ratio; Non-interlaced */

    0x09,                           /* Y dimension of the pictuer aspect ratio: Non-interlaced */

    0x00,                           /* Interlace Flags: Progressive scanning, no interlace */

    0x00,                           /* duplication of the video stream restriction: 0 - no restriction */

/* Class specific Uncompressed VS frame descriptor */

    0x1E,                           /* Descriptor size */

    0x24,                           /* Descriptor type*/

    0x05,                           /* Subtype: uncompressed frame I/F */

    0x01,                           /* Frame Descriptor Index */

    0x01,                           /* Still image capture method 1 supported */

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

    0x38, 0x04,                     /* Height in pixel */

    0x00,0x80,0x53,0x3B,            /* Min bit rate bits/s. */

    0x00,0x80,0x53,0x3B,            /* Max bit rate bits/s. */

    0x00,0x48,0x3F,0x00,            /* Maximum video or still frame size in bytes(Deprecated)*/

    0x0E, 0x64, 0x03, 0x00,         /* 45fps */

    0x01,

    0x0E, 0x64, 0x03, 0x00,

    ....

}

I don't know why Image streaming is not working.

I hope someone colud help me, thank you.

Taeyoung Lee 님이 메시지를 편집했습니다.

1 Solution

Hello,

The statement CyU3PDeviceReset(CyFalse); was just used to check whether the control reaches SET_CUR under COMMIT_CTRL. That can be removed as we understood that the control is reaching there. But fps need not be changed, you can keep it at 45fps itself.

Please confirm that you are trying to stream a data format that is UVC compliant. This is because AMCap can understand only those data formats that are UVC compliant. Also, from your previous responses, I understood that you are not using an image sensor, instead you are generating a pattern using FPGA. Please let me know at what frame rate have you configured the FPGA to send out the frames.

Also, I can see a Clear Feature request being issued by the host. Is this because you are closing the host application in between streaming? If not, when does this occur?

For testing you can further do some changes inside the uvc.c source. The following changes are to be made. The changes can be found in the following snippets.

1. Initialize the following variables (g1tempfmsize, g1fmsize, fmflag);

pastedImage_0.png

2. Inside the PROD_EVENT in DMA Call back, add the modifications as shown below:

pastedImage_1.png

3. Under DEBUG_PRINT_FRAME_COUNT, do the following changes

pastedImage_0.png

After doing the above changes, please share the UART logs.

Best Regards,​

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
17 Replies