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-Q1EVM: tpg is not streaming

Part Number: DS90UB954-Q1EVM

I am using Nvidia Jetson Xavier to capture the TPG

but I am getting error err_intr_stat_ph_ecc_multi_bit_err

output package lack the ECC package

How to send ecc along with tpg packet

I have written the following register to find and getting mipi data 

i2cset -f -y c240000.i2c 0X0030 0x0033 0x01 also use 0x021 since i am using 2 lane mode

i2cset -f -y c240000.i2c 0X0030 0x00B0 0x00
i2cset -f -y c240000.i2c 0X0030 0x00B1 0x01
i2cset -f -y c240000.i2c 0X0030 0x00B2 0x01

i2cset -f -y c240000.i2c 0X0030 0x00B1 0x02
i2cset -f -y c240000.i2c 0X0030 0x00B2 0x33

i2cset -f -y c240000.i2c 0X0030 0x00B1 0x03
i2cset -f -y c240000.i2c 0X0030 0x00B2 0x2B

i2cset -f -y c240000.i2c 0X0030 0x00B1 0x04
i2cset -f -y c240000.i2c 0X0030 0x00B2 0x0F

i2cset -f -y c240000.i2c 0X0030 0x00B1 0x05
i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00

i2cset -f -y c240000.i2c 0X0030 0x00B1 0x06
i2cset -f -y c240000.i2c 0X0030 0x00B2 0x01

  • Hello Varum,

    are you trying to enable the Pattern generator on the 954 ?

  • Hi 

    Yes I am trying to generate pattern in 954 after sending the data in i2c to the respective registers i mentioned above I am getting mipi data(I checked it with a oscilloscope ) but I am unable to receive it.

    I am getting an error : err_intr_stat_ph_ecc_multi_bit_err

    I think the output package from the 954 lack the ECC package

    Kindly help me fix this issue.

  • Please send me the required resolution and data type and I will send you the script for that!

  • Hi ,

    CSI - 2 lane mode

    Format - RAW10

    mipi_clk - 720MHz

    Pixel_clk - 90MHz

    resolution 1080p 60fps

  • Hello Varun,

    board.WriteReg(0x33, 0x0x) ----> set to 0x03 for continous CSI CLK and to 0x01 for Non-continous CLK

    board.WriteReg(0xB0, 0x02)
    board.WriteReg(0xB1, 0x01)

    board.WriteReg(0xB2, 0x01)
    board.WriteReg(0xB2, 0x35)
    board.WriteReg(0xB2, 0x2B)
    board.WriteReg(0xB2, 0x09)
    board.WriteReg(0xB2, 0x60)
    board.WriteReg(0xB2, 0x01)
    board.WriteReg(0xB2, 0x2C)
    board.WriteReg(0xB2, 0x04)
    board.WriteReg(0xB2, 0x38)
    board.WriteReg(0xB2, 0x04)
    board.WriteReg(0xB2, 0x4E)
    board.WriteReg(0xB2, 0x05)
    board.WriteReg(0xB2, 0xE8)
    board.WriteReg(0xB2, 0x0A)
    board.WriteReg(0xB2, 0x0A)
    board.WriteReg(0xB2, 0xAA)
    board.WriteReg(0xB2, 0x33)
    board.WriteReg(0xB2, 0xF0)
    board.WriteReg(0xB2, 0x7F)
    board.WriteReg(0xB2, 0x55)
    board.WriteReg(0xB2, 0xCC)
    board.WriteReg(0xB2, 0x0F)
    board.WriteReg(0xB2, 0x80)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)

  • I tried setting this configuration

    i2cset -f -y c240000.i2c 0X0030 0x0033 0x21

    i2cset -f -y c240000.i2c 0X0030 0x00B0 0x00
    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x01
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x01

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x02
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x35

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x03
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x2B

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x04
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x09

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x05
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x60

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x06
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x01

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x07
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x2C

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x08
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x04

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x09
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x38

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x0A
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x04

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x0B
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x4E

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x0C
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x05

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x0D
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0xE8

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x0E
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x0A

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x0F
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x0A

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x10
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0xAA

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x11
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x33

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x12
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0xF0

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x13
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x7F

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x14
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x55

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x15
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0xCC

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x16
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x0F


    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x17
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x80


    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x18
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00


    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x19
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00


    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x1A
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x1B
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x1C
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x1D
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x1E
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x1F
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x00
    set -f -y c240000.i2c 0X0030 0x00B2 0x55

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x15
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0xCC

    i2cset -f -y c240000.i2c 0X0030 0x00B1 0x16
    i2cset -f -y c240000.i2c 0X0030 0x00B2 0x0F

    I tried capturing the mipi data in csi and my OS crashed

    The OS didn't crash for the previous configuration

  • Very good! thanks for the update.

  • After Using the Registers I tried to capture and Display but the OS  Crashed. I tried to flash OS and tried again but again the OS crashed

  • Why are you writing some extra lines after 0x1F ?

    please remove these and try again!

  • Does the Test pattern generation send Frame Start and Frame End during transmission?

  • Hi

    I finally got the Pattern for the Registers you gave Thank you.

    Please let me know does it only produce Single color. If there is a way to change color can you tell how to do it?

  • Hello Varum,

    the script I provided shall generate 8 different color bars. You need to double check your timing parameters to find why the colors look like this!

  • hi

    Okay Thank you I will check on it.

    Can you let me know what is the line length of the Register settings you gave?

    Please also confirm that the data is in RAW10 format.

  • Hello Varun,

    The script is for 1920 x 1080, RAW10 @ 60fps

  • hi ,

    I tried to fix the single color issue but I am unable to fix it.

    How to fix it ?

    What changes should I need make ?

  • Hello Varun,

    If you provide me with following details I can generate a new script for you which you could try!

    954 REFCLK,

    Horiz. Active,

    Vert. Active,

    Vert. Back Porch,

    Vert. Front Porch,

    Vert. Sync Width

  • Hi ,

    The 954 REFCLK is 25MHz

    I am attaching an image for the region layout.

    Please keep the vertical sync width the default value

  • Hello Varun,

    please try this script:

    board.WriteReg(0x33, 0x0x) ----> set to 0x03 for continous CSI CLK and to 0x01 for Non-continous CLK

    board.WriteReg(0xB0, 0x02)
    board.WriteReg(0xB1, 0x01)

    board.WriteReg(0xB2, 0x01)
    board.WriteReg(0xB2, 0x33)
    board.WriteReg(0xB2, 0x24)
    board.WriteReg(0xB2, 0x07)
    board.WriteReg(0xB2, 0x80)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0xF0)
    board.WriteReg(0xB2, 0x01)
    board.WriteReg(0xB2, 0xE0)
    board.WriteReg(0xB2, 0x02)
    board.WriteReg(0xB2, 0x0D)
    board.WriteReg(0xB2, 0x0C)
    board.WriteReg(0xB2, 0x67)
    board.WriteReg(0xB2, 0x21)
    board.WriteReg(0xB2, 0x0A)
    board.WriteReg(0xB2, 0xAA)
    board.WriteReg(0xB2, 0x33)
    board.WriteReg(0xB2, 0xF0)
    board.WriteReg(0xB2, 0x7F)
    board.WriteReg(0xB2, 0x55)
    board.WriteReg(0xB2, 0xCC)
    board.WriteReg(0xB2, 0x0F)
    board.WriteReg(0xB2, 0x80)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)
    board.WriteReg(0xB2, 0x00)

  • Hi ,

    These Are the Registers I used...

     0x33, 0x23,
     0xB0, 0x00,

     0xB1, 0x01,
     0xB2, 0x01,

     0xB1, 0x02,
     0xB2, 0x33,

     0xB1, 0x03,
     0xB2, 0x2B,

     0xB1, 0x04,
     0xB2, 0x07,

     0xB1, 0x05,
     0xB2, 0x80,

     0xB1, 0x06,
     0xB2, 0x00,

     0xB1, 0x07,
     0xB2, 0xF0,

     0xB1, 0x08,
     0xB2, 0x01,

     0xB1, 0x09,
     0xB2, 0xE0,

     0xB1, 0x0A,
     0xB2, 0x02,

     0xB1, 0x0B,
     0xB2, 0x0D,

     0xB1, 0x0C,
     0xB2, 0x0C,

     0xB1, 0x0D,
     0xB2, 0x67,

     0xB1, 0x0E,
     0xB2, 0x21,

     0xB1, 0x0F,
     0xB2, 0x0A,

     0xB1, 0x10,
     0xB2, 0xAA,

     0xB1, 0x11,
     0xB2, 0x33,

     0xB1, 0x12,
     0xB2, 0xF0,

     0xB1, 0x13,
     0xB2, 0x7F,

     0xB1, 0x14,
     0xB2, 0x55,

     0xB1, 0x15,
     0xB2, 0xCC,

     0xB1, 0x16,
     0xB2, 0x0F,

     0xB1, 0x17,
     0xB2, 0x80,

     0xB1, 0x18,
     0xB2, 0x00,

     0xB1, 0x19,
     0xB2, 0x00,

     0xB1, 0x1A,
     0xB2, 0x00,

     0xB1, 0x1B,
     0xB2, 0x00,

     0xB1, 0x1C,
     0xB2, 0x00,

     0xB1, 0x1D,
     0xB2, 0x00,

     0xB1, 0x1E,
     0xB2, 0x00,

     0xB1, 0x1F,
     0xB2, 0x00,

    The output pattern formed was like this

    Please also let me know if setting  0xB0 register to 0x02 for pattern generation is correct or should I set it as 0x00?

  • Hi   

    Can you also tell me what is the pixel format ?

    My code needs to Receive BGGR

  • Varun,

    This actually looks as expected. The colors you are getting are based on your ISP conversion from RAW to RGB and the reason that you have non-uniform distribution of bars is based on the block size and the number of bytes per pixel for RAW10. I provided an explanation in this other thread as to why the patterns look this way: https://e2e.ti.com/support/interface-group/interface/f/interface-forum/975823/ds90ub954-q1-how-to-set-pgen_colorx-registers-to-get-at-least-3-color-bar-in-rgb-by-raw12-format

    There is no concept of "BGGR" in this type of pattern as the serializer doesn't pack data in this way when generating patterns. The mode you are configuring is basically sending fixed bytes of the same value based on the configured block size for each bar. The 8 bars correspond to the CSI-2 reference pattern from the CSI-2 spec. 

    X bytes of 0xAA (high-frequency pattern, inverted), X bytes of 0x33 (mid-frequency pattern), X bytes of 0xF0 (low frequency
    pattern, inverted), X bytes of 0x7F (lone 0 pattern), X bytes of 0x55 (high-frequency pattern), X bytes
    of 0xCC (mid-frequency pattern, inverted), X bytes of 0x0F (low-frequency pattern), and Y bytes of 0x80 (long 1
    pattern).

    The "X" above is based on the block size so for RAW10 it would be 5 since RAW10 uses 5 bytes per 4 pixels. So set indirect register 0x02 = 0x35 instead of 0x33 above. 

    Best Regards,

    Casey