CSI -> IPU -> MEM retrieve 16 bits RAW DATA

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

CSI -> IPU -> MEM retrieve 16 bits RAW DATA

Jump to solution
1,868 Views
jean-pierrefran
Contributor I

Hello everybody,

My need is to retrieve the RAW data from a custom sensor through the parallel port (CSI). The RAW use 16 bits words. So I have added support of GENERIC_16 mode in the kernel (3.0.35) and V4L.

I used various threads to do the job :

How to Support RGB565 Gated Mode Input to i.MX6 CSI

IPU - bayer pattern conversion

So I can capture data but the data is not complete and every 32 bytes, a wrong value is read. One 8 bit word is always missing.

Here the RAW data I get :

0000000 0000 0200 0400 0600 0800 0a00 0c00 0e00
0000010 1000 1200 1400 1600 1800 1a00 1c00 1e00
0000020 2400 2200 2400 2600 2800 2a00 2c00 2e00

The value in Yellow is a 'bad read'

I expected :

0000000 0001 0203 0405 0607 0c09 0a0b 0c0d 0e0f
0000010 1011 ....

Here are the IPU / CSI registers, and all seems to be fine (I don't use IC, but smfc and IDMAC) :

imx-ipuv3 imx-ipuv3.0: init channel = 15
imx-ipuv3 imx-ipuv3.0: IPU SENS CONF=0400CB00
imx-ipuv3 imx-ipuv3.0: initializing idma ch 0 @ ea8c0000
imx-ipuv3 imx-ipuv3.0: ch 0 word 0 - 00000000 00000000 00000000 E0001800 00077C4F
imx-ipuv3 imx-ipuv3.0: ch 0 word 1 - 032C0000 00658000 00C7C000 00013FC0 00000000
imx-ipuv3 imx-ipuv3.0: PFS 0x6,
imx-ipuv3 imx-ipuv3.0: BPP 0x3,
imx-ipuv3 imx-ipuv3.0: NPB 0x1f
imx-ipuv3 imx-ipuv3.0: FW 639,
imx-ipuv3 imx-ipuv3.0: FH 479,
imx-ipuv3 imx-ipuv3.0: EBA0 0x19600000
imx-ipuv3 imx-ipuv3.0: EBA1 0x19600000
imx-ipuv3 imx-ipuv3.0: Stride 1279
imx-ipuv3 imx-ipuv3.0: scan_order 0
imx-ipuv3 imx-ipuv3.0: uv_stride 0
imx-ipuv3 imx-ipuv3.0: u_offset 0x0
imx-ipuv3 imx-ipuv3.0: v_offset 0x0
imx-ipuv3 imx-ipuv3.0: Width0 0+1,
imx-ipuv3 imx-ipuv3.0: Width1 0+1,
imx-ipuv3 imx-ipuv3.0: Width2 0+1,
imx-ipuv3 imx-ipuv3.0: Width3 0+1,
imx-ipuv3 imx-ipuv3.0: Offset0 0,
imx-ipuv3 imx-ipuv3.0: Offset1 0,
imx-ipuv3 imx-ipuv3.0: Offset2 0,
imx-ipuv3 imx-ipuv3.0: Offset3 0
mxc_streamon: Dump IPU REGISTERS
imx-ipuv3 imx-ipuv3.0: IPU_CONF =     0x00000760
imx-ipuv3 imx-ipuv3.0: IDMAC_CONF =     0x0000002F
imx-ipuv3 imx-ipuv3.0: IDMAC_CHA_EN1 =     0x00800001
imx-ipuv3 imx-ipuv3.0: IDMAC_CHA_EN2 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IDMAC_CHA_PRI1 =     0x18800001
imx-ipuv3 imx-ipuv3.0: IDMAC_CHA_PRI2 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IDMAC_BAND_EN1 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IDMAC_BAND_EN2 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IPU_CHA_DB_MODE_SEL0 =     0x00000001
imx-ipuv3 imx-ipuv3.0: IPU_CHA_DB_MODE_SEL1 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IPU_CHA_TRB_MODE_SEL0 =     0x00800000
imx-ipuv3 imx-ipuv3.0: IPU_CHA_TRB_MODE_SEL1 =     0x00000000
imx-ipuv3 imx-ipuv3.0: DMFC_WR_CHAN =     0x00000090
imx-ipuv3 imx-ipuv3.0: DMFC_WR_CHAN_DEF =     0x202020F6
imx-ipuv3 imx-ipuv3.0: DMFC_DP_CHAN =     0x000096D4
imx-ipuv3 imx-ipuv3.0: DMFC_DP_CHAN_DEF =     0x2020F6F6
imx-ipuv3 imx-ipuv3.0: DMFC_IC_CTRL =     0x00000002
imx-ipuv3 imx-ipuv3.0: IPU_FS_PROC_FLOW1 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IPU_FS_PROC_FLOW2 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IPU_FS_PROC_FLOW3 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IPU_FS_DISP_FLOW1 =     0x00000000
imx-ipuv3 imx-ipuv3.0: IPU_VDIC_VDI_FSIZE =     0x00000000
imx-ipuv3 imx-ipuv3.0: IPU_VDIC_VDI_C =     0x00000000
imx-ipuv3 imx-ipuv3.0: IPU_IC_CONF =     0x00000000

Thanks for any help,

Regards,

Labels (2)
0 Kudos
1 Solution
984 Views
jean-pierrefran
Contributor I

I have solved a part of the problem : 8 pads were not initialized in the IOMUX.

View solution in original post

0 Kudos
3 Replies
985 Views
jean-pierrefran
Contributor I

I have solved a part of the problem : 8 pads were not initialized in the IOMUX.

0 Kudos
984 Views
juanschenini
Contributor II

Hi Jean-Pierre, I'm working on a project to get Bayer values. Could you tell me which files you've changed because I am not getting the raw output?

Thanks.

0 Kudos
984 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Francois,

    good job!

Regards,

Weidong

0 Kudos