STM32N6: porting the UVC H.264 hardware demo from EVAL to Nucleo

ST has recently released the STM32N6 family: a high-performance MCU that integrates on a single chip a Cortex-M55 with Helium extensions (128-bit SIMD), a Neural-ART NPU rated at 600 GOPS and 3 TOPS/W, an ISP, hardware media encoders and over 4 MB of internal RAM. It enables products that required two separate chips or a Linux-based SoC: imaging with on-board processing, deterministic, low-power.

For us, it’s interesting because we work on medical imaging with embedded processing, and this is exactly the trajectory we want to follow: bringing classical processing and neural inference into the same MCU, without resorting to Linux. STM32N6 is the first ST chip that makes this plausible.

Why start with a UVC webcam

When a new chip arrives, the temptation is to run a synthetic benchmark — something that exercises a single feature and produces a number. We took the opposite approach: a test setup closer to a real pipeline, even at the cost of not having “clean” numbers to publish.

A UVC webcam touches two of the silicon’s most demanding subsystems: the hardware H.264 encoder and the USB high-speed transport. Both have to work together with serious timing: the encoder must produce compressed frames at a steady rhythm, the USB endpoint must deliver them without losing packets. Upstream, there’s a real sensor connected via MIPI-CSI2, with an ISP that handles debayering and color processing on-chip. Three subsystems talking to each other: if one loses sync, the whole throughput collapses.

Above all, a complete imaging pipeline modifiable to add processing — classical or NPU — is a more reusable base for adding processing than a synthetic benchmark.

The pipeline

The end-to-end flow is linear:

IMX335 → MIPI-CSI2 → ISP → RAM buffer → H.264 HW encoder → USB UVC

Orchestration is zero-copy with DMA, scheduled by FreeRTOS. Raw frames from the sensor arrive in RAM via MIPI-CSI2 and DMA; the ISP processes them in place (debayering, gain, AWB); the hardware H.264 encoder reads from the system buffer and writes the compressed stream into a second buffer; the stream is finally consumed and served as a UVC endpoint to the PC through USBX, the USB stack from Microsoft Azure RTOS integrated into ST CubeMX. No hidden memcpys: each stage writes where the next one reads.

On the silicon, in this demo, we actually use ISP, hardware H.264 encoder and DMA-2D (for block movements in buffer orchestration). NPU and Helium SIMD stay off: they aren’t needed for a webcam, they’re territory for the next phase.

Effective throughput in the current setup: 720p at 100 fps, glass-to-USB latency of about 50 ms, H.264 bitrate of about 3 Mbit/s. These are the numbers of the configuration we used, not the silicon’s limit. The Nucleo has no external PSRAM, so we work entirely within the 4.2 MB of internal RAM, which is the constraint that decides how many frame buffers we can keep in flight at once.

What was easy and what wasn’t

No technical surprises in how the silicon behaves: the official ST demo runs on EVAL and works well. Our work was adapting it to Nucleo — a more accessible board, more limited peripherals, no external PSRAM. What ST documents about the silicon, the ISP and the encoder, in production behaves as advertised.

There are no official ST examples for the UVC H.264 case on Nucleo specifically. For the EVAL there’s a complete reference demo; for the Nucleo you have to rebuild the peripheral configuration from pieces scattered across various example projects, and change pinning where the Nucleo doesn’t expose the same lines. The work is largely configuration adaptation — figuring out what the original demo takes for granted that has to be reconfigured on the new board — rather than silicon exploration. Once done, it leaves a reusable base for Nucleo-N657X0-Q.

What comes next

This repo is a working MVP: it covers the UVC H.264 case end-to-end, it’s verifiable in minutes by opening it as a webcam in OBS or Zoom, and it serves as a base for the explorations that follow. The logical next step is turning on the Neural-ART NPU for on-camera AI pipelines, on a medical-imaging use case.

Reusable base on Nucleo

The port provides a working UVC H.264 base for Nucleo-N657X0-Q. Further processing can build on this configuration, with memory use and end-to-end operation checked again for each extension.


The firmware is available on GitHub under the MIT licence: x-cube-n6-camera-capture-nucleo. For the full technical documentation, see the dedicated wiki page.

To assess STM32N6 for imaging or on-device AI, send us your capture and processing requirements.

Have a technical project to discuss?

Hardware, firmware, software, acoustics: tell us what you need.