Skip to content

Commit 4100805

Browse files
committed
STM32N6: Fix PLL1 600 MHz clock, code cleanup, add release doc
Fix PLL1 bypass bit (PLL1BYP) in PLL1CFGR1 that Boot ROM leaves set, which was routing HSI 64 MHz directly to PLL output instead of the 1200 MHz VCO. CPU now runs at 600 MHz (verified via DWT CYCCNT). - Clear PLL1CFGR1 BYP bit to enable VCO output - Simplify PLL1CFGR3 configuration to single write - Consolidate flash write/erase into shared nor_flash_write/erase helpers - Rename xspi_ functions to octospi_ for consistency with register macros - Add CORTEX_M55 define to arch.mk for future use - Add clock tree documentation in clock_config() and PWR_VOSCR - Combine CPUSW and SYSSW clock switch into single register write - Add XSPI2 RAMFUNCTION comments and TEF error handling - Add release announcement doc (docs/release-stm32n6.md) - wolfBoot binary: 23KB, test-app: 3KB
1 parent 1416f2f commit 4100805

File tree

8 files changed

+407
-351
lines changed

8 files changed

+407
-351
lines changed

arch.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ else
357357
endif
358358
ifeq ($(CORTEX_M55),1)
359359
CORTEX_M33=1
360-
CFLAGS+=-mcpu=cortex-m55
360+
CFLAGS+=-mcpu=cortex-m55 -DCORTEX_M55
361361
LDFLAGS+=-mcpu=cortex-m55
362362
endif
363363
ifeq ($(CORTEX_M33),1)

docs/release-stm32n6.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# wolfBoot Secure Boot on the STM32N6
2+
3+
wolfSSL is announcing wolfBoot support for the STM32N6 series, starting with the
4+
NUCLEO-N657X0-Q development board (STM32N657X0H). The STM32N6 is ST's first
5+
Cortex-M55 microcontroller, designed for high-performance edge AI workloads with
6+
a dedicated Neural Processing Unit (NPU). wolfBoot provides cryptographic
7+
signature verification and secure firmware updates on this new platform.
8+
9+
## About the STM32N6
10+
11+
The STM32N6 is built around the Arm Cortex-M55 core capable of running at up to
12+
800 MHz, targeting edge AI applications such as vision, audio classification,
13+
and anomaly detection. wolfBoot configures the CPU at 600 MHz (PLL1, Voltage
14+
Scale 1) by default. Unlike most STM32 parts, the N6 has no internal flash —
15+
all firmware resides on external NOR flash connected via the high-speed XSPI2
16+
interface, with over 4.2MB of on-chip SRAM available for code execution and
17+
data.
18+
19+
This flash-less architecture makes the STM32N6 a great fit for applications
20+
that need large, updateable firmware images without being constrained by
21+
internal flash size, while still benefiting from the performance of a modern
22+
Cortex-M55 core with Helium vector extensions.
23+
24+
## wolfBoot on the STM32N6
25+
26+
wolfBoot serves as the First Stage Boot Loader (FSBL) on the STM32N6. The
27+
on-chip Boot ROM copies wolfBoot from external NOR flash into SRAM and executes
28+
it. wolfBoot then verifies the application image signature and boots the
29+
application, which runs directly from external flash via Execute-In-Place (XIP)
30+
memory-mapped mode.
31+
32+
The wolfBoot binary comes in at approximately 22KB, well within the 128KB FSBL
33+
limit. The entire port is self-contained with no external dependencies — no
34+
STM32Cube HAL, no CMSIS headers, no RTOS required.
35+
36+
Signature verification uses ECC256 with SHA-256, and the port supports A/B
37+
firmware updates with swap-based rollback, all operating on the external NOR
38+
flash.
39+
40+
## Tested Hardware
41+
42+
- **Board**: NUCLEO-N657X0-Q (STM32N657X0H, MB1940)
43+
- **Flash**: Macronix MX25UM51245G, 64MB NOR on XSPI2
44+
- **Build + Flash**: `make && make flash` using OpenOCD with ST-Link
45+
46+
## Resources
47+
48+
- [wolfBoot STM32N6 documentation](https://github.com/wolfSSL/wolfBoot/blob/master/docs/Targets.md#stm32n6)
49+
- [wolfBoot GitHub repository](https://github.com/wolfSSL/wolfBoot)
50+
- [NUCLEO-N657X0-Q product page](https://www.st.com/en/evaluation-tools/nucleo-n657x0-q.html)
51+
- [wolfBoot video series with ST](https://www.wolfssl.com/st-wolfboot-video-series/)
52+
53+
If you have any questions or run into any issues, contact us at
54+
facts@wolfssl.com, or call us at +1 425 245 8247.

0 commit comments

Comments
 (0)