MIPI CSI2 Can not Receive Sensor Clock (IMX290 Camera)

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

MIPI CSI2 Can not Receive Sensor Clock (IMX290 Camera)

3,096 Views
mustafabakircio
Contributor IV

Hello;

I have been working on imx290 mipi csi2 camera driver on IMX6Q processor Wandboard Quad. I have faced with a problem. The program can start i2c communication with i2c_master_send(); function in my driver. Screenshot from 2017-10-05 14-29-52.png

Right now I am getting  return value 3 from this function before it I was taking -5 (which is errno ) , so I fixed it. But  right now I am getting "mipi csi2 can not receive sensor clk" problem. I checked the D-PHY Status , it is mipi_reg =0x6F0 when we waiting to the mipi clock stabilized , it is not stabilized. When I check the mipi_csi2_get_error1(mipi_csi2_info); is 0x0. How can I check if the status is wrong or right I dont know how to calculate the value. And what could be the reason of this  "mipi csi2 can not receive sensor clock! " error. Screenshot from 2017-10-05 15-16-17.png

Thanks.

0 Kudos
5 Replies

1,256 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mustafa

one can check clock presence with oscilloscope and follow 

"Debug steps for customer MIPI sensor" for possible clock frequency change
Debug steps for customer MIPI sensor.docx 

please also look at AN5305 MIPI-CSI2 Peripheral on i.MX6 MPU
http://cache.nxp.com/files/32bit/doc/app_note/AN5305.pdf

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

1,256 Views
mustafabakircio
Contributor IV

hello igorpadykov thanks for your reply;

I checked the AN5305 MIPI-CSI2 Peripheral on i.MX6 MPU datasheet and mipi steps but I couldnt find any solution on these documents . I have question about AN5305 document and d-phy status/ clock.

 

1. Why d-phy csi2 phy state is change  and what thats mean ? fisrt I got 0x6f0 then I made simple change on code then I got 0x200 . What is the reason ? and what this status value means?

 

2. According to the AN5305 document MIPI clock is going from imx6q to mipi camera sensor. I made my calculation and made the  mipi_csi2_write(info, 0x00000028, MIPI_CSI2_PHY_TST_CTRL1); like this. According to the document sensor clock and d-phy clock should match. So Did I make my calculation wrong or should I change the mipi clock or other things as seen in image below.Screenshot from 2017-10-07 14-57-25.png

I checked the camera sensor clock it generates 37.125 mhz clock inside but I didnt understand what would it be the reason that I can't the clock rate from mipi csi-2 interface

 

Thanks.

0 Kudos

1,256 Views
mustafabakircio
Contributor IV

All the things are written at IMX6QDL datasheet ,the meanings of mipi dphy status value and other things .But my 2. question is still valid :smileyhappy: .

Thanks

0 Kudos

1,256 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mustafa

had you checked that correct power-up sequence was performed
described on p.6 imx290 datasheet and master clock INCK is present :
https://www.leopardimaging.com/uploads/LI-IMX290-MIPI_datasheet.pdf

Best regards
igor

0 Kudos

1,256 Views
mustafabakircio
Contributor IV

Hello;igorpadykov Yes I wrote the code depending on this sequence . The all register and etc values are written in the code according to the datasheets. After I got the pozitive return  value from the imx290_write_reg  function , "retval=imx290_write_reg(Register address,value); " I pass the register address and its value from i2c. Everything is look like working good. But I couldnt pass the "mipi csi2 cannot receive the sensor clk! " error. It would be because of that I used ov5640_mipi.c driver as a referance (like using same functions but changed the value and modified it depending on the  IMX290 technical datasheets).

0 Kudos