2025-12-31 3:28 AM
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:
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?
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.
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.
2025-12-31 3:57 AM
Hi @Ozgur1Muhendis ,
I recommend using the official B-CAMS-IMX camera module. It will save both time and cost. If you decide to use a different camera module, make sure the 22-pin FFC is compatible with the Nucleo-N657X0; otherwise, it could damage the board.
Also note that the available code only supports the STM camera module. If you find another camera module that physically fits the Nucleo-N657X0, you will need to implement the driver yourself, which can be very time-consuming to get working.