2025-12-01 7:34 PM
Hey all,
I have a Sony IMX686 camera module connected to the STM32N6 Discovery Kit, streaming video to the on-board LCD. The sensor outputs a single-stream RAW Bayer format on Virtual Channel 0, and the DCMIPP receives the data correctly — up to a certain horizontal resolution. The issue appears to be related to a bytes-per-line limit within the DCMIPP or its DMA pipeline.
When the IMX686 outputs RAW8, the DCMIPP can only handle horizontal line lengths up to 1552 pixels. If I increase the width beyond 1552 px (e.g., to 1668 px), I begin to see horizontal distortions in the lower portion of the frame. These distortions worsen as the width increases. See the images below.
As the width increases further, the distortion grows and eventually affects most of the frame (shown below).
When switching the sensor to RAW10, the exact same distortion appears, but it goes away when I reduce the horizontal resolution to 1232 pixels. This matches the expected scaling:
1552 * 8 / 10 ≈ 1241 → nearest practical width/alignment is 1232
This makes it look like the system is hitting a maximum bytes-per-line limit that is the same for RAW8 and RAW10.
Additional Notes:
Changing the sensor data rate or PHYBitrate does not affect the distortion.
The number of bytes the sensor outputs per line is fixed; only the active pixel count changes due to digital cropping. The pixels which are cropped out are still sent over but removed during stats removal.
I verified this by disabling:
Decimation
Bad pixel removal
These ISP features do not affect the distortion pattern.
This suggests the corruption (if introduced inside the DCMIPP pipeline), is likely in one of the circled ISP stages shown below .
This behavior strongly suggests a DCMIPP line-buffer or DMA stride/byte-limit issue, where the hardware can accept only around ~1550 bytes per line before corruption begins. The progressive distortion (starting at the bottom and moving upward as width increases) also resembles a buffer overflow or line-stride misalignment.
Any insight on what might be causing this, is there such a line length limit? What buffer might be overflowing here if this is the case?
Thanks :)