🛠 Zephyr RTOS sur le Nucleo STM32H743ZI : west build, flash et le piège des 96 MHz
What you will build
Zephyr treats nucleo_h743zi as a first-class board with its own board documentation, and the flow is the cleanest of any MCU stack on this hardware: west build, west flash, done. This tutorial builds and flashes Zephyr's blinky, then digs into the fact that bites everyone: Zephyr boots this board at 96 MHz by default, not 480 MHz.
Prerequisites
- A working Zephyr SDK +
westworkspace (see the Zephyr getting-started guide) - Nucleo-144 STM32H743ZI + USB cable (the on-board ST-LINK/V2-1 is your debugger)
Step 1 — Build and flash
$ west build -b nucleo_h743zi samples/basic/blinky
$ west flash # STM32CubeProgrammer runner (default)
# alternatives verified by the board doc:
$ west flash --runner openocd
$ west flash --runner jlink
$ west flash --runner pyocd
Step 2 — The application
/* blinky.c — LD0 alias maps to the board's user LED in the nucleo_h743zi tree. */
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
static const struct gpio_dt_spec led =
GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios);
int main(void)
{
if (!gpio_is_ready_dt(&led)) {
return -1;
}
gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
while (1) {
gpio_pin_toggle_dt(&led); /* LD1 = PB0 in the default mapping */
k_msleep(500);
}
return 0;
}
Step 3 — Console
The Zephyr default console is UART3 (PD8/PD9) on the ST-LINK virtual COM port at 115200 8N1 — hello_world output lands there with no devicetree edits. The default mapping also gives you USER button PC13, LD1 PB0, LD2 PE1, LD3 PB14, I2C PB8/PB9, ADC1_INP15 PA3 and DAC1_OUT1 PA4.
Step 4 — The 96 MHz trap
Zephyr boots the board at a 96 MHz PLL (from the 8 MHz HSE) by default, while the STM32duino core runs the same silicon at 480 MHz SYSCLK. Consequences:
- Never compare a Zephyr benchmark against an Arduino benchmark without checking clocks first.
- Reaching 480 MHz requires the regulator at voltage scale 0 and correct flash latency — a clock-tree rework, not a one-liner.
- The series was announced at 400 MHz in October 2016 and is now rated up to 480 MHz ; stale toolchains may cap you at 400 MHz even after rework.
Expected result
LD1 (PB0) blinks every 500 ms after west flash reports success ; hello_world prints to the VCP at 115200.
Common pitfalls
- The board doc carries an explicit obsolescence notice: ST discontinued the H743ZI and points to the NUCLEO-H753ZI — upstream board support continues, but new designs should target the H753ZI.
- Flashing with the wrong runner: if STM32CubeProgrammer is not installed, use
--runner openocd(or jlink/pyocd) instead of the default. - Judging Zephyr as "slow": you are measuring a 96 MHz boot configuration, not what the 480 MHz silicon can do.
Autres tutoriels pour cette carte
- Premiers pas sur le Nucleo-144 STM32H743ZI : core STM32duino, ST-LINK et premier Blink
- GPIO, ADC 16 bits et DAC sur le Nucleo STM32H743ZI : bouton, LED et potentiomètre
- MicroPython sur le Nucleo STM32H743ZI : le REPL 480 MHz via le port série ST-LINK
- STM32Cube HAL à 480 MHz sur le STM32H743ZI : VOS0, latence flash et HSE bypass
- FreeRTOS sur le Nucleo STM32H743ZI : le projet officiel CubeH7, tâches et file d'attente
- Serveur web sur l'Ethernet du STM32H743ZI : démo LwIP officielle, RMII et errata