Part Number:DS90UB935-Q1
各位专家,晚上好:
我现在使用的项目数据流图是:
OV2310 CSI-2 –> TI935 –> 同轴 –> TI935 –> CSI-2 –> NTK(SOC),寄存器设定如下:
? ?:
这设计感觉用的nonsynchronous mode?
Sensor的MCLK没配置?
,
Zhu Zhiqiang:
是同步模式。上图2中的MAGE_MCLK预览的测试点TP12,用示波器量的频率为25MHz。
,
Kailyn Chen:
您好,pattern也没有输出是吗? pattern 模式下,pass输出什么电平?
如果输出为高,那说明pattern配置没有问题,是不是问题出在Soc这端?
,
Zhu Zhiqiang:
Dear Chen:
pattern使用的是datasheet 7.5.11.4的code,如下:
//#Patgen Fixed Colorbar 1280x720p30 {0x20, CMD_I2CFMT_1B1B, {0x30, CMD_TI936}}, // {0x1F, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, // # CSI_PLL_CTL {0x33, CMD_I2CFMT_1B1B, {0x03, CMD_TI936}}, // # CSI_CTL CSI0 enable {0xB0, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, // # Indirect Pattern Gen Registers {0xB1, CMD_I2CFMT_1B1B, {0x01, CMD_TI936}}, // # PGEN_CTL {0xB2, CMD_I2CFMT_1B1B, {0x01, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x02, CMD_TI936}}, // # PGEN_CFG {0xB2, CMD_I2CFMT_1B1B, {0x33, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x03, CMD_TI936}}, // # PGEN_CSI_DI {0xB2, CMD_I2CFMT_1B1B, {0x24, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x04, CMD_TI936}}, // # PGEN_LINE_SIZE1 {0xB2, CMD_I2CFMT_1B1B, {0x0F, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x05, CMD_TI936}}, // # PGEN_LINE_SIZE0 {0xB2, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x06, CMD_TI936}}, // # PGEN_BAR_SIZE1 {0xB2, CMD_I2CFMT_1B1B, {0x01, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x07, CMD_TI936}}, // # PGEN_BAR_SIZE0 {0xB2, CMD_I2CFMT_1B1B, {0xE0, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x08, CMD_TI936}}, // # PGEN_ACT_LPF1 {0xB2, CMD_I2CFMT_1B1B, {0x02, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x09, CMD_TI936}}, // # PGEN_ACT_LPF0 720 {0xB2, CMD_I2CFMT_1B1B, {0xD0, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0A, CMD_TI936}}, // # PGEN_TOT_LPF1 {0xB2, CMD_I2CFMT_1B1B, {0x04, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0B, CMD_TI936}}, // # PGEN_TOT_LPF0 {0xB2, CMD_I2CFMT_1B1B, {0x1A, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0C, CMD_TI936}}, // # PGEN_LINE_PD1 {0xB2, CMD_I2CFMT_1B1B, {0x0C, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0D, CMD_TI936}}, // # PGEN_LINE_PD0 {0xB2, CMD_I2CFMT_1B1B, {0x67, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0E, CMD_TI936}}, // # PGEN_VBP {0xB2, CMD_I2CFMT_1B1B, {0x21, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0F, CMD_TI936}}, // # PGEN_VFP {0xB2, CMD_I2CFMT_1B1B, {0x0A, CMD_TI936}}, //
目前是断开TI935,TI936往SOC输出pattern,但是没有输出。 看了下,pass pin接的LED没有亮,是低电平。是我哪里设置不对吗 ? 谢谢!
,
Kailyn Chen:
您好,我看了下寄存器设置没有问题,把0x33的寄存器0x03改成0x73试试,enable CSI Skew-Calibration。
其次就是间接寄存器的配置,0x01 enable Pattern,0x02配置color bar格式,这些配置上再试试。
,
Zhu Zhiqiang:
Dear Chen:
0x03改成0x73没有改善,pass pin还是低。 如果怀疑TI936和SOC的连接问题,可以测量哪些信号或者查看哪些寄存器来定位吗 ? 谢谢
,
Kailyn Chen:
pass为低,还是936这里的配置问题,如果pass为高,Soc没有显示,可能是连接或者Soc的问题。
您现在是只使用936 去做pattern generation的测试是吗?
因为如果接了935,我们可以通过0x4D这个状态寄存器验证下是哪里报错,比如接收端936这边的输入是否有收到有效的FPD link输入数据?是否满足pass标准等。
另外,就是上述的配置 没问题,indirect寄存器0x01和0x02,以及0x10~0X1E也补充上配置试试,这几个是对color bar的配置,是否已经添加上配置试了也不能显示?
,
Zhu Zhiqiang:
Dear chen:
这几天在弄其它事情,所以今天晚上才回复~
1、我现在断开了935和936的连接,936输出pattern到SOC
2、因为我想先验证936和SOC通信OK,确保我的flow是没有问题的,所以断开了935
3、最新的936的pattern 初始化如下,和datasheet一致,后面的0x10~0x1E取默认值。还是不行~
//#Patgen Fixed Colorbar 1280x720p30 {0x20, CMD_I2CFMT_1B1B, {0x30, CMD_TI936}}, // {0x1F, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, // # CSI_PLL_CTL {0x33, CMD_I2CFMT_1B1B, {0x73, CMD_TI936}}, // # CSI_CTL CSI0 enable 0x03 {0xB0, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, // # Indirect Pattern Gen Registers {0xB1, CMD_I2CFMT_1B1B, {0x01, CMD_TI936}}, // # PGEN_CTL {0xB2, CMD_I2CFMT_1B1B, {0x01, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x02, CMD_TI936}}, // # PGEN_CFG {0xB2, CMD_I2CFMT_1B1B, {0x2F, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x03, CMD_TI936}}, // # PGEN_CSI_DI {0xB2, CMD_I2CFMT_1B1B, {0x24, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x04, CMD_TI936}}, // # PGEN_LINE_SIZE1 {0xB2, CMD_I2CFMT_1B1B, {0x0F, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x05, CMD_TI936}}, // # PGEN_LINE_SIZE0 {0xB2, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x06, CMD_TI936}}, // # PGEN_BAR_SIZE1 {0xB2, CMD_I2CFMT_1B1B, {0x01, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x07, CMD_TI936}}, // # PGEN_BAR_SIZE0 {0xB2, CMD_I2CFMT_1B1B, {0xE0, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x08, CMD_TI936}}, // # PGEN_ACT_LPF1 {0xB2, CMD_I2CFMT_1B1B, {0x02, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x09, CMD_TI936}}, // # PGEN_ACT_LPF0 720 {0xB2, CMD_I2CFMT_1B1B, {0xD0, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0A, CMD_TI936}}, // # PGEN_TOT_LPF1 {0xB2, CMD_I2CFMT_1B1B, {0x04, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0B, CMD_TI936}}, // # PGEN_TOT_LPF0 {0xB2, CMD_I2CFMT_1B1B, {0x1A, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0C, CMD_TI936}}, // # PGEN_LINE_PD1 {0xB2, CMD_I2CFMT_1B1B, {0x0C, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0D, CMD_TI936}}, // # PGEN_LINE_PD0 {0xB2, CMD_I2CFMT_1B1B, {0x67, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0E, CMD_TI936}}, // # PGEN_VBP {0xB2, CMD_I2CFMT_1B1B, {0x21, CMD_TI936}}, // {0xB1, CMD_I2CFMT_1B1B, {0x0F, CMD_TI936}}, // # PGEN_VFP {0xB2, CMD_I2CFMT_1B1B, {0x0A, CMD_TI936}}, //
{0xB1, CMD_I2CFMT_1B1B, {0x10, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0xAA, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x11, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x33, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x12, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0xF0, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x13, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x7F, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x14, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x55, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x15, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x16, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x0F, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x17, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x80, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x18, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x19, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x1A, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x0F, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x1B, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x1C, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x1D, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}}, {0xB1, CMD_I2CFMT_1B1B, {0x1E, CMD_TI936}}, {0xB2, CMD_I2CFMT_1B1B, {0x00, CMD_TI936}},
,
Kailyn Chen:
好的,我这边会再看下您的问题。
,
Zhu Zhiqiang:
Hi Chen:
936输出pattern,通过CSI-2和SOC通信,有用示波器量936的mipi clk和mipi data0,波形如下:
看clk的波形,一帧的时间33.3ms,所以是30fps,应该是正常的。 不过mipi data的波形全部是LP,没有HS吗 ?
我有了解到间接寄存器 0x03写0x24是输出RGB888,我们SOC默认收RAW12,所以有修改为0x2C。不过此时SOC端仍看不到pattern画面。
{0xB1, CMD_I2CFMT_1B1B, {0x03, CMD_TI936}}, // # PGEN_CSI_DI {0xB2, CMD_I2CFMT_1B1B, {0x2C, CMD_TI936}}, // 0x24
请问还有什么建议吗? 谢谢!
,
Kailyn Chen:
这样配置了,输出能lock和pass都是高电平吗?
,
Zhu Zhiqiang:
有发现断开和935的同轴线,两个pin都是低(LED指示灯没有亮)。和935连上之后,两颗LED都会亮。
,
Zhu Zhiqiang:
Hi chen:
我这边尝试过修改936或者935的寄存器,之后读取的935的0x0E和0x53,基本不会变:
0x0E: data[0]=0x0b0x53: data[0]=0x03
请问TI的技术支持有微信或者QQ群吗 ? 这两颗IC确实用得比较少,能找到的资源比较有限。能否帮忙拉一个微信群? 这样沟通效率会比较高!
,
Kailyn Chen:
抱歉,回复晚了。
RAW12格式的话,pattern您试试用下面这个配置可以吗?
Reg:0x20 | Value: 0x30 # Forward Control Disabled for RX0 and RX1Reg:0x1f | Value: 0x00 # CSI PLL : 1.6 GbpsReg:0x33 | Value: 0x73 # CSI enable, Continuous clocks, Lane Count=1, enable skew cal
Reg:0xB0 | Value: 0x00 # Indirect Pattern Gen Registers – Select Pattern BlockReg:0xB1 | Value: 0x01 # PGEN_CTLReg:0xB2 | Value: 0x01Reg:0xB1 | Value: 0x02 # PGEN_CFGReg:0xB2 | Value: 0x33Reg:0xB1 | Value: 0x03 # PGEN_CSI_DIReg:0xB2 | Value: 0x2CReg:0xB1 | Value: 0x04 # PGEN_LINE_SIZE1Reg:0xB2 | Value: 0x06Reg:0xB1 | Value: 0x05 # PGEN_LINE_SIZE0Reg:0xB2 | Value: 0x40Reg:0xB1 | Value: 0x06 # PGEN_BAR_SIZE1Reg:0xB2 | Value: 0x00Reg:0xB1 | Value: 0x07 # PGEN_BAR_SIZE0Reg:0xB2 | Value: 0xC8Reg:0xB1 | Value: 0x08 # PGEN_ACT_LPF1Reg:0xB2 | Value: 0x02Reg:0xB1 | Value: 0x09 # PGEN_ACT_LPF0Reg:0xB2 | Value: 0xD0Reg:0xB1 | Value: 0x0A # PGEN_TOT_LPF1Reg:0xB2 | Value: 0x04Reg:0xB1 | Value: 0x0B # PGEN_TOT_LPF0Reg:0xB2 | Value: 0x1A
REG: 0xB1 0x0C # PGEN_LINE_PD1REG: 0xB2 0x0CREG: 0xB1 0x0D # PGEN_LINE_PD0REG: 0xB2 0x67REG: 0xB1 0x0E # PGEN_VBPREG: 0xB2 0x21REG: 0xB1 0x0F # PGEN_VFPREG: 0xB2 0x0A