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: test pattern generation

Part Number: DS90UB954-Q1

Hi all, I am using 954 and 953 as serdes to run sony sensor on jetson xavier.

I try to have tpg on both 953 and 954. If I have tpg, there will be color bar appear. But when I used the same setting as 953, to have tpg using 954, there is no color bar, just frozen video.

Does anyone have clues about this issue?

This is my test script

#!/bin/sh
i2cset -y -f 2 0x30 0xb0 0x00


i2cset -y -f 2 0x30 0xb1 0x02
i2cset -y -f 2 0x30 0xb2 0x33 # 8 bars

i2cset -y -f 2 0x30 0xb1 0x03
i2cset -y -f 2 0x30 0xb2 0x2c # raw12

i2cset -y -f 2 0x30 0xb1 0x04
i2cset -y -f 2 0x30 0xb2 0x0b

i2cset -y -f 2 0x30 0xb1 0x05
i2cset -y -f 2 0x30 0xb2 0x58 # 1936*1.5=2904(0x0b58)

i2cset -y -f 2 0x30 0xb1 0x06
i2cset -y -f 2 0x30 0xb2 0x01

i2cset -y -f 2 0x30 0xb1 0x07
i2cset -y -f 2 0x30 0xb2 0x6b # 2904/8=363(0x016b)

i2cset -y -f 2 0x30 0xb1 0x08
i2cset -y -f 2 0x30 0xb2 0x04

i2cset -y -f 2 0x30 0xb1 0x09
i2cset -y -f 2 0x30 0xb2 0x4c # 1100

i2cset -y -f 2 0x30 0xb1 0x0a
i2cset -y -f 2 0x30 0xb2 0x04

i2cset -y -f 2 0x30 0xb1 0x0b
i2cset -y -f 2 0x30 0xb2 0x65 # 1125

i2cset -y -f 2 0x30 0xb1 0x0c
i2cset -y -f 2 0x30 0xb2 0x0b

i2cset -y -f 2 0x30 0xb1 0x0d
i2cset -y -f 2 0x30 0xb2 0x92 # 100M/30fps/1125

i2cset -y -f 2 0x30 0xb1 0x0e
i2cset -y -f 2 0x30 0xb2 0x0c

i2cset -y -f 2 0x30 0xb1 0x0f
i2cset -y -f 2 0x30 0xb2 0x0b # 0x0c + 0x0b + 0x02 = 25

i2cset -y -f 2 0x30 0xb1 0x01
i2cset -y -f 2 0x30 0xb2 0x01

  • Hello,

    Did you establish lock and enable the CSI port/forwarding on the 954 side? When patgen is used on the 953, the 954 assumes it's simply CSI data. You'll need to enable CSI transmitter on the 954.

    Best,

    Jiashow

  • Hi Jiashow, thank you for your quick reply.

    You mean if I want to enable 954/953 tpg, I need to modify 0x20 of 954 to 0x30, if I enable tpg during normal video streaming?

    So I should add write(954, 0x20->0x30), write(954, 0x1f->0x00), write(954, 0x33->0x03) at the beginning of my script, or the end?

  • Hi Linhan,

    Reg 0x20 should be 0x00 to enable forwarding. You can add the CSI configuration registers at the end of the script.

    Also make sure you are initializing the link as well.

    Best,

    Jiashow

  • Hi Jiashow, thanks for the reply.

    I modified my code according to your advise. Like 953, it can enable test pattern generation of 954, but also only one frame, then it reported error. Error suggests: Frame ID of FE packet mismatches ID of FS packet.FS frame ID will be used to generate errored FE.

    The sensor I'm using has mode of :raw12, active resolution 1936*1100, total line 1125. I'm not sure which part causes this error.

    Best

  • Hi Linhan,

    I generated a list of registers to program into the 953 based on your requirement. RAW12, 1936*1100, 30fps:

    This is in the indirect PatGen page:

    Register Data Name
    0x01 0x01 PGEN_CTL
    0x02 0x33 PGEN_CFG
    0x03 0x2C PGEN_CSI_DI
    0x04 0x0B PGEN_LINE_SIZE1
    0x05 0x58 PGEN_LINE_SIZE0
    0x06 0x01 PGEN_BAR_SIZE1
    0x07 0x6B PGEN_BAR_SIZE0
    0x08 0x04 PGEN_ACT_LPF1
    0x09 0x4C PGEN_ACT_LPF0
    0x0A 0x04 PGEN_TOT_LPF1
    0x0B 0xC9 PGEN_TOT_LPF0
    0x0C 0x0A PGEN_LINE_PD1
    0x0D 0xA1 PGEN_LINE_PD0
    0x0E 0x64 PGEN_VBP
    0x0F 0x17 PGEN_VFP

    Best,

    Jiashow

  • Thanks Jiashow, I have one question, how to determine the PGEN_VBP and PGEN_VFP?

  • Hi Linhan,

    VBP and VFP are your vertical back porch and front porch values. You can change it based on your total reolsution.

    Best,

    Jiashow

  • Hi Jiashow, for the info I got from the example script,

    VBP + VFP + FS + FE + active area line number = total line number.

    But for the sensor I'm using, it's like

    FS + some area 1 + active area + some area 2 + FE + blanking = total line number.

    And for some area 1&2, they are in the frame packet(they are wrapped in frame packet header and footer), but the blanking at the end is not, so this made me confusing

  • Hi Linhan,

    I think for the purpose of patgen, it's probably better to include some area 1 + some area 2 + blanking in your patgen to account for the total blanking.

    Best,

    Jiashow

  • Hi Jiashow, thanks for the reply.

    Actually I used some area 1 as VBP, and the problem is, the frame structure shows FE is between some area 2 and blanking at the end, since VFP is, the number of blank lines between the last video line and theFrameEnd packet

    So I'm thinking maybe this is the setting I can not make it right

  • Hi Linhan,

    You can refer to page 59 in the 954 datasheet for an example video interface diagram. The area 1 and area 2 you're referring to is your line blanking (horizontal blanking). And the blanking after FE that you're referring to is the frame blanking (vertical blanking). Your vertical front porch and back porch refer to the vertical blanking here.

  • Hi Jiashow, actually there is SMPG area between active area and frame end, which is the some area 2 I'm refering to. It does not belong to line blanking. Actually I saw TI also used imx390 from sony to develop, I'm not sure whether you can get info from the datasheet

    So it's SMPG + FE + blanking, and FE is between these two areas

    Best regards,

    Zheng Linhan

  • Hi Linhan,

    Thanks for clarifying. I don't think this SMPG area you're referring to can be programmed in the patgen. I would suggest using the sensor patgen if you'd like an exact frame structure as your sensor itself.

    Best,

    Jiashow

  • Hi Jiashow, I thought about it, and I am not sure whether I am right.

    For TPG using 954, original fram structure is not important. For the generated frame from 954, what matters is the total line number and active line number, the FS and FE can be placed at first and last line?

    Best regards,

    Zheng Linhan

  • Hi Linhan,

    Yes, you're correct. For pat gen, the only parameters you have control over is the total and active line.

    Best,

    Jiashow