TI DS90UB941内部时钟输出test pattern的方式

什么是DS90UB941?

DS90UB941是TI推出的桥接串行芯片,基于TI的FPD-LINK III传输协议,广泛应用于汽车行业的display模块产品上,例如HUD/IVI/cluster数字液晶屏.

有关941的更多信息可以参考其datasheet,另外,强烈推荐DS90UB941AS-Q1 DSI Bringup Guide.pdf这个文档。

什么是test pattern?

通常指的是测试画面,指的是由视频源输出单色/条纹/方格图像用以确认显示是否正常.下图是test pattern中的一种。

输出DS90UB941输出test pattern有那些方式?

通常视频输出最少要解决两个问题:

  • 以什么样的频率(帧率)显示图像,这个对应的是像素时钟,但本质是clock
  • 显示的图像内容是什么样子的

同样的,testpattern也一样需要满足上面两个条件。对于941时钟源可以有三种:

  • 外部DSI参考时钟源
  • 外部时钟晶振源
  • 内部时钟源

笔者参与过的很多车载的项目都是用的外部DSI参考时钟,这种时钟来源于SOC的DSI信号。而外部晶振时钟源这种方式由于需要额外的可编程时钟源晶振,相比会比外部DSI参考时钟源的方式成本要高。切记一点,941只支持确定时钟频率输入,不支持对外部晶振的时钟倍频/分频.

内部时钟源这种方式一般不用于正常的图像输出,因为这个时钟源设计之初并不是用于正常的图像输出.

上面我们已经理清楚了clock的问题,参考941的block框图我们知道,想要输出test pattern还需要告诉PAT GEN(pattern generator) 该输出test pattern了!

 注:941的时钟切换需要配置BRIDGE_CFG2 Register (Address = 56h) 寄存器

对于DSI参考时钟和外部时钟源的方式,输出test pattern的方式很简单,只需要写0x64寄存器即可:

 例如直接往0x64寄存器中写入0x17寄存器即可以输出上面的彩条画面。需要注意的是在写入0x64寄存器之前,请正确选择想要输出的port口.

如何使用内部时钟输出test pattern?

使用内部时钟输出test pattern会麻烦一些,需要先配置内部时钟的相关参数:

isend -n /dev/i2c1 -a 0x2c 0x66 0x1A                
isend -n /dev/i2c1 -a 0x2c 0x67 0x09                    // M=9
isend -n /dev/i2c1 -a 0x2c 0x66 0x03
isend -n /dev/i2c1 -a 0x2c 0x67 0x50                    //200MHz Clock divider, N=80, 90MHz
//2064 = 0X810  760=0X2F8   1920=0X780  720=0X2D0
isend -n /dev/i2c1 -a 0x2c 0x66 0x04
isend -n /dev/i2c1 -a 0x2c 0x67 0x10                    // least 8 bit of Total Horizontal frame size
isend -n /dev/i2c1 -a 0x2c 0x66 0x05
isend -n /dev/i2c1 -a 0x2c 0x67 0x88                   // Least 4 bit TV + Most 4 bit TH
isend -n /dev/i2c1 -a 0x2c 0x66 0x06
isend -n /dev/i2c1 -a 0x2c 0x67 0x2F                    // Most 8 bit of Total Vertical frame size
isend -n /dev/i2c1 -a 0x2c 0x66 0x07
isend -n /dev/i2c1 -a 0x2c 0x67 0x80                    // least 8 bit of active Horizontal frame size
isend -n /dev/i2c1 -a 0x2c 0x66 0x08
isend -n /dev/i2c1 -a 0x2c 0x67 0x07                    // Least 4 bit AV + Most 4 bit AH
isend -n /dev/i2c1 -a 0x2c 0x66 0x09
isend -n /dev/i2c1 -a 0x2c 0x67 0x2D                    // Most 8 bit of active Vertical frame size
isend -n /dev/i2c1 -a 0x2c 0x66 0x0A                  
isend -n /dev/i2c1 -a 0x2c 0x67 0x0C                    // Horizontal Sync Width
isend -n /dev/i2c1 -a 0x2c 0x66 0x0B                  
isend -n /dev/i2c1 -a 0x2c 0x67 0x03                    // Vertical Sync Width
isend -n /dev/i2c1 -a 0x2c 0x66 0x0C
isend -n /dev/i2c1 -a 0x2c 0x67 0x20                    // Horizontal back porch
isend -n /dev/i2c1 -a 0x2c 0x66 0x0D                 
isend -n /dev/i2c1 -a 0x2c 0x67 0x18                    // Vertical back porch
isend -n /dev/i2c1 -a 0x2c 0x65 0x04                    //using internal timing and internal clock
//(isend -n /dev/i2c1 -a 0x2c 0x39 0x02                    //Optional to ub928)
isend -n /dev/i2c1 -a 0x2c 0x64 0x25                    // Color Bar, enable PG
i2cset -f -y 10 0x0c 0x66 0x1A
i2cset -f -y 10 0x0c 0x67 0x09
i2cset -f -y 10 0x0c 0x66 0x03
i2cset -f -y 10 0x0c 0x67 0x50
  
i2cset -f -y 10 0x0c 0x66 0x04
i2cset -f -y 10 0x0c 0x67 0x10
i2cset -f -y 10 0x0c 0x66 0x05
i2cset -f -y 10 0x0c 0x67 0x88
i2cset -f -y 10 0x0c 0x66 0x06
i2cset -f -y 10 0x0c 0x67 0x2F
i2cset -f -y 10 0x0c 0x66 0x07
i2cset -f -y 10 0x0c 0x67 0x80
i2cset -f -y 10 0x0c 0x66 0x08
i2cset -f -y 10 0x0c 0x67 0x07
i2cset -f -y 10 0x0c 0x66 0x09
i2cset -f -y 10 0x0c 0x67 0x2D
i2cset -f -y 10 0x0c 0x66 0x0A
i2cset -f -y 10 0x0c 0x67 0x0C
i2cset -f -y 10 0x0c 0x66 0x0B
i2cset -f -y 10 0x0c 0x67 0x03
i2cset -f -y 10 0x0c 0x66 0x0C
i2cset -f -y 10 0x0c 0x67 0x20
i2cset -f -y 10 0x0c 0x66 0x0D
i2cset -f -y 10 0x0c 0x67 0x18
i2cset -f -y 10 0x0c 0x65 0x04
  
i2cset -f -y 10 0x0c 0x64 0x25

这两个配置在使用的时候可以试一下,时间太久远了,我记得有一个是有用的。

  • 4
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值