DS90UB964-Q1 图像采集调试

free-jdx 2021-07-15 16:35:07 6252
1. 前言

(1)摄像头已由厂商配置,主机未重新配置,
图片:1280x720 yuv422 10bit;

(2) 参考DS90UB96X-Q1EVM用户指南配置

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)
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 ff
10 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 02
20 | e0 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30 | 00 00 01 01 00 01 00 03 00 00 00 00 00 00 00 00
40 | 00 a3 01 01 00 00 00 00 00 00 00 00 01 13 55 25
50 | f7 00 00 00 00 00 00 00 58 00 00 ba 18 60 00 00
60 | 00 00 00 00 00 60 00 00 00 00 00 00 00 7f 88 88
70 | 1f 2c e4 02 d0 0c 80 c5 00 01 00 00 01 00 00 00
80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0 | 10 14 1f 08 25 00 18 00 ff 03 03 74 80 00 00 00
c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0 | 00 43 84 0f 60 f8 07 00 00 00 00 00 00 00 00 00
e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0 | 5f 55 42 39 36 34 00 00 00 00 00 00 00 00 00 00

(3)采集图像

2. 操作流程

(1) sensor已经初始化,因为在934并行输入上测试它:
soc可以从934捕获正常图像,测量仅[D0~D7]有数据:

a.示意图:

b. 没有配置934,使用默认的reg,数据仍然可以正常捕获

open 934 device: /dev/i2c-2, chip_addr: 0x30
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
----------------------------------------------------
00 | 60 00 1e 10 cc 01 00 fe 1c 10 7a 7a 01 b9 28 7f
10 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 0a
20 | 30 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30 | 00 00 00 00 40 00 00 00 00 00 00 01 14 6f 00 40
40 | 00 86 74 01 00 00 00 00 00 00 00 12 00 03 04 25
50 | 55 00 00 00 00 00 00 00 18 00 00 ba 00 00 00 00
60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 88 88
70 | 2b 2c e4 00 00 00 00 c5 00 01 00 00 20 00 00 00
80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0 | 02 0f 00 00 08 00 00 00 00 00 00 00 00 00 00 00
b0 | 08 14 1f 08 25 00 08 00 8f 33 03 74 80 00 00 00
c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0 | 00 43 94 05 60 f4 00 00 00 00 00 00 00 00 00 00
e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0 | 5f 55 42 39 33 34 00 00 00 00 00 00 00 00 00 00

(2)
从上面的测试中可以看到
934的输出是yuv422-8-bit
964-mipi的输出也是yuv422-8-bit
SOC只支持8bit (MEDIA_BUS_FMT_UYVY8_2X8):

3. 修改并行传输高低位

修改 Raw 10 8位模式:
0x7c寄存器[7:6]
使用低8位的8位处理
捕获图像正常;

4. 硬件注意事项

确保只使用连接到REFCLK输入的振荡器
TESTEN销钉必须系在GND上。
为了只使用8位,需要正确地配置寄存器0x7C[7:6]

5. 如何通过解串器判断是否连接摄像头

如何获取摄像头是否插好,可以判断哪一个没有连接到摄像头

对于RX0,您需要选择Port0 ==> reg 0x4C = 0x01,然后读取寄存器0x4D[0]
对于RX1,你需要选择Port1 ==> reg 0x4C = 0x12,然后读取寄存器0x4D[0]

声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
free-jdx
红包 93 4 评论 打赏
评论
0个
内容存在敏感词
手气红包
    易百纳技术社区暂无数据
相关专栏
置顶时间设置
结束时间
删除原因
  • 广告/SPAM
  • 恶意灌水
  • 违规内容
  • 文不对题
  • 重复发帖
打赏作者
易百纳技术社区
free-jdx
您的支持将鼓励我继续创作!
打赏金额:
¥1易百纳技术社区
¥5易百纳技术社区
¥10易百纳技术社区
¥50易百纳技术社区
¥100易百纳技术社区
支付方式:
微信支付
支付宝支付
易百纳技术社区微信支付
易百纳技术社区
打赏成功!

感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~

举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

审核成功

发布时间设置
发布时间:
是否关联周任务-专栏模块

审核失败

失败原因
备注
拼手气红包 红包规则
祝福语
恭喜发财,大吉大利!
红包金额
红包最小金额不能低于5元
红包数量
红包数量范围10~50个
余额支付
当前余额:
可前往问答、专栏板块获取收益 去获取
取 消 确 定

小包子的红包

恭喜发财,大吉大利

已领取20/40,共1.6元 红包规则

    易百纳技术社区