cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 IMX219 camera

EmbeddedChris
Associate II

Hello,

I'm trying to port the ST IMX335 camera driver middleware to work with the RPi 2 IMX219. Everything works well with the IMX335, however after adjusting to reflect the IMX219 registers I get no image data and a Lane 0& 1 control error flag as soon as I enable streaming.

I've switched to using Dump Pipe 0 and reduced the CSI speed but it made no difference.

I'm using binning and a reduced ROI to reduce the amount of data coming off the camera. 

Has anyone has a similar issue?

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

 

Hello @EmbeddedChris ;

 

What CSI speed are you using? 

First of all, I recommend you to verify the I2C communication with the IMX219 sensor.

In the case of STM32N6, and according page 82 of the IMX219 datasheet table "clock setting example", only the 3rd column is relevant since STM32N6 supports 1 or 2 data lanes but not 4. In that case the D-PHY bitrate has to be set to 912 Mbps. In the case of IMX219, 912 Mbps is the maximum you can get from the sensor and on 2 lanes. With 912 Mbps, clk_byte is 114 MHz 

KDJEM1_0-1757932566514.png

 

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
KDJEM.1
ST Employee

 

Hello @EmbeddedChris ;

 

What CSI speed are you using? 

First of all, I recommend you to verify the I2C communication with the IMX219 sensor.

In the case of STM32N6, and according page 82 of the IMX219 datasheet table "clock setting example", only the 3rd column is relevant since STM32N6 supports 1 or 2 data lanes but not 4. In that case the D-PHY bitrate has to be set to 912 Mbps. In the case of IMX219, 912 Mbps is the maximum you can get from the sensor and on 2 lanes. With 912 Mbps, clk_byte is 114 MHz 

KDJEM1_0-1757932566514.png

 

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

sammy8128
Associate

Hi,

I am also in the process of using the IMX219 camera with the N6 demo board, but so far I’ve had no success communicating with the camera over I2C. Does the IMX335 use the same I2C address (0x10)? Would you be able to share the minimal changes required to get the sensor communicating over I2C?

Thank you!

Hi Sammy8128,

The I2C address is 0x10, but in the code it should be written as 0x20 to account for the 7-bit shifting. I based my initial I2C comms on this https://forum.arduino.cc/t/raspberry-pi-camera-v2-1/538817/6 which is reverse engineered from the Raspberry Pi.

Hi @EmbeddedChris ,

 

Thank you so much for sharing this information. It’s really helpful especially the register settings. I managed to get it working, and I was having a difficult time with the resolution register map settings, so the link you provided was very helpful.

Thanks again!