This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DS90UB954-Q1: Pattern Generation random wrong picture

Part Number: DS90UB954-Q1

Dear expert,

Customer send pattern from UB954 to SoC and check image quality inside SoC.

Randomly, they find some different image (1/100 chance) as below picture.

(Wrong image has small blue rectangle at left/up side)

The problem happen at multiple board.

When UB954 get camera video data from UB953, we didn't notice this problem.

I suppose pattern should send exactly the same data from every frame, right?

Below different image mean there is problem for UB954 CSI interface?

But why the bad image keeps the same? This is very hard to explain if it is due to some hardware issue.

Below is the code for UB954 patgen:

WriteI2C(0x33,0x01) # CSI0 enable

WriteI2C(0xB0,0x00) # Indirect Pattern Gen Registers

WriteI2C(0xB1,0x01) # PGEN_CTL

WriteI2C(0xB2,0x01)

WriteI2C(0xB1,0x02) # PGEN_CFG

WriteI2C(0xB2,0x33)

WriteI2C(0xB1,0x03) # PGEN_CSI_DI

WriteI2C(0xB2,0x24)

WriteI2C(0xB1,0x04) # PGEN_LINE_SIZE1

WriteI2C(0xB2,0x0F)

WriteI2C(0xB1,0x05) # PGEN_LINE_SIZE0

WriteI2C(0xB2,0x00)

WriteI2C(0xB1,0x06) # PGEN_BAR_SIZE1

WriteI2C(0xB2,0x01)

WriteI2C(0xB1,0x07) # PGEN_BAR_SIZE0

WriteI2C(0xB2,0xE0)

WriteI2C(0xB1,0x08) # PGEN_ACT_LPF1

WriteI2C(0xB2,0x02)

WriteI2C(0xB1,0x09) # PGEN_ACT_LPF0

WriteI2C(0xB2,0xD0)

WriteI2C(0xB1,0x0A) # PGEN_TOT_LPF1

WriteI2C(0xB2,0x04)

WriteI2C(0xB1,0x0B) # PGEN_TOT_LPF0

WriteI2C(0xB2,0x1A)

WriteI2C(0xB1,0x0C) # PGEN_LINE_PD1

WriteI2C(0xB2,0x0C)

WriteI2C(0xB1,0x0D) # PGEN_LINE_PD0

WriteI2C(0xB2,0x67)

WriteI2C(0xB1,0x0E) # PGEN_VBP

WriteI2C(0xB2,0x21)

WriteI2C(0xB1,0x0F) # PGEN_VFP

WriteI2C(0xB2,0x0A)

  • Hey Ryan,

    Can please complete the table below? Once you provide the settings we can double check the patgen is set to optimal condition. 

    PATGEN Output   
       
    Horizontal Resolution
    Vertical Resolution
    Vertical Front Porch
    Vertical Back Porch
    Vertical Sync 
    Frame Rate (FPS)
    FPD FC Rate (Gbps)

    Glenn 

  • Glenn,

    Do you mean below setting for Patgen? It's in above code. I pick them from above code to below table as below:

    Horizontal Resolution 3840
    Vertical Resolution 720
    Vertical Front Porch 10
    Vertical Back Porch 33
    Vertical Sync: My system is 2 but I didn't find where to configure Vertical Sync for PATGEN
    Frame Rate (FPS) My system is 30FPS, but I didn't find where to configure FPS for PATGEN
    FPD FC Rate (Gbps) REFCLK = 25 MHz, line rate = 4.0 Gbps,

    And the camera video from UB953 has the same parameter as above table and it shows no problem.

  • Hi Ryan,

    Thaks for the information but I want to confirm the resolution that is expected.

    According to the registers provided the video format is RGB888 at a 4Gbps FC, the output of the patgen is as follows:

    PATGEN Output   
       
    Horizontal Resolution 1280
    Vertical  Resolution 720
    Total Vertical Blanking  330
    Vertical Front Porch 10
    Vertical Back Porch 33
    Vertical Sync  287
    Frame Rate 30

    For the settings you provided you need the following.

    PATGEN Output   
       
    Horizontal Resolution 3840
    Vertical  Resolution 720
    Total Vertical Blanking  45
    Vertical Front Porch 10
    Vertical Back Porch 33
    Vertical Sync  2
    Frame Rate 30
    FC Rate 4

    Address Value
    0x04 2D
    0x05 00
    0x08 02
    0x09 D0
    0x0A 02
    0x0B FD
    0x0C 11
    0x0D 05
    0x0E 21
    0x0F A
  • Glenn,

    I am a little confused. Where you get the resolution 1920*720@30FS from?

    I suppose pattern should send exactly the same data from every frame, right?

  • Hi Ryan,

    I am a little confused. Where you get the resolution 1920*720@30FS from?

    I got this from the registers you provided. 

    0x04 = 0x0F

    0x05= 00

    This comes out to 3840 in decimal. This is bytes so needs to be converted to pixels (note that RGB888 uses 24bpp)

    3840bytes *(8bits/1byte)*(1 pixel/ 24 bits) = 1280 pixels

    0x08 = 0x02

    0x09 = 0xD0

    This is 720. 

    The resolution is 1280x720.

    0x0A = 0x04

    0x0B = 0x1A

    PGEN_TOT__LPF = 1050

    0x0C = 0x0C

    0x0D = 0x67

    PTGEN Line Period = 3175.

    The equation to use is:

    3175=1/(Frame rate* 1050)* (4*1000000000)/40

    Frame rate = 30fps 

    I suppose pattern should send exactly the same data from every frame, right?

    Correct, the frame is the same. 

    Glenn 

  • Glenn,

    Now I understand. Great thanks