说明:
全志芯片A40I,里面我移植了Android6的系统进去里面,就是想着跑OV5640这款摄像头(强制要求没办法啊),发现这款芯片本来提供的SDK是挺坑
的所以就去换系统咯。
问题:按照常规设置摄像头功能的文件,首先是sys_config.fex 然后到camera.cfg里面设置。然后启动机器的时候就会打印出这些东东:
[ 7.802426] [VFE]cci_init end
[ 7.869404] [VFE]Welcome to Video Front End driver
[ 7.875171] [VFE]csi0 probe end!
[ 7.878866] [VFE]csi1 probe end!
[ 7.883451] [VFE]csi_init end
[ 7.887689] [VFE]sunxi_isp_platform_register end
[ 7.893807] [VFE]mipi_init end
[ 7.897174] [VFE]flash_init end
[ 7.902770] [VFE]pdev->id = 0
[ 7.906008] [VFE]dev->cci_sel = 0
[ 7.909626] [VFE]dev->csi_sel = 0
[ 7.913467] [VFE]dev->mipi_sel = 0
[ 7.917180] [VFE]dev->isp_sel = 0
[ 7.920959] [VFE_WARN]fetch csi0_dev0_iovdd from device_tree failed
[ 7.927812] [VFE_WARN]fetch csi0_dev0_avdd from device_tree failed
[ 7.934800] [VFE_WARN]fetch csi0_dev0_dvdd from device_tree failed
[ 7.941680] [VFE_WARN]fetch csi0_dev0_afvdd from device_tree failed
[ 7.948532] [VFE_WARN]fetch csi0_dev0_power_en from device_tree failed
[ 7.955938] [VFE_WARN]fetch csi0_dev0_flash_en from device_tree failed
[ 7.963200] [VFE_WARN]fetch csi0_dev0_flash_mode from device_tree failed
[ 7.970760] [VFE_WARN]fetch csi0_dev0_flvdd from device_tree failed
[ 7.977615] [VFE_WARN]fetch csi0_dev0_flvdd_vol from device_tree failed
[ 7.985094] [VFE_WARN]fetch csi0_dev0_af_pwdn from device_tree failed
[ 7.993314] [VFE]vfe_init end
[ 8.000076] [VFE]probe_work_handle start!
[ 8.004810] [VFE]vfe_runtime_resume
[ 8.021038] [VFE]..........................vfe clk open!.......................
[ 8.029102] [VFE]v4l2 subdev register input_num = 0
[ 8.034768] [VFE]vfe sensor detect start! input_num = 0
[ 8.068914] [VFE]Find sensor name is "ov5640", i2c address is 78, type is "YUV" !
[ 8.077247] [VFE]Sub device register "ov5640" i2c_addr = 0x78 start!
[ 8.085713] [VFE]registered sensor subdev is OK!
[ 8.090878] [VFE]Check sensor!
[ 8.107560] [VFE]mclk on
[ 8.340247] wifi_platform_bus_enumerate device present 1
[ 8.432798] [VFE]mclk off
[ 8.472337] [VFE]Sub device register "ov5640" is OK!
[ 8.479139] [VFE]V4L2 device registered as video0
[ 8.484491] [VFE]vfe_runtime_suspend
[ 8.488407] [VFE]..........................vfe clk close!.......................
[ 8.503271] [VFE]probe_work_handle end!
由上面的打印信息所显示,I2C是已经启动了,并且能识别到这个摄像头的类型和这个摄像头的地址。并且将其注册为video0。也成功了
但是后面操作一个寄存器地址的时候一直提示错误。
[ 57.281711] [VFE]mclk on
[ 57.486244] twi_stop()407 - [i2c3] i2c state(0x00000000) isn't idle(0xf8)
[ 57.493701] sunxi_i2c_core_process()765 - [i2c3] STOP failed!
[ 57.500270] num = 1 ret = 255
[ 57.503734] sunxi_i2c_do_xfer()909 - [i2c3] incomplete xfer (status: 0xff, dev addr: 0x3c)
[ 57.513158] i2c_transfet_return = -70 eroor appear
[ 57.518922] [VFE_DEV_I2C_ERR]cci_write_a16_d8 error! slave = 0x3c, addr = 0x568d, value = 0x ae
ov5640 sensor write retry=1
并且我具体定位到了这个寄存器在哪一个位置:(但是并不知道这个寄存器干啥的为什么会出现错误),还定位到了具体发生错误的是在i2c-sunxi.c文件里面的一个 int sunxi_i2c_do_xfer(struct sunxi_i2c *i2c, struct i2c_msg *msgs, int num) 函数。但是对于V4L2的I2C流程不是很熟悉。需要大神帮忙看一下
在OV5640.c的文件中也找到了对应的寄存器地址。但是不知道具体意思
并且通过频谱分析仪抓回来的波形和对应的地址和数据居然还是有ACK返回来的。
打开安卓系统然后点击拍照APP 就提 ”无法连接相机“
之前有调过这款摄像头的朋友,可以告诉一下您们调这款照相机的大概流程么,操作那些文件。内核层和HAL和安卓层的东西。
在这里十分感谢大家了。谢谢。 这个东西搞了很久都没搞出来,十分难受。
离线
是 I2C3 吗?
离线
是 I2C3 吗?
是的,我用的就是I2C【3】,默认一般是i2c【0】或者是i2c【1】,但是硬件工程师为了飞线好飞。 所以接触了I2C[3]
离线
twi_stop()407 - [i2c3] i2c state(0x00000000) isn't idle(0xf8)
感觉 i2c3 状态出问题了, 寄存器指示他不处于空闲 ? 如果接 i2c0/1会是这样吗?
离线
twi_stop()407 - [i2c3] i2c state(0x00000000) isn't idle(0xf8)
感觉 i2c3 状态出问题了, 寄存器指示他不处于空闲 ? 如果接 i2c0/1会是这样吗?
因为就是硬件方便才飞到I2C【3】这块的。 其实偶尔才会提示之前I2C【3】总线繁忙的提示,但是操作这个0x568d寄存器错误的还是比较常在。
我通过调高CMA的内存 就没有出现过了。 但是在ADB上面操作查看V4L2的时候。 居然出现了这样的错误:
离线
这个banana pi已经全面支持OV5640
Banana Pi BPI-M64 A64开发板:
http://wiki.banana-pi.org/%E9%A6%99%E8%95%89%E6%B4%BE_BPI-M64
OV5640配件:
离线
请问一下,目前您这个问题解决了吗?我目前也遇到同样的情况
[ 2400.022570] GSLX680 Enter gsl_ts_probe
[ 2400.027636] [GSLX680] Enter gsl_ts_init_ts
[ 2400.033273] input: gslX680 as /devices/soc.0/1c27000.twi/i2c-0/0-0040/input/input2
/ # [ 2400.164721] twi_stop()428 - [i2c0] i2c state(0x00000000) isn't idle(0xf8)
[ 2400.172277] sunxi_i2c_core_process()783 - [i2c0] STOP failed!
[ 2400.224667] twi_stop()428 - [i2c0] i2c state(0x00000000) isn't idle(0xf8)
[ 2400.232220] sunxi_i2c_core_process()783 - [i2c0] STOP failed!
[ 2400.254707] twi_stop()428 - [i2c0] i2c state(0x00000000) isn't idle(0xf8)
[ 2400.262255] sunxi_i2c_core_process()783 - [i2c0] STOP failed!
[ 2400.334699] twi_stop()428 - [i2c0] i2c state(0x00000000) isn't idle(0xf8)
[ 2400.342247] sunxi_i2c_core_process()783 - [i2c0] STOP failed!
[ 2400.364689] twi_stop()428 - [i2c0] i2c state(0x00000000) isn't idle(0xf8)
[ 2400.372236] sunxi_i2c_core_process()783 - [i2c0] STOP failed!
[ 2400.394692] twi_stop()428 - [i2c0] i2c state(0x00000000) isn't idle(0xf8)
[ 2400.402240] sunxi_i2c_core_process()783 - [i2c0] STOP failed!
[ 2400.424457] =============gsl_load_fw start==============
设备都生成了,然后出现i2c0的状态不是空闲的,我看了下,i2c0中地址40,不存在占用的情况,麻烦知道指点一下,感谢
离线