Part Number:DS90UB964-Q1
1.摄像头为其他厂家已配置好的无需主机再次配置,图像为1280×720 yuv422 10bit;
2.参照 DS90UB96X-Q1EVM User's Guide 配置如下:
print "CSI_PORT_SEL"
board.WriteReg(0x32,0x01) # CSI0 select
time.sleep(0.1)
print "CSI_PLL_CTL"
board.WriteReg(0x1f,0x02) # CSI0 800mbps
time.sleep(0.1)
print "CSI_EN"
board.WriteReg(0x33,0x1) # CSI_EN & CSI0 4L
time.sleep(0.1)
print "FWD_PORT"
board.WriteReg(0x20,0xe0) # forwarding of RX 0 to CSI0
time.sleep(0.1)
print "FPD3_PORT_SEL"
board.WriteReg(0x4c,0x01) # RX_PORT0
time.sleep(0.1)
print "enable pass throu"
board.WriteReg(0x58,0x58) # enable pass throu
time.sleep(0.1)
board.WriteReg(0x5c,0x18) #
print "SER_ALIAS_ID 0x5c value ", hex(board.ReadReg(0x5c))
time.sleep(0.1)
board.WriteReg(0x5d,0x60) #
print "SlaveID[0] 0x5d value ", hex(board.ReadReg(0x5d))
time.sleep(0.1)
board.WriteReg(0x65,0x60) #
print "SlaveAlias[0] 0x65 value ", hex(board.ReadReg(0x65))
time.sleep(0.1)
print "FV_POLARITY"
board.WriteReg(0x7c,0x01) # FV active low
time.sleep(0.1)
print "YUV422 DT"
board.WriteReg(0x70,0x1f) # VC0 and CSI0 datatype 0x1f yuv422_10b
time.sleep(0.1)
print "FPD_MODE"
board.WriteReg(0x6d,0x7f) # 913A 10-bit mode
time.sleep(0.1)
#########################################################
3.采集到绿屏图像,能观察到图像有变化,如视频所示:
(function(id)
{
var v = document.getElementById(id);var op = v.style.position, ol = v.style.left, or = v.style.right, fe = [];
var nodeLimit = 50;
checkVideo = function() {
if (!v.canPlayType || v.error) {
var bound = 0;
while (v.childNodes.length > 0 && bound < nodeLimit) {
bound++;
if (v.childNodes[0].nodeName != 'SOURCE') {
v.parentNode.insertBefore(v.childNodes[0], v);
}
}
v.parentNode.removeChild(v);
} else if (v.readyState == 0) {
window.setTimeout(checkVideo, 249);
}
},
checkVideoRendered = function() {
if (v.networkState == 1 && v.readyState == 4) {
v.style.position = op;
v.style.left = ol;
v.style.right = or;
for (var i = 0; i < fe.length; i++) {
fe[i].parentNode.removeChild(fe[i]);
}
} else {
window.setTimeout(checkVideoRendered, 249);
}
}
if (navigator.userAgent.indexOf('iPad') == -1 && navigator.userAgent.indexOf('iPhone') == -1 && navigator.userAgent.indexOf('iPod') == -1) {
window.setTimeout(checkVideo, 249);
}
})('v_a8cb21ef4ddc4ec7bc90f53610349bb0');
麻烦分析一下,感谢。
Kailyn Chen:
您好,看了下您的配置没问题,可以读取下状态寄存器0x73-0x76,看下line count和line length是否都没问题,如果也都没问题,应该不是serdes的问题。
确认下是否是屏幕这边配置的问题。
,
xueze xu:
Hi Chen,
1.读取寄存器如下:
open: /dev/i2c-1, chip_addr: 0x3d
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F—————————————————-00 | 7a 00 1e 30 c2 01 00 fe 1c 10 79 79 0f b9 00 ff10 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 0220 | e0 03 00 00 00 00 00 00 00 00 00 00 00 00 00 0030 | 00 00 01 01 00 01 00 03 00 00 00 00 00 00 00 0040 | 00 a3 01 01 00 00 00 00 00 00 00 00 01 13 55 2550 | f7 00 00 00 00 00 00 00 58 00 00 ba 18 60 00 0060 | 00 00 00 00 00 60 00 00 00 00 00 00 00 7f 88 8870 | 1f 2c e4 02 d0 0c 80 c5 00 01 00 00 01 00 00 0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0090 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00b0 | 10 14 1f 08 25 00 18 00 ff 03 03 74 80 00 00 00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00d0 | 00 43 84 0f 60 f8 07 00 00 00 00 00 00 00 00 00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00f0 | 5f 55 42 39 36 34 00 00 00 00 00 00 00 00 00 00
2.同一个摄像头在并口934上可以正常捕获数据,且量得到D0-D7是有数据,D8 D9是没有的,可以说明输出是8bit了吧;
主机获取图像参数为MEDIA_BUS_FMT_UYVY8_2X8;
采集到图像:
3.在964-mipi上获取数据也是MEDIA_BUS_FMT_UYVY8_2X8,但图像异常,是否964输出是不是8bit的。
4.跟屏幕无关,保存图像文件也是一样效果。
谢谢。
,
Kailyn Chen:
图像是YUV422 10bit还是8bit的?使用934输出是8bit的,您的意思是YUV422 8bit 吗?
如果是YUV422 8bit,那么对于964来说,也需要配置为10bit mode。并且需要配置0x7C的bit[7:6],是使用高8位,还是使用低8位。
,
xueze xu:
Hi Chen,
配置0x7C为低8bit图像正常了,当前为了调试只配置一路如下,产品需求为4路输入复用应该怎么配置呢:
mj_i2c_rw 1 0x3d 0x32 0x01mj_i2c_rw 1 0x3d 0x1f 0x02mj_i2c_rw 1 0x3d 0x33 0x01mj_i2c_rw 1 0x3d 0x20 0xe0mj_i2c_rw 1 0x3d 0x4c 0x01mj_i2c_rw 1 0x3d 0x58 0x58mj_i2c_rw 1 0x3d 0x5c 0x18mj_i2c_rw 1 0x3d 0x5d 0x60mj_i2c_rw 1 0x3d 0x65 0x60mj_i2c_rw 1 0x3d 0x7c 0x01mj_i2c_rw 1 0x3d 0x70 0x1fmj_i2c_rw 1 0x3d 0x6d 0x7f
感谢!
,
xueze xu:
Hi Chen,
现在可以正常捕获4路摄像头数据了,那怎么获取摄像头拔插状态即读取哪个寄存器可以知道哪一路有接或没接。
,
Kailyn Chen:
参考下面Table 6,应该是在0xB0~0XB2这几个间接寄存器里可以读取。