AnsweredAssumed Answered

OV7740 camera on I.MX6 using CSI0 in BT.656 mode

Question asked by Robert Lim on Aug 12, 2014
Latest reply on Jul 31, 2015 by Thomas Quartier

I am using an imx.6 Sabrelite (PN:BD-S1-imx6) from BoundaryDevices to develop a camera system. The camera sensor is the ov7740 from omnivision, attached to Sabrelite via CSI0 (8 data lines, pixelclock and camera system clock). As I do not have the possibility to connect the hsync and vsync signal this all has to work in BT.656 mode.


I am having issue getting images from the driver. The video for linux drivers hangs waiting for data and after a timeout breaks down the video4 linux pipeline.


The steps I have taken so far:


  1. Started with working kernel (boundary-imx_3.10.17_1.0.0_beta) and
  2. Made sure that the camera is detected and can be configured over I2C.
  3. Built a driver, OV7740.c, based on OV5642.c with the following changes:
    1. Replaced modes  to generate a 640x480 30 fps data on the OV7740     
    2. Changed the chip_id     
    3. Changed ov7740_data.pix.pixelformat to V4L2_PIX_FMT_YVU420     
    4. Added V4L2 required IOCTL functions


  1. Sensor is correctly detected on I2C
  2. PCLK and XCLK are correct
  3. Use tool: mxc_v4l2_capture.out and gstreamer to try to capture sensor data


The test encounter DQBUF failed during capturing, the error is as follow:

ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0 VIDIOC_DQBUF failed.


When trying to decipher the video for linux kernel module, it seems that this occurs when the data queue hasn't been filled until a certain timeout. The queue should be filled through the CSI interrupt handler. As I can see it now, it seems that the interrupt is never raised.


I have taken the following link which have similar problem using BT656 mode to capture in progressive mode as a reference:


For more info, below summarize our setting and dumped info to get the CSI BT656 without HSYNC/VSYNC working:

  1. function ioctl_g_ifparm() sets p->u.bt656.bt_sync_correct = 0:
  2. modify the code in mxc_v4l2_s_param(), let csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE
  3. The CSI0 connects parallel, IOMUXC_GPR1 = 0x48693005 and IPU_CONF = 0x00000785




I think this is due to the CSI/IPU not setup properly for BT.656 mode without hsync/vsync signals. Please give some support on how to configure the CSI/IPU with this camera?

Thanks in advance.