i.MX6 + 摄像头AR0330 = 车牌识别系统,欢迎各位大牛拍砖!

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX6 + 摄像头AR0330 = 车牌识别系统,欢迎各位大牛拍砖!

Jump to solution
1,238 Views
Contributor I

    OK,废话不多说,项目名字就是车牌识别系统.

    框图如下:

艾科1.jpg

  公司采用两组方案同时进行,性能比拼,那个方案好,最终产品就用哪一个!!!:smileysilly::smileysilly:

   目前“敌人”用的是TI的方案,使用DSP来做处理,看重它的数字信号的处理能力,现在的问题是——摄像头驱动不起来,:heart:gaga...这不是我们的方案凸显其强大的优势就显示出来了吗?:smileycool::smileycool:

艾科.jpg

目前我们用的方案是i.MX6 + 摄像头AR0300的方案进行:smileycool:,与DSP方案的区别就是在于这个主控上!系统移植OK,WIFI移植OK,现在。。。调了好久好久的摄像头还是驱动不起来, AR0330驱动不起来了整个事情就挂了,what the story?!

各位大牛,有木有用i.MX驱动AR0330的方案啊?提供点思路

Labels (2)
0 Kudos
1 Solution
105 Views
NXP Employee
NXP Employee

你可以参考“/drivers/media/video/mxc/capture/ov5640_mipi.c”实现一个ar0330的驱动,需要注意的以下设置:

1.

static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p)
{
        if (s == NULL) {
                pr_err("   ERROR!! no slave device set!\n");
                return -1;
        }

        memset(p, 0, sizeof(*p));
        p->u.bt656.clock_curr = 0;
        p->if_type = V4L2_IF_TYPE_BT656;
        p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT;

        p->u.bt656.bt_sync_correct = 1;  /* Indicate external vsync */

        return 0;
}

2. IOMUXC_GPR13(iMX6S/DL)或IOMUXC_GPR1(iMX6D/Q), MIPI映射到那个virtual channel。

3. MIPI clock设置,mipi_csi2_reset(), drivers\mxc\mipi\mxc_mipi_csi2.c

  mipi_csi2_write(info, 0x00000014, MIPI_CSI2_PHY_TST_CTRL1);

//  950-1000MHz :0x74   //999Mhz

//  900-950Mhz  :0x54   //972Mhz

//  850-900Mhz  :0x34   //900Mhz

//  800-850MHz  :0x14   //849Mhz

//  750-800MHz  :0x32   //783Mhz

//  700-750Mhz  :0x12   //750Mzh

//  650-700Mhz  :0x30   //699Mhz

//  600-650MHz  :0x10   //648Mhz

//  550-600MHz  :0x2e   //600Mhz

//  500-550Mhz  :0x0e   //549Mhz

//  450-500Mhz  :0x2c   //486Mhz

//  400-450MHz  :0x0c   //450Mhz

//  360-400MHz  :0x4a   //399Mhz

//  330-360Mhz  :0x2a   //360Mhz

//  300-330Mhz  :0x48   //330Mhz

//  270-300MHz  :0x28   //300Mhz

//  250-270MHz  :0x08   //270Mhz

//  240-250Mhz  :0x46   //249Mhz

//  210-240Mhz  :0x26   //240Mhz

//  200-210MHz  :0x06   //210Mhz

//  180-200MHz  :0x44   //198Mhz

//  160-180Mhz  :0x24   //180Mhz

//  150-160MHz  :0x04   //159Mhz

//  140-150MHz  :0x42   //150Mhz

//  125-140MHz  :0x22  //135Mhz

//  110-125MHz  :0x02  //123Mhz

//  100-110Mhz  :0x40  //108Mhz

//  90-100Mhz  :0x20  //99Mhz

// 80-90Mhz :0x00 //90Mhz (default)

View solution in original post

0 Kudos
2 Replies
105 Views
Senior Contributor IV

Weiwu, if your questions have been answered please close the DI by clicking Correct Answer button, otherwise please keep exchanging your comment here.

Thanks,

Yixing

0 Kudos
106 Views
NXP Employee
NXP Employee

你可以参考“/drivers/media/video/mxc/capture/ov5640_mipi.c”实现一个ar0330的驱动,需要注意的以下设置:

1.

static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p)
{
        if (s == NULL) {
                pr_err("   ERROR!! no slave device set!\n");
                return -1;
        }

        memset(p, 0, sizeof(*p));
        p->u.bt656.clock_curr = 0;
        p->if_type = V4L2_IF_TYPE_BT656;
        p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT;

        p->u.bt656.bt_sync_correct = 1;  /* Indicate external vsync */

        return 0;
}

2. IOMUXC_GPR13(iMX6S/DL)或IOMUXC_GPR1(iMX6D/Q), MIPI映射到那个virtual channel。

3. MIPI clock设置,mipi_csi2_reset(), drivers\mxc\mipi\mxc_mipi_csi2.c

  mipi_csi2_write(info, 0x00000014, MIPI_CSI2_PHY_TST_CTRL1);

//  950-1000MHz :0x74   //999Mhz

//  900-950Mhz  :0x54   //972Mhz

//  850-900Mhz  :0x34   //900Mhz

//  800-850MHz  :0x14   //849Mhz

//  750-800MHz  :0x32   //783Mhz

//  700-750Mhz  :0x12   //750Mzh

//  650-700Mhz  :0x30   //699Mhz

//  600-650MHz  :0x10   //648Mhz

//  550-600MHz  :0x2e   //600Mhz

//  500-550Mhz  :0x0e   //549Mhz

//  450-500Mhz  :0x2c   //486Mhz

//  400-450MHz  :0x0c   //450Mhz

//  360-400MHz  :0x4a   //399Mhz

//  330-360Mhz  :0x2a   //360Mhz

//  300-330Mhz  :0x48   //330Mhz

//  270-300MHz  :0x28   //300Mhz

//  250-270MHz  :0x08   //270Mhz

//  240-250Mhz  :0x46   //249Mhz

//  210-240Mhz  :0x26   //240Mhz

//  200-210MHz  :0x06   //210Mhz

//  180-200MHz  :0x44   //198Mhz

//  160-180Mhz  :0x24   //180Mhz

//  150-160MHz  :0x04   //159Mhz

//  140-150MHz  :0x42   //150Mhz

//  125-140MHz  :0x22  //135Mhz

//  110-125MHz  :0x02  //123Mhz

//  100-110Mhz  :0x40  //108Mhz

//  90-100Mhz  :0x20  //99Mhz

// 80-90Mhz :0x00 //90Mhz (default)

View solution in original post

0 Kudos