The STM32N6 from ST Microelectronics is a compelling microcontroller – powerful, with an integrated NPU, but as a relatively new chip, still lacking support in many frameworks. Over the past months, we’ve been working to significantly improve its support in Embassy-rs.

Why Embassy?

Embassy is an async-first framework for embedded Rust. It provides a modern programming model with async/await, hardware abstraction layers (HALs) for many STM32 families, and its own executor – all without an allocator and without std.

When we started, the STM32N6 was missing fundamental peripheral support. We changed that step by step.

What we contributed

XSPI and external flash (PR #5234)

The STM32N6 uses XSPI (eXtensible SPI) to interface with external memory. Our first contribution enabled the XSPI driver for the N6, added the missing DQS (Data Strobe) constructors for high-speed memory access, and delivered a working flash example – the foundation for everything that followed.

PSRAM support (PR #5288)

This PR brought support for external PSRAM via XSPI, including changes to the XSPI driver itself and an example showing how to initialise and use PSRAM.

Flash boot with FSBL (PR #5655)

Our current PR introduces a complete two-stage boot system:

  • FSBL (First Stage Bootloader): Loaded by the boot ROM from signed external NOR flash into SRAM. Configures clocks, enables debug access, and boots the application via embassy-boot.
  • Application: Runs directly from memory-mapped external flash. Supports firmware updates over UART and XMODEM.

The example supports both the STM32N6570-DK and NUCLEO-N657X0-Q boards and includes recipes for building, signing, flashing, and DFU testing.

What’s next?

Our next goal is to make the STM32N6’s NeuralArt coprocessor accessible from Rust – at least at the level currently possible through ST’s C API. The challenge: the instruction set and API of the NeuralArt coprocessor are not openly documented, so we’re currently bound to ST’s C framework. Still, we want to create a Rust interface that enables access to the NPU – for edge AI applications in industrial sensing, image processing, and secure IoT gateways.

All PRs are public and the discussions are fully traceable on GitHub. Open source thrives on contribution.