缺少{}导致的camera 初始化 iic通信失败

   最近调试一款摄像头,prob时sensor id能正确读到,但是进入camera时会出现写camera sensor init失败,

<3>[   66.087427] msm_cci_irq:854 MASTER_1 error 40000
<3>[   66.091294] msm_cci_irq:854 MASTER_1 error 20000
<3>[   66.095799] msm_cci_validate_queue failed rc -22
<3>[   66.100526] msm_cci_data_queue: failed 250
<3>[   66.104840] msm_camera_cci_i2c_write_table: line 200 rc = -22
<3>[   66.113033] msm_sensor_config:1292 ov5648_oty5f03 cfgtype = 6

根据经验,只要id读取正常,一般说明iic通信没有问题,查阅datasheet发现

error 40000 : This bit asserts when Queue#0 of I2C Master #1  overflows

error 20000 :This bit asserts when Queue#0 of I2C Master #1 underflows

初步可以认证是发送iic 初始化队列出现异常,或者iic写初始化过程中出现异常,如没有收到nack,但是master又一直再发送init参数给iic queue。

所以先从发送队列开始检查,发现发送主初始化参数前会先发送2个寄存器的写操作,如下

static struct msm_camera_i2c_reg_array init_reg_array0[] = {
  {0x0100, 0x00},
  {0x0103, 0x01},
};

并没有出现iic写失败,

但是写主初始化就会异常,主初始化队列如下:

static struct msm_camera_i2c_reg_array init_reg_array1[] = {

0x3001, 0x00, // D[7:0] set to input

0x3002, 0x00, // D[11:8] set to input
0x3011, 0x02, // Drive strength 2x
0x3017, 0x05, // AM05
0x3018, 0x4c, // MIPI 2 lane
0x301c, 0xd2, // AM05
0x3022, 0x00,
0x3034, 0x1a, // 10-bit mode
0x3035, 0x21, // PLL
0x3036, 0x7f, // PLL
0x3037, 0x03, // PLL
0x3038, 0x00, // PLL
0x3039, 0x00, // PLL
0x303a, 0x00, // PLLS
0x303b, 0x19, // PLLS
0x303c, 0x11, // PLLS
0x303d, 0x30, // PLLS
0x3105, 0x11,
0x3106, 0x05, // PLL
0x3304,

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值