Can't configure CSI0 acquisition on imx6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't configure CSI0 acquisition on imx6

Jump to solution
2,615 Views
christophe
Contributor V

Hi,

On a board with an imx6d, a 8 bits UYVY parallel camera device is connected to csi0 port with Hsync/Vsync gated mode. Device has 1940x745 resolution and a 148 MHz independant pixclk. Only 1280x720 pixels are captured. The capture is done with v4l2 functions. Capture operation seems to be correctly set up. Capture can be stopped and restarted at wish. Though, a error is message is continuously displayed into the console, and no video stream coming out.

uboot and kernel are based on Sabresd board.

Tha capture sequence:

ipu_csi_set_window_pos

ipu_csi_init_interface                fmt=0x56595559   ipu=9437696    csi= 0

ipu_csi_mclk_set

ipu_csi_init_interface               GATED

ipu_csi_get_sensor_protocol ipu    channel=-2140354660   csi =0

ipu_smfc_init channel              channel=0xfffffc0  csi=0

ipu_csi_init channel                 channel=268435392  csi=0

ipu_csi_init                                 DEST_IDMAC

ipu_csi_init channel

ipu_smfc_set_burst_size        channel=268435392  bs=7

Registers during capture:

CSI_SENS_CONF                = 0x4008900
CSI_SENS_FRM_SIZE         = 0x2e80793
CSI_OUT_FRM_CTRL          = 0x0
CSI_ACT_FRM_SIZE          = 0x2cf04ff
CSI_OUT_FRM_CTRL          = 0x0
CSI_SKIP                              = 0x0
SMFC_MAP                            = 0x0
SMFC_BS                             = 0x7
IC_PRP_ENC_RSC            = 0x0
IC_PRP_VF_RSC              = 0x0
IC_PP_RSC                         = 0x0
IPU_CONF                            = 0x660

And the errors messages:

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_5 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_5 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_5 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_5 = 0x00000001

imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00000001

.......................................................................................................

...............

IPU_INT_STAT_10 = 0x00000001 means SMFC1_FRM_LOST, but system clocks haven't been modified and Ipu clock is the same than ipu1_hsp clock = 264 MHz, that is correct in front of a 148 MHz pixclk.

So, i don't see that's the trouble. Could you help?

Regards,

Christophe.

CSI_SENS_CONF     = 0x4008900

Labels (2)
0 Kudos
Reply
1 Solution
937 Views
christophe
Contributor V

dqbuf functions were not correctly called.

Issue is solved.

View solution in original post

0 Kudos
Reply
3 Replies
937 Views
christophe
Contributor V

I've made a mistake:  IPU_INT_STAT_10 = 0x00000001 means SMFC0_FRM_LOST and not SMFC1_FRM_LOST.

A frame is lost on smfc channel 0.

IPU_INT_STAT_5 = 0x00000001   ==> IDMAC_NFB4EOF_ERR_0

A new frame arrived before the one be transfered.

The issue seems clear but not the solution and the root cause.

0 Kudos
Reply
938 Views
christophe
Contributor V

dqbuf functions were not correctly called.

Issue is solved.

0 Kudos
Reply
937 Views
mcergun
Contributor III

what do you mean by that?

0 Kudos
Reply