Skip to main content
Graduate
February 17, 2025
Question

STM32N6 CSI Interface with Raspberry Pi Camera Module 2 NoIR

  • February 17, 2025
  • 7 replies
  • 2567 views

Hello,

Is there any chance ST could provide examples or guidance on interfacing a CSI (MIPI) camera with Raspberry Pi Camera Module 2 NoIR cameras?

From my initial research, it seems the CSI connector uses the same pin layout as Raspberry Pi cameras. However, available examples are quite limited, making it challenging to implement this on my own — especially compared to the simplicity of working with DCMI.

Any documentation, sample code, or community insights would be greatly appreciated!

Thank you.

LinasL_0-1739781451488.png

LinasL_1-1739781596267.png

With best regards,
Linas

    This topic has been closed for replies.

    7 replies

    ST Employee
    February 17, 2025

    Hello,

    The N6 STM32Cube firmware ships with some examples for the N6 discovery kit that might be of interest.

    If you have CubeMX 6.13 and have downloaded the firmware for N6 through there i would suggest looking at that. They can be found at:

    C:\Users\<your_user>\STM32Cube\Repository\STM32Cube_FW_N6_V1.0.0\Projects\STM32N6570-DK\Applications\DCMIPP

    There are two examples, one for continous view and one for snapshots.

    Let me know if that is of any use :)

    Linas LAuthor
    Graduate
    February 18, 2025

    I will try to do that, but problem is I can't do any measurements on data signals, so everything needs to be made in blind. Also where are tons of registers that I need to get access ( to explanation of registers and also set everything correctly, so it would work with STM32N6) , and it is hard for individuals to get this information.

    I would think this example would be quite useful for all STM32 community.

    ST Employee
    February 18, 2025

    Hello,

    If you can get a data sheet for the sensor on your camera, there may be values provided for the parameters set in the two example projects. you may also be able to figure out how it is configured and used in Linux and convert that to something that works in the example projects.

    ST supplies a camera module with the STM32N6570-DK, I don't think there are plans to provide examples for other camera hardware at this time.

    September 8, 2025

    Hello Linas, 

    Did you manage to get this working? I'm also trying to get the Raspberry pi Camera working and having the same issue as you. 

    Thanks,

    Chris

    Linas LAuthor
    Graduate
    September 17, 2025

    Camera that was I interested to work with STM32N6 was not good match for my application, so I dropped this testing.

    I am having hard time with STM32N6 even for debugging, it's just so many extra steps and so far i was unable to blink even LED... I am using EWARM as my IDE

    September 23, 2025

    Hi Linas,

    Thanks for your reply. I was able to get the camera working with help from ST https://community.st.com/t5/stm32-mcus-products/stm32n6-imx219/m-p/839041#M285731

    The STM32N6 is difficult to work with. I switched from EWARM to CubeIDE but still encountered issues. I did find that not all of the internal memories are enabled after reset, which caused numerous programming and debugging issues. Could you be having the same issue?

    ST Employee
    September 23, 2025

    The STM32N6 is difficult to work with. I switched from EWARM to CubeIDE but still encountered issues. I did find that not all of the internal memories are enabled after reset, which caused numerous programming and debugging issues. Could you be having the same issue?


    I believe that is a clocking issue - try setting your external memories to be clocked from HCLK in CubeMX.

    There is a guide to setting up debugging i CubeIDE here: How to debug STM32N6 using STM32CubeIDE - STMicroelectronics Community

    Linas LAuthor
    Graduate
    September 23, 2025

    It would be nice is EWARM example is made, since for this day, I was unable to make let toggle...

    September 24, 2025

    Sorry to say but I was unable to debug anything on EWARM despite updating to the latest version of the IDE and installing the N6 patches. Not even the ST examples would work because it didn't like the external loader. The examples seemed to run okay in CubeIDE though.  

    ST Employee
    September 25, 2025

    Did you follow the guide in the link I posted earlier?

    In any case, the problem with trying to break at main() is that the symbols for the application are not loaded when you start the debugging session from the FSBL. I'm not sure when that happens when using the guide I posted earlier, but you should be able to break in the debugger just before entering the application (i think he sets it up to do that in the guide), and then add your break point in main. Otherwise, you can step into the application, an then set your breakpoint at that point.

    You can also try downloading TouchGFX and looking at the board setup for N6 there - it incorporates some of the same concepts as described in the guide, but implemented differently. You should be able to remove TouchGFX from the project using CubeMX (and removing some references in the .extsettings file) if you're not interested in using that.

    Visitor II
    October 3, 2025

    Hi @Linas L  Can you please help me understand how you connected Raspberry Pi Camera Module 2 NoIR to STM32N6 eval board, as Raspberry Pi Camera Module 2 NoIR has 15pin but STM32N6 board has 22pin

     

     

    Saeid_0-1759460869640.png

    Saeid_1-1759460869836.png

     

    Linas LAuthor
    Graduate
    October 3, 2025

    Simple.

    Pi5 has special cable for this. You can buy it in mouser/digikey. Since just like pi zero, pi5 use same 0.5mm pitch connector on pcb

    Visitor II
    October 3, 2025

    Wow nice! Thanks Linas for sharing this.

    can you please share Digiky/Mouser link that I can buy ? 
    In this cable, the VCC from pin# 15  has been mapped to pin#22 ,right?