本帖最后由 xq 于 2022-7-22 10:27 编辑
大家好,我在调试ov5640遇到如下图的异常,显示的颜色和尺寸都有问题,尺寸变成屏幕的1/4,请教下这样的现象一般是什么地方出了问题?
调试ov5640之前,液晶显示功能是确认正常的,液晶的分辨率是720 * 720;
把正点原子的出厂liunx内核源码中 drivers/media/platform/mxc 文件夹复制到我按开发手册移植好的内核源码;
将drivers/media/platform/mxc/subdev/ov5640.c文件添加720 * 720屏幕显示的寄存器配置文件,也是复制原子ov5640_setting_30fps_ATK_1024_600的寄存器内容,改了0x3808~0x380b,具体如下:
static struct reg_value ov5640_setting_30fps_XUQ_720_720[] = {
{0x3c07, 0x08, 0, 0}, {0x3820, 0x47, 0, 0}, {0x3821, 0x07, 0, 0},
{0x3814, 0x31, 0, 0}, {0x3815, 0x31, 0, 0}, //
{0x3800, 0x00, 0, 0}, {0x3801, 0x60, 0, 0}, // 96 X-start
{0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, // 4 Y-start
{0x3804, 0x09, 0, 0}, {0x3805, 0x7e, 0, 0}, // 2430 X-end
{0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0}, // 1947 Y-end
{0x3808, 0x02, 0, 0}, {0x3809, 0xd0, 0, 0}, // 720 X-size
{0x380a, 0x02, 0, 0}, {0x380b, 0xd0, 0, 0}, // 720 Y-size
{0x380c, 0x07, 0, 0}, {0x380d, 0x68, 0, 0}, // 1896
{0x380e, 0x03, 0, 0}, {0x380f, 0xd8, 0, 0}, // 984
{0x3813, 0x06, 0, 0},
{0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0},
{0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x0b, 0, 0},
{0x3a03, 0x88, 0, 0}, {0x3a14, 0x0b, 0, 0}, {0x3a15, 0x88, 0, 0},
{0x4004, 0x02, 0, 0}, {0x3002, 0x1c, 0, 0}, {0x3006, 0xc3, 0, 0},
{0x4713, 0x03, 0, 0}, {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0},
{0x460c, 0x22, 0, 0}, {0x4837, 0x22, 0, 0}, {0x3824, 0x02, 0, 0},
{0x5001, 0xa3, 0, 0}, {0x3034, 0x1a, 0, 0},
{0x3035, 0x11, 0, 0},
{0x3036, 0x46, 0, 0},
{0x3037, 0x13, 0, 0},
};
linux应用程序直接用原子提供的v4l2_camera例程
|