OV5640_MIPI_1LEN调试记录

OV5640_MIPI调试记录

CMOS 型号:OV9750

寄存器配置:(以下寄存器配置仅供参考!)

const regval16_t OV5640_720P_MIPI_30fps[]=

{

 {0x3008,0x82 },

 {0x3008,0x42 },

 {0x3103,0x03 },

 {0x3017,0x00 },

 {0x3018,0x00 },

 {0x3034,0x1a },

 {0x3035,0x11 },

 {0x3036,0x64 },

 {0x3037,0x13 },

 {0x3108,0x01 },

 

 {0x3500, 0x03},

 {0x3501, 0xff},

 {0x3502, 0xff},

 {0x3503, 0x03},

 {0x350A, 0x00},

 {0x350B, 0x30},

 

 {0x3630,0x36 },

 {0x3631,0x0e },

 {0x3632,0xe2 },

 {0x3633,0x12 },

 {0x3621,0xe0 },

 {0x3704,0xa0 },

 {0x3703,0x5a },

 {0x3715,0x78 },

 {0x3717,0x01 },

 {0x370b,0x60 },

 {0x3705,0x1a },

 {0x3905,0x02 },

 {0x3906,0x10 },

 {0x3901,0x0a },

 {0x3731,0x12 },

 {0x3600,0x08 },

 {0x3601,0x33 },

 {0x302d,0x60 },

 {0x3620,0x52 },

 {0x371b,0x20 },

 {0x471c,0x50 },

 {0x3a13,0x43 },

 {0x3a18,0x00 },

 {0x3a19,0xf8 },

 {0x3635,0x13 },

 {0x3636,0x03 },

 {0x3634,0x40 },

 {0x3622,0x01 },

 {0x3c01,0x34 },

 {0x3c04,0x28 },

 {0x3c05,0x98 },

 {0x3c06,0x00 },

 {0x3c07,0x07 },

 {0x3c08,0x00 },

 {0x3c09,0x1c },

 {0x3c0a,0x9c },

 {0x3c0b,0x40 },

 

 {0x3800,0x00 },

 {0x3801,0x20 },//32

 {0x3802,0x01 },

 {0x3803,0x06 },//262

 {0x3804,0x0a },

 {0x3805,0x20 },//2592

 {0x3806,0x06 },

 {0x3807,0xa6 },//1702

 {0x3808,0x05 },

 {0x3809,0x00 },//1280

 {0x380a,0x02 },

 {0x380b,0xd0 },//720

 

 /*{0x3808,0x07 },

 {0x3809,0x80 },//1920

 {0x380a,0x04 },

 {0x380b,0x38 },//1080

 */

 {0x380c,0x0a },

 {0x380d,0x40 },

 {0x380e,0x06 },

 {0x380f,0xb0 },

 {0x3810,0x00 },

 {0x3811,0x00 },//640

 {0x3812,0x00 },

 {0x3813,0x00 },//360

 {0x3814,0x31 },

 {0x3815,0x31 },

 {0x3820,0x41 },

 {0x3821,0x00 },//JPEG enable

 {0x5001,0x00 },

 //{0x5601,0x11 },

 

 //{0x5003,0x0a },

 

 {0x3618,0x00 },

 {0x3612,0x29 },

 {0x3708,0x66 },

 {0x3709,0x12 },

 {0x370c,0x03 },

 {0x3a02,0x03 },

 {0x3a03,0xd8 },

 {0x3a08,0x01 },

 {0x3a09,0x27 },

 {0x3a0a,0x00 },

 {0x3a0b,0xf6 },

 {0x3a0e,0x03 },

 {0x3a0d,0x04 },

 {0x3a14,0x03 },

 {0x3a15,0xd8 },

 {0x4001,0x02 },

 {0x4004,0x02 },

 {0x4050,0x6e },

 {0x4051,0x8f },

 {0x3000,0x00 },

 {0x3002,0x1c },

 {0x3004,0xff },

 {0x3006,0xc3 },

 {0x300e,0x25 },

 {0x302e,0x08 },

 {0x4300,0xf8 },

 {0x501f,0x03 },

 {0x5684,0x05 },//OUTPUT    X -->0X500 = 1280

 {0x5685,0x00 },

 {0x5686,0x03 },//OUTPUT    X -->0X3C0 = 960

 {0x5687,0xc0 },

 {0x4713,0x03 },

 {0x4407,0x04 },

 {0x440e,0x00 },

 {0x460b,0x37 },

 {0x460c,0x20 },

 //{0x4837,0x11 },

 {0x3824,0x04 },

 {0x5000,0x86 },//LENC enable

 

 {0x3a0f,0x36 },

 {0x3a10,0x2e },

 {0x3a1b,0x38 },

 {0x3a1e,0x2c },

 {0x3a11,0x70 },

 {0x3a1f,0x18 },

 {0x3008,0x02 },

 {0x0000,0x00 }

};

该配置输出格式:

720P(1280*720) | Raw | MJPEG

 

调试步骤:

①确认CMOS OV5640的芯片ID

#define ov5640_ID 0x78

②确认使用的SCCB总线  (确认包括硬件和软件)

③确认使用的MIPI总线  (确认包括硬件和软件)

④检查OV5640上电时序

关键点:检查Reset引脚的时序,上电必须有先拉低->延时->拉高的阶段,否则Sensor上电失败,无法正常初始化。另外也要检查AVDD和DOVDD的供电电压,需要和Spec里相匹配。

OV5640_MIPI_1LEN调试记录_第1张图片

⑤检查CLK是否正常

利用示波器测试Sensor的时钟是否正常,一般为24MHz

⑥检查mipi数据线引脚连接是否正常(万有表量量通不通)

⑦检查CMOS Sensor的视频数据格式是否与显示的格式一致(一般寄存器默认是RAW)

我们的CMOS模块之前供电正常,可以进行相应的寄存器读写配置,但是无法获取图像数据就是这里出现了问题,因为寄存器配置的是720p的图像,格式为1280*720,但是我们Host Chip的源码里面设置的是1080P的,格式为1920*1080,所以无法获取图像,后面手动更改源码中的Sensor数据图像格式为1280*720,视频数据就完美的获取成功了。

摄像头调试最重要的是寄存器配置文件和硬件焊接,只要这两步确认好了,那么剩下的就是根据寄存器配置调整源码里相应的数据获取格式等配置,一一对应,要是实在弄不出来,找大神请教帮忙也是可行的,毕竟如果自己没调试过摄像头的话,是很难在短时间调试成功的,不过坚持就会有希望,相信自己一定会成功,那么就一定会调通

只要图像可以获取成功,其他的白平衡和自动对焦什么的,可以参考OV5640的DataSheet来进一步配置,这些就是需要花时间去一个一个调试,才能调试出最佳的成像效果了!

祝各位调试顺利!!!

OV5640调试资料链接:https://download.csdn.net/download/weixin_41586634/13987079

你可能感兴趣的:(通信协议大家庭,OV5640,MIPI,摄像头调试,寄存器配置,上电时序)