i.mx6ul CSI receive interlace ccir656 video issue

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

i.mx6ul CSI receive interlace ccir656 video issue

4,229 Views
frank_chiang
Contributor II

hi guys,

Now I'm developing a project based on imx6ul and using csi driver example from SDK not linux version. My hardware looks like below illustration.

analog camera -> TW9900(ccir656 720x480 out) -> imx6ul csi -> imx6 pxp  -> ch7026 -> cvbs out

I already verified this path "imx6 pxp  -> ch7026 -> cvbs out" by inputting fixed color array data and it works fine.

Image 4.png

But when I use CSI function to get video data from tw9900 connecting with an analog camera, cvbs out can't show stable video on the monitor as below.

Image 1.png

I check with TW9900 FAE, he feedbacks me below information

ITU-R BT.656 for the 525-line system has 244 video active lines

in odd field and 243 video active lines in even field.

TW9900 doesn’t do any de-interlacing and its output is interlaced.

I also check CSI example code from SDK, it mentions below.

Image 6.png

CSI work mode: The CCIR656 interlace mode is not supported currently.:smileycry:

How can I solve this issue?

TW9900 only outputs interlace mode but imx6 doesn't support interlace mode.

Does anyone know how to setting interlace mode on imx6 CSI function?

Tags (1)
8 Replies

2,642 Views
dh29
Contributor IV

Hi Frank,

Did you manage to get the interlaced video input working? I am using the ADV7280M with an iMX7 (doesn't have an IPU) and have reached a similar issue. I can get a stable image using a PAL camera input, but only when CCIR is NOT enabled. The problem is that I get 2 images, one on top of each other, due to the interlaced video. When I try and enable CCIR / Interlaced mode everything stops and I can't capture anything.

0 Kudos

2,642 Views
igorpadykov
NXP Employee
NXP Employee

Hi frank

I am not aware of non-linux CSI CCIR656 interlace mode examples,

in general one can check description in Reference Manual of

CSI_CSICR18 bit BIT_DEINTERLACE_EN, setting stride
DEINTERLACE_STRIDE register CSI_CSIFBUF_PARA, and can look at
driver sorces in linux/drivers/media/platform/mxc/subdev/mx6s_capture.c

mx6s_capture.c\subdev\mxc\platform\media\drivers - linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,642 Views
frank_chiang
Contributor II

Hi Igorpadykov,

It's mention of deinterlacing function in the specification as below.

pastedImage_1.png

pastedImage_1.png

So I think just need setting some registers. But I totally have not idea how to do it.

0 Kudos

2,642 Views
igorpadykov
NXP Employee
NXP Employee

Hi frank

had you tried ADV7180 patch.

Unfortunately I am not aware of additional documentation for CSI

deinterlacing registers.

Best regards
igor

0 Kudos

2,642 Views
frank_chiang
Contributor II

hi igorpadykov

Yes, I have tried the ADV7180 patch to use the different settings on my platform.

I find out some confusing registers setting as below. But I can't get more information about this register.

Where can I get more information about register setting?

pastedImage_1.png

0 Kudos

2,642 Views
frank_chiang
Contributor II

Hi igorpadykov,

I try to set some bits as below. But it still doesn't work. 

BTW, TW9900 uses 27MHz external crystal. Originally EVB uses OV5640 and it use24MHz.

Do you have any idea how solve this issue?

1. CSI_CSICR1

bit27 => 1

pastedImage_1.png

2. CSI_CSIFBBUF_PARA

bit 31-16 : (720*2) / 8 

bit 15-0 :  (720*2) / 8

pastedImage_2.png

3.CSI_CSICR18

bit2 : 1

pastedImage_1.png

0 Kudos

2,116 Views
hoanganh
Contributor III

@frank_chiang 

I had success capture video interlaced ccir656. But how to control imx6 pxp to  output analog video like your image?

Thanks

0 Kudos

2,642 Views
Danube
Contributor IV

Hi Igorpadykov,

WE had check this patch code

https://community.nxp.com/servlet/JiveServlet/download/938610-1-408901/0001-Enable-CSI-support-BT656... 

WE know ADV7180 is work in interlace mode.

But we don't seet bit27 set to 1 in CSI_CSICR1 REG

Does any CCIR656 interlace step by step guide ?

0 Kudos