cancel
Showing results for 
Search instead for 
Did you mean: 

Struggling to get IMX219 (RPi Camera) working on STM32N6-Nucleo - No Image

Ozgur1Muhendis
Associate

Hi everyone,

I am a junior engineer trying to learn the new STM32N6 (Nucleo-N657X0) board. My goal is to do some basic computer vision, and I am trying to interface it with a Raspberry Pi Camera Module V2 (Sony IMX219).

To be honest, I am a bit overwhelmed by the complexity of the MIPI CSI-2 and DCMIPP settings, and I’m stuck. I’ve been trying to debug this for days but I can't get any image data.

Here is what I have:

  • Board: STM32N657X0H3Q Nucleo

  • Camera: Standard RPi Camera V2 (IMX219). It has its own crystal (X1) on the back, so I assume I don't need to generate a clock (MCO) from the STM32, but I'm not 100% sure if that's enough.

  • I2C Works: I can read the Chip ID (0x0219) via I2C, so the connections seem okay.

The Problem: I configured CubeMX with 2 Lanes, 950 Mbps PHY Bitrate, and RawBayer10 format. But when I run the code, HAL_DCMIPP_PIPE_GetState is always BUSY or failing.

I am getting these random error codes in hdcmipp.ErrorCode every time I reset and try again. I don't know what they mean exactly, but they look inconsistent: 1040, 262144, 1032, 33800, 1288...

My Doubts & Questions:

  1. Is this camera compatible? I read that N6 supports up to 5MP, but this camera is 8MP. Does this completely block me from getting any image, or should I be able to get a cropped/smaller image?

  2. Configuration: I am really not sure about the PHY Bitrate and Pixel Packer settings. Since there is no example for IMX219 in the repository, I tried to guess the settings but failed. If anyone has a working configuration struct or a simple code snippet for the IMX219 on this MCU, could you please share it? It would be a lifesaver.

  3. Hardware: Should I keep trying with this camera, or is it better to switch to something else? I see people using Arducam IMX335 or ST's own modules. As a beginner, I don't want to fight with driver issues if the hardware is just not compatible.

I would be very slightly if anyone has a working setup or advice for a beginner on how to debug this.

Thank you in advance.

0 REPLIES 0