x-cube-n6-camera-capture Application
February 2, 2026 ยท View on GitHub
Computer Vision application to capture video stream using USB UVC on the STM32N6570-DK or NUCLEO-N657X0-Q board.
Streamed video format can be dynamically selected among :
- 224x224 YUV422 at 30 frames per second
- 256x256 YUV422 at 30 frames per second
- 480x480 YUV422 at 30 frames per second
- 640x480 YUV422 at 30 frames per second
- 800x480 YUV422 at 30 frames per second
Doc Folder Content
Features Demonstrated in This Example
- Multi-threaded application flow (FreeRTOS)
- DCMIPP crop, decimation, downscale
- DCMIPP ISP usage
- USB UVC (Azure RTOS USBX)
Package Content
This package contains in the Binary directory ready-to-flash Intel hex files for STM32N6570-DK and NUCLEO-N657X0-Q platforms.
For each platform, there are two binary flavors:
- front: It's a selfie-like orientation.
- rear: It's a camera-like orientation.
Hardware Support
Supported development platforms:
- STM32N6570-DK Discovery Board
- Connect to the onboard ST-LINK debug adapter (CN6) using a USB-C to USB-C cable for sufficient power.
- An additional USB cable to connect USB1 (CN18) to the host computer for UVC streaming.
- OTP fuses are configured for xSPI IOs to achieve maximum speed (200MHz) on xSPI interfaces.
- NUCLEO-N657X0-Q Nucleo Board
- Connect to the onboard ST-LINK debug adapter (CN10) using a USB-C to USB-C cable for sufficient power.
- An additional USB cable to connect USB1 (CN8) to the host computer for UVC streaming.
- OTP fuses are configured for xSPI IOs to achieve maximum speed (200MHz) on xSPI interfaces.
STM32N6570-DK board with MB1854B IMX335.
NUCLEO-N657X0-Q board with MB1854B IMX335.
Supported camera modules:
- IMX335 camera module
- STEVAL-55G1MBI
- STEVAL-66GYMAI1
- STEVAL-1943-MC1
Tools Version
- IAR Embedded Workbench for Arm (EWARM 9.40.1) + N6 patch (EWARMv9_STM32N6xx_V1.0.0)
- STM32CubeIDE (v1.17.0)
- STM32CubeProgrammer (v2.18.0)
Boot Modes
The STM32N6 series does not have internal flash memory. To retain firmware after a reboot, program it into the external flash. Alternatively, you can load firmware directly into SRAM (development mode), but note that the program will be lost if the board is powered off in this mode.
Development Mode: used for loading firmware into RAM during a debug session or for programming firmware into external flash.
Boot from Flash: used to boot firmware from external flash.
| STM32N6570-DK | NUCLEO-N657X0-Q | |
|---|---|---|
| Boot from flash | ![]() | ![]() |
| Development mode | ![]() | ![]() |
Console parameters
You can see application messages by attaching a console application to the ST-Link console output. Use the following console parameters:
- Baud rate of 115200 bps.
- No parity.
- One stop bit.
Quickstart Using Prebuilt Binaries
Flash Prebuilt Binaries
STM32N6570-DK
- Set the board to development mode.
- Program either
Binary/STM32N6570-DK/x-cube-n6-camera-capture-front-dk.hexorBinary/STM32N6570-DK/x-cube-n6-camera-capture-rear-dk.hex - Set the board to boot from flash mode.
- Power cycle the board.
- Check that the additional USB cable between USB1 (CN18) and the host computer is connected.
- Launch your favorite webcam application
NUCLEO-N657X0-Q
- Set the board to development mode.
- Program either
Binary/NUCLEO-N657X0-Q/x-cube-n6-camera-capture-front-nucleo.hexorBinary/NUCLEO-N657X0-Q/x-cube-n6-camera-capture-rear-nucleo.hex - Set the board to boot from flash mode.
- Power cycle the board.
- Check that the additional USB cable between USB1 (CN8) and the host computer is connected.
- Launch your favorite webcam application
How to Program Hex Files Using STM32CubeProgrammer UI
See How to Program Hex Files STM32CubeProgrammer.
How to Program Hex Files Using Command Line
Make sure to have the STM32CubeProgrammer bin folder added to your path. Instructions below are for STM32N6570-DK. For NUCLEO-N657X0-Q you have to select one of the two nucleo project according to your use case.
export DKEL="<STM32CubeProgrammer_N6 Install Folder>/bin/ExternalLoader/MX66UW1G45G_STM32N6570-DK.stldr"
# Application Firmware
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -el $DKEL -hardRst -w Binary/STM32N6570-DK/x-cube-n6-camera-capture-front-dk.hex
Quickstart Using Source Code
More information about boot modes is available at Boot Overview.
Application Build and Run - Dev Mode
Set your board to development mode.
Instructions below are for STM32N6570-DK. Select nucleo project for NUCLEO-N657X0-Q.
STM32CubeIDE
Double click on STM32CubeIDE/STM32N6570-DK/.project to open the project in STM32CubeIDE. Build and run with the build and run buttons.
IAR EWARM
Double click on EWARM/STM32N6570-DK/x-cube-n6-camera-capture-dk.eww to open the project in IAR IDE. Build and run with the build and run buttons.
Makefile
Before running the commands below, be sure to have the commands in your PATH.
- Build the project using the provided
Makefile:
make -j8
- Open a GDB server connected to the STM32 target:
ST-LINK_gdbserver -p 61234 -l 1 -d -s -cp <path-to-stm32cubeprogramer-bin-dir> -m 1 -g
- In a separate terminal session, launch a GDB session to load the firmware image into the device memory:
$ arm-none-eabi-gdb build/Project.elf
(gdb) target remote :61234
(gdb) monitor reset
(gdb) load
(gdb) continue
Application Build and Run - Boot from Flash
Set your board to development mode.
Instructions below are for STM32N6570-DK. Select nucleo project for NUCLEO-N657X0-Q.
STM32CubeIDE
Double click on STM32CubeIDE/STM32N6570-DK/.project to open project in STM32CubeIDE. Build with build button.
IAR EWARM
Double click on EWARM/STM32N6570-DK/x-cube-n6-camera-capture-dk.eww to open project in IAR IDE. Build with build button.
Makefile
Before running the commands below, be sure to have them in your PATH.
- Build project using the provided
Makefile:
make -j8
Once your app is built with Makefile, STM32CubeIDE, or EWARM, you must add a signature to the bin file:
STM32_SigningTool_CLI -bin build/Project.bin -nk -t ssbl -hv 2.3 -o build/Project_sign.bin
You can program the signed bin file at the address 0x70000000.
export DKEL="<STM32CubeProgrammer_N6 Install Folder>/bin/ExternalLoader/MX66UW1G45G_STM32N6570-DK.stldr"
# Adapt build path to your IDE
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -el $DKEL -hardRst -w build/Project_sign.bin 0x70000000
Set your board to boot from flash mode and power cycle to boot from external flash.
Known Issues
- Stability issues may occur when changing the stream. Your webcam application may report an error. In that case, restart the camera capture application.



