Issue about half rate frame rate from CYUSB3065

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

cross mob
yopa_4625391
Level 1
Level 1

Dear.

We are now on USB Camera development with usb 3.0 cable .

It was happy because the camera shows image.

But unfortunately, we got  an frame rate issue.

As we think, we set correct frame rate (1920x1080x 30fps).

But it shows 15 fps.

We are trying to solve it. But it's not changed.

Is there anyone who get such kind of issue?

It will be very greatful to inform to us the experiance.

Thankyou for your reading.

/* UVC Probe Control Settings */
uint8_t glProbeCtrl[CX3_UVC_MAX_PROBE_SETTING] = {
    0x00, 0x00,                         /* bmHint : No fixed parameters */
    0x01,                               /* Use 1st Video format index */
    0x01,                               /* Use 1st Video frame index */
    0x0A, 0x8B, 0x02, 0x00,             /* Desired frame interval in 100ns */
    0x00, 0x00,                         /* Key frame rate in key frame/video frame units */
    0x00, 0x00,                         /* PFrame rate in PFrame / key frame units */
    0x00, 0x00,                         /* Compression quality control */
    0x00, 0x00,                         /* Window size for average bit rate */
    0x00, 0x00,                         /* Internal video streaming i/f latency in ms */
    0x00, 0x48, 0x3F, 0x00,             /* Max video frame size in bytes */
#ifdef CX3_UVC_1_0_SUPPORT
    0x00, 0x90, 0x00, 0x00              /* No. of bytes device can rx in single payload: 32KB */
#else
    /* UVC 1.1 Probe Control has additional fields from UVC 1.0 */
    0x00, 0x90, 0x00, 0x00,             /* No. of bytes device can rx in single payload: 32KB */
    0x00, 0x60, 0xE3, 0x16,             /* Device Clock */
    0x00,                               /* Framing Information - Ignored for uncompressed format*/
    0x00,                               /* Preferred payload format version */
    0x00,                               /* Minimum payload format version */
   0x00                                /* Maximum payload format version */
#endif
};

/* UVC Probe Control Setting - Resolution0*/
uint8_t const glResolution0ProbeCtrl[CX3_UVC_MAX_PROBE_SETTING] = {
    0x00, 0x00,                         /* bmHint : No fixed parameters */
    0x01,                               /* Use 1st Video format index */
    0x01,                               /* Use 1st Video frame index */
    0x15,0x16,0x05,0x00,             /* Desired frame interval in 100ns = (1/30)x10^7 */
    0x00, 0x00,                         /* Key frame rate in key frame/video frame units */
    0x00, 0x00,                         /* PFrame rate in PFrame / key frame units */
    0x00, 0x00,                         /* Compression quality control */
    0x00, 0x00,                         /* Window size for average bit rate */
    0x00, 0x00,                         /* Internal video streaming i/f latency in ms */
    0x00,0x48,0x3f,0x00,             /* Max video frame size in bytes = 1920 x 1080 x 2 */

0 Likes
1 Solution

Hello,

The CX3 configuration utility settings seems fine. But the clock frequency you mentioned before (148.5 MHz- previous post) and the the one in CX3 configuration utility tool(300 MHz) is different.

Please confirm the CSI clock frequency coming to CX3.

Also share the debug prints by enabling CX3_DEBUG_ENABLED macro to know if there are any MIPI errors. Without the VSYNC and HSYNC traces it is hard for us to know the problem. If the data from the sensor isn't proper (as per the MIPI configuration) there can be a drop in frame rate. Or if the V_blanking period is too less so that the frame end is being missed can also be a reason. Please let me know if any free GPIO's are there on the PCB

Regards,

Rashi

Regards,
Rashi

View solution in original post

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

Hello,

Please refer to this thread the output frame rate of cx3 

If you are using the latest CX3 state machine available with SDK 1.3.4, then the minimum vertical blanking required is around 200uS.

If you are using the state machine available with SDK 1.3.3, then the minimum vertical blanking needed is around 500uS.

Also share CX3 Configuration tool settings and debug prints. Are you using the default firmware generated by the configuration tool.

To check the data coming from sensor is proper probe the PCLK, FV and LV lines and share the traces.

Regards,

Rashi

Regards,
Rashi
0 Likes

Dear RashiV_61

Thankyou for your advice.

We overlooked your comment in our datasheet and understand that.

But our camera use MIPI interface and additionally there is no words about V blank.

Currently we use V-blanking but the meaning is slightly different with what you mentioned.

We think we use pixel or line and we cannot acquire 500us vblank time.

Could you advice one more?

As we know, it's from CX3 because it should get a time to add UVC header and EOF header.

We want to know other method if we can avoid this issue.

----------------------------------------------------------------------Setting informaton ----------------------------------- -----------------------------------

Output Video Format :
YUV422 8BIT

Resolution 1920x1080p

DATA LANE : 4

CSI CLOCK : 148.5Mhz

H-Active : 1920 pixel

H-Blanking : 44 pixel

  • H-Blanking = H-SyncvWidth + H-FrontPorch +H-BackPorch = H-Total(2200) –H-Active(1920) = 280 pixel

V-Active : 1080 line

V-blanking : 5 line

  • V-Blanking = V-SyncvWidth + V-FrontPorch +V-BackPorch = V-Total(1125) –V-Active(1080) = 45 pixel

Frame Rate : 30

----------------------------------- ----------------------------------- ----------------------------------- ----------------------------------- ----------------------------

Best Regards

0 Likes

Hello,

Please let me know the GPIF bus width that you are using.

Also, can you share the traces FV, LV, PCLK to check whether the input to CX3 is fine. Have you made any changes to default firmware?

We think we use pixel or line and we cannot acquire 500us vblank time.

>> I didn't understand.Can you please restate. As per my understanding V_blanking time can be calculated from trace of V_SYNC. Please refer to Q10 of this KBA CX3 Hardware: Frequently Asked Questions - KBA91295 

Can you share the debug prints and the snippet of CX3 Configuration tool utility so that i can check them. Please enable CX3_DEBUG_ENABLED macro to get the logs for mipi errors and share them.

Regards,

Rashi

Regards,
Rashi
0 Likes

Dear RashiV_61

Sorry for late reply.

As we said, we use MIPI line and unfortunately we didn't make test pin for that.

We assigned bellows and we think there is no additonal room for vblank.

--------ISP Setting -------------

"hActive": 1920, (pixel)
"hFrontPorch": 87,
"hBackPorch": 149,
"hSyncWidth": 44,
"hTotal": 2200,
"pixelClock": 74250000,  (Hz)
"vActive": 1080, (line)
"vFrontPorch": 4,
"vBackPorch": 36,
"vSyncWidth": 5,
"vTotal": 1125

--------CX Setting -------------

pastedImage_1.png

  Thank you for your help 

0 Likes

Hello,

The CX3 configuration utility settings seems fine. But the clock frequency you mentioned before (148.5 MHz- previous post) and the the one in CX3 configuration utility tool(300 MHz) is different.

Please confirm the CSI clock frequency coming to CX3.

Also share the debug prints by enabling CX3_DEBUG_ENABLED macro to know if there are any MIPI errors. Without the VSYNC and HSYNC traces it is hard for us to know the problem. If the data from the sensor isn't proper (as per the MIPI configuration) there can be a drop in frame rate. Or if the V_blanking period is too less so that the frame end is being missed can also be a reason. Please let me know if any free GPIO's are there on the PCB

Regards,

Rashi

Regards,
Rashi
0 Likes

Dear RashiV_61

Hi, thankyou for your kind and expert explanation.

Today we solved it by changing V_blanking period.

In the case of timing, our camera use Maxim's MIPI to LVDS IC.

So the clock is different.

Anyway we are very appreciate for your advice.

Thankyou.

0 Likes