MXC_V4L2 failure withour error

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

MXC_V4L2 failure withour error

694 Views
alexisfronteau
Contributor III

Hi,

I am currently developing a camera with a Video Sensor + FPGA + IMX6Q with linux 3.14.52 on it.

I wrote a program to acquire images and it often succeed but sometimes (~1/10) I have no v4l2 buffer filled... it seems that the problem is on imx6 cause it appears even if i do not restart FPGA. I have no error, it acts like if there was no image received but I know the FPGA send ones. I use a MIPI connection. If I run the same simple program that just initialize v4l2 device multiple times, it will happens sometimes but works fine before and after, so I think the porblem is during v4l2 device intialization, maybe a scheduling isssue.

Thanks for your reply,

Labels (3)
0 Kudos
3 Replies

607 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Alexis,

Generally, programming a V4L2 device consists of these steps:
− Opening the device
− Changing device properties, selecting a video and audio input, video standard, picture brightness, etc.
− Negotiating a data format
− Negotiating an input/output method
− Executing the actual input/output loop
− Closing the device

Please check Chapter 9 Video for Linux Two (V4L2) Driver attached Linux Manual and presentation on

A Deep Dive into Image Processing for i.MX 6 Se... | NXP Community 

Regards

0 Kudos

607 Views
alexisfronteau
Contributor III

Hi, thanks for the reply.

I have already program the v4l2 device and read the documentation that you linked.

It works most of the time but sometimes it does not. I suspect the v4l2 device opening cause I let run the fpga+sensor system and it continuoulsy acquire images. I have writting a test program that first initialize the v4l2 device, then start & stop stream during few times and repeat this action 5 times and then shutdown the v4l2 device. I repeat this actions several times and most of the time it works (I can start & stop stream multiplte times and still work) but sometimes it does not (and the multiple times I start and stop stream, it never works that's why I suspect the initialization). I have no error with ioctls that I use and I always use the same initialization.

0 Kudos

607 Views
alexisfronteau
Contributor III

Hi, 

it seems that the problem occurs more often when I launch another program concurrently that use an uart to comunicate with a sensor. I don't know if it is related inside the kernel or if an interrupt may disturb the v4l2 driver.

Regards,

0 Kudos