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: CSI-2 Format for pattern generator

Part Number: DS90UB954-Q1
Other Parts Discussed in Thread: ALP

Hi team,

I have some questions for CSI-2 format.

What is the format of CSI-2 output from 954 if 953 send RGB888 and YUV422 8 bits with the 953 pattern generator?

For example, the order or data of R, G, B or LB first or MB first.

If it conforms to the CSI-2 standard, could you give us details such as the item number of that standard?

Best regards,

Tomoaki Yoshida

  • Hi Yoshida,
    yes, 954 is fully compatible with CSI-2 Version 1.3.
    1. if the paired is 953, the input data type is transmitted to 954 directly.
    2. the frame package is based on data type, which is defined in CSI2 spec.

    regards,
    Steven
  • Hi Junqiang-san,

    Thank you for your support.
    We are trying out a reference example of the data sheet pattern generator but it is not working well.

    Is this reference correct with the following specifications?
    Size : 1920x1080p
    Frame rate : 30fps
    Format : RGB888
    Bar width : 525 pixel
    No embedded


    7.6.4 Code Example for Pattern Generator in 953's datasheet
    #Patgen RGB888 1920x1080p30 Fixed 8 Colorbar
    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) # RGB888
    WriteI2C(0xB1,0x04) # PGEN_LINE_SIZE1
    WriteI2C(0xB2,0x16)
    WriteI2C(0xB1,0x05) # PGEN_LINE_SIZE0
    WriteI2C(0xB2,0x80)
    WriteI2C(0xB1,0x06) # PGEN_BAR_SIZE1
    WriteI2C(0xB2,0x02)
    WriteI2C(0xB1,0x07) # PGEN_BAR_SIZE0
    WriteI2C(0xB2,0xD0)
    WriteI2C(0xB1,0x08) # PGEN_ACT_LPF1
    WriteI2C(0xB2,0x04)
    WriteI2C(0xB1,0x09) # PGEN_ACT_LPF0
    WriteI2C(0xB2,0x38)
    WriteI2C(0xB1,0x0A) # PGEN_TOT_LPF1
    WriteI2C(0xB2,0x04)
    WriteI2C(0xB1,0x0B) # PGEN_TOT_LPF0
    WriteI2C(0xB2,0x65)
    WriteI2C(0xB1,0x0C) # PGEN_LINE_PD1
    WriteI2C(0xB2,0x0B)
    WriteI2C(0xB1,0x0D) # PGEN_LINE_PD0
    WriteI2C(0xB2,0x93)
    WriteI2C(0xB1,0x0E) # PGEN_VBP
    WriteI2C(0xB2,0x21)
    WriteI2C(0xB1,0x0F) # PGEN_VFP
    WriteI2C(0xB2,0x0A)

    As we are considering another pattern, could you confirm that too?
    I would like to send documents directly by email.

    Best regards,
    Tomoaki Yoshida
  • Hi Junqiang-san,

    Since we want to confirm that the image data has been correctly received from the device, we hope information that shows the detailed expected value of the data.
    Thank you.

    Tomoaki Yoshida
  • Hi Yoshida,
    Pleas e try the ref. code in TI's ALP installed file directory. one example is listed below, please check the Alias953 as your 954's ID addr., thanks.

    # enable pat gen
    board.WriteI2C(Alias953, 0xB0, 0x00)
    board.WriteI2C(Alias953, 0xB1, 0x01)
    board.WriteI2C(Alias953, 0xB2, 0x01) #enable pattern generator

    board.WriteI2C(Alias953, 0xB1, 0x02)
    board.WriteI2C(Alias953, 0xB2, 0xB3) #fixed color pattern, 8 color bars, block size of 5

    board.WriteI2C(Alias953, 0xB1, 0x03)
    board.WriteI2C(Alias953, 0xB2, 0x24) #CSI Data Identifier (0x24 = RGB888, 0x2C = RAW12, 0x2B = RAW10)

    board.WriteI2C(Alias953, 0xB1, 0x04)
    board.WriteI2C(Alias953, 0xB2, 0x16) #line size (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x05)
    board.WriteI2C(Alias953, 0xB2, 0x80) #line size (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x06)
    board.WriteI2C(Alias953, 0xB2, 0x02) #bar size (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x07)
    board.WriteI2C(Alias953, 0xB2, 0xd0) #bar size (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x08)
    board.WriteI2C(Alias953, 0xB2, 0x04) #active lines per frame (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x09)
    board.WriteI2C(Alias953, 0xB2, 0x38) #active lines per frame (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x0a)
    board.WriteI2C(Alias953, 0xB2, 0x04) #total lines per frame (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x0b)
    board.WriteI2C(Alias953, 0xB2, 0x65) #total lines per frame (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x0c)
    board.WriteI2C(Alias953, 0xB2, 0x0B) #line period (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x0d)
    board.WriteI2C(Alias953, 0xB2, 0x93) #line period (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x0e)
    board.WriteI2C(Alias953, 0xB2, 0x21) #vertical back porch

    board.WriteI2C(Alias953, 0xB1, 0x0f)
    board.WriteI2C(Alias953, 0xB2, 0x0a) #vertical front porch

    board.WriteI2C(Alias953, 0xB1, 0x10)
    board.WriteI2C(Alias953, 0xB2, 0x00) #1st byte of fixed color

    board.WriteI2C(Alias953, 0xB1, 0x11)
    board.WriteI2C(Alias953, 0xB2, 0x00) #2nd byte of fixed color

    board.WriteI2C(Alias953, 0xB1, 0x12)
    board.WriteI2C(Alias953, 0xB2, 0xFF) #3rd byte of fixed color


    best regards,
    Steven
  • Hi Steven,

    May i ask how the total line per frame is calculated?

    I went through the forum and analysed some of the published scripts of pattern generation (along with the one from predefscripts folder) and almost every time this total line per frame was changing. Even with same target video format configuration (RGB888 1920x1080 for example).

    Also, it looks like the "line size" doesn't have a big influence on the pattern generation ? For example in the case explained here, target format is 1920x1080 but "line size" is set to 5760 instead of 1920. Will it work the same for an output screen resolution of 1920x1080?

    Thanks a lot,

    Omar

  • Hi again,

    Thanks to another post from Tomoaki Yoshida that i previously missed, I understood that the "Line Size" parameters is actually given in bytes and not in pixels. Explaining where the 5760 was coming from, instead of 1920 (in the case of RGB888).

    Also, I saw that "Total Line Per Frame" was equal to the sum of : "Active Line Per Frame" + "Vertical Front Porch" + "Vertical Back Porch" + "Vertical Sync".
    But I still have another question : Can we give any number to VBP and VFP ?

    Thanks again,

    Omar
  • Omar

    yes, 954 can generate any VBP/VFP pattern, but you need make sure that the receiver can accept this timing.

    regards,

    Steven