cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 DCMIPP Horizontal Distortion Beyond Certain Line Length

bwelte1
Associate II

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.

bwelte1_0-1764644769466.pngbwelte1_1-1764645262542.jpeg

As the width increases further, the distortion grows and eventually affects most of the frame (shown below).

bwelte1_3-1764645353470.png

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 .

bwelte1_5-1764645696861.png

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 :)

 

2 REPLIES 2
Simon V.
ST Employee

Hello,

Can you please share your code source ? It may be relative to output buffer definition and active SRAMs.

It is important that the output buffer size should  correctly size to correctly generate the end of frame and line.

Thanks in advance,

Regards,

Simon

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.

Hey Simon, thanks for the response.

In the end there was a misconfiguration in the IMX686 image sensor. Everything on the DCMIPP side is working great! This issue can now be seen as resolved :).

Thanks again