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如何设置test parttern



热心的TI 工程师,你们好:

        我想设置954的test parttern来测试与host的数据通道是否ok。所有的I2C设置如下:

{0x01U} 0x03U, i2c_write},
{0x4CU} 0x01U, i2c_write},
{0x33U} 0x03U, i2c_write},
{0x20U} 0x30U, i2c_write},
{0x1FU} 0x00U, i2c_write},
{0x58U} 0xF8U, i2c_write},

{0xB0U} 0x00U, i2c_write}, //Indirect Pattern Gen Registers

{0xB1U} 0x01U, i2c_write},
{0xB2U} 0x01U, i2c_write}, //PGEN_CTL

{0xB1U} 0x02U, i2c_write},
{0xB2U} 0x34U, i2c_write}, //PGEN_CFG YUV422-8bit BLOCK_SIZE=4

{0xB1U} 0x03U, i2c_write},
{0xB2U} 0x1EU, i2c_write}, //PGEN_CSI_DI YUV422 8-bit

{0xB1U} 0x04U, i2c_write},
{0xB2U} 0x0AU, i2c_write}, //PGEN_LINE_SIZE1

{0xB1U} 0x05U, i2c_write},
{0xB2U} 0x00U, i2c_write}, //PGEN_LINE_SIZE0 2560

{0xB1U} 0x06U, i2c_write},
{0xB2U} 0x01U, i2c_write}, //PGEN_BAR_SIZE1

{0xB1U} 0x07U, i2c_write},
{0xB2U} 0x40U, i2c_write}, //PGEN_BAR_SIZE0 320

{0xB1U} 0x08U, i2c_write},
{0xB2U} 0x02U, i2c_write}, //PGEN_ACT_LPF1

{0xB1U} 0x09U, i2c_write},
{0xB2U} 0xD0U, i2c_write}, //PGEN_ACT_LPF0 720

{0xB1U} 0x0AU, i2c_write},
{0xB2U} 0x04U, i2c_write}, //PGEN_TOT_LPF1

{0xB1U} 0x0BU, i2c_write},
{0xB2U} 0x1AU, i2c_write}, //PGEN_TOT_LPF0 1050

{0xB1U} 0x0CU, i2c_write},
{0xB2U} 0x0CU, i2c_write}, //PGEN_LINE_PD1

{0xB1U} 0x0DU, i2c_write},
{0xB2U} 0x67U, i2c_write}, //PGEN_LINE_PD0 3175*10ns=31.75us

{0xB1U} 0x0EU, i2c_write},
{0xB2U} 0x21U, i2c_write}, // PGEN_VBP 33

{0xB1U} 0x0FU, i2c_write},
{0xB2U} 0x0AU, i2c_write}, //PGEN_VFP 15

格式设定是1280*720 30fps  YUV422 8bit,但是host那端还是抓不到数据

麻烦帮忙看看这样是否ok,是否还需要设置其他寄存器,比如clk啥的,非常感谢!

  • 您好,datasheet Page71的 7.5.11.4 Code Example for Pattern Generator 有给出fixed color bar的参考例程. 可以参考下,看是否有输出图像:
    www.ti.com.cn/.../ds90ub954-q1.pdf
  • Hi,chen:
    我的设置就是按照参考例程来改的,主要是有两个不确定的地方:
    1.YUV422 8bit(DT=0x1E)的block size,我查看CSI-2 spec文档这个格式是按照2个像素一共4byte来排布的,也就是数据都应该是4byte的整数倍。所以我认为block size应该是4,但是查看论坛其他的贴子,回复有说是2的,所以不确定是4还是2.
    2.当使用pattern模式的时候,其他的FPDlink、gpio等寄存器统统不用管,只需要设置CSI out相关就行了吗?除了例程里面提到的寄存器,要使pattern正常输出的最小设置项是什么呢,如果有更明确的描述就好了。

    非常感谢
  • 1. 关于block size, 954的datasheet也有介绍:t. The sizes are defined in the Mipi CSI-2 specification. For example, RGB888 requires a 3-byte block size which is the same as the pixel size. RAW10 requires a 5-byte block size which is equal to 4 pixels.
    RAW12 requires a 3-byte block size which is equal to 2 pixels.

    2. pattern的最小设置您指的color bar的数量吗? 最小是1 color bar.可以配置为1, 2, 4, 8 color bar.
    有一篇关于test pattern 的应用手册, 主要应用于FPD linkIII系列的92x, 94x系列的器件,可以参考下,介绍的非常详细:
    www.ti.com/.../snla132e.pdf


  • 这个是Mipi CSI-2 specification的内容,它里面只有packet size的概念,且等于4 Bytes。那block size应该就是4咯?

    但是这个帖子e2e.ti.com/.../696737中贵司员工回复的示例   block size却是2.

    所以能帮忙确定一下是2还是4吗?因为我现在是用parttern来测试接收端的驱动是否正常,所以必须要保证954的parttern设置正确。

    It‘s very important to me,thanks a lot.

  • 您好,好的, 我这边再确定下.
  • 您好,已经确认了,block size是2, 不是4, MIPI CSI-2 spec这里的意思是YUV422 2个像素,4个字节,那么每个像素就是两个字节,block size的意思就是每个像素的整数倍字节数,因此YUV422 每个像素是2个字节,block size是等于2 而不是4.