Most STM32 boards make you buy a separate ST-Link programmer before you can upload a single line of code. The Nucleo skips that problem entirely — it ships with a genuine ST-Link debugger built right onto the board, so you plug in one USB cable and you're flashing and debugging immediately, breakpoints included.
The tradeoff for that convenience is a pinout that looks intimidating at first glance: two different header systems stacked on top of each other, an Arduino-compatible set and a much larger ST-specific set, both exposing largely the same underlying pins under different names.
Once you understand why both exist, it stops being confusing and starts being genuinely convenient. Here's the full breakdown, using the popular NUCLEO-F411RE as the reference board — the Nucleo-64 family shares this exact layout across most of its models.
What's Actually on the Board
A Nucleo-64 board is really two boards on one PCB: an ST-LINK/V2-1 debugger/programmer section, and the actual target MCU section (an STM32F411RE, in the reference case — Cortex-M4 at up to 100 MHz, 512 KB flash, 96 KB SRAM). They're connected by a set of jumpers and can even be physically separated along a perforation if you want a standalone MCU board later, though most people never bother.
Because the debugger is built in, there's no separate ST-Link purchase, no driver-hunting, no separate programmer cable — plug in USB, and your IDE (STM32CubeIDE, Arduino IDE with the STM32 core, PlatformIO, or Keil/IAR) can flash and debug immediately.
Two Header Systems, One Set of Pins
This is the concept that unlocks the whole pinout:
Arduino Uno R3-compatible headers (CN5, CN6, CN8, CN9) — female headers in the exact positions and pinout of an Arduino Uno, so genuine Arduino shields plug straight in. Labeled with familiar names like D0–D15, A0–A5, 5V, GND, VIN.
ST Morpho connectors (CN7, CN10) — two 38-pin male headers running along both edges of the board, exposing nearly every pin the STM32 chip has, labeled with their actual port/pin names (PA5, PB6, PC13, etc.).
Here's the key detail: every Arduino pin is also present on the Morpho connectors. D13 on the Arduino header and PA5 on the Morpho header are frequently the same physical net (the exact mapping can shift slightly between Nucleo variants — check your specific board's datasheet). This means you can plug in an Arduino shield on the Uno-style headers and still probe or wire directly to those same signals via Morpho, which is genuinely useful for debugging what a shield is actually doing.
Power Pins
| Pin (Arduino header) | Description |
|---|---|
| VIN | 7–12V external input |
| 5V | Regulated 5V |
| 3.3V | Regulated 3.3V |
| GND | Ground |
| Pin (Morpho, CN7) | Description |
|---|---|
| E5V | Regulated 5V input if you have a stable 5V source (requires moving jumper JP5) |
| GND | Ground |
By default the board is powered entirely over USB. If you're powering it externally, use VIN (7–12V, goes through the onboard regulator) via the Arduino header, or E5V via Morpho if you already have clean regulated 5V — just remember JP5 needs to be moved from its default U5V position to actually accept E5V, or you risk back-feeding the USB power path.
Digital I/O — Onboard LED and Button
| Function | Arduino pin | Typical Morpho pin |
|---|---|---|
| LD2 (green user LED) | D13 | PA5 (varies by target MCU — some use PB13) |
| B1 (user button, blue) | — | PC13 |
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
Unlike the Black Pill's PC13 LED, the Nucleo's onboard LED is typically active-HIGH, matching Arduino conventions — HIGH turns it on. Always double check against your specific board variant's schematic, since the exact GPIO backing D13/LED_BUILTIN does shift between different Nucleo target chips.
ADC Pins
A 12-bit ADC (0–4095) is available across up to 16 channels, most accessible through the Arduino A0–A5 header pins and additional channels on the Morpho connectors.
int value = analogRead(A0); // 0–4095, 12-bit
Critical safety note that catches almost everyone coming from Arduino shields: while the Nucleo's digital I/O pins are generally 5V tolerant, the analog input pins are not — they accept a maximum of 3.3V. A 5V analog sensor wired straight into an Arduino-shield-style analog pin on a Nucleo can damage that input. This is different enough from standard Arduino behavior that it's worth treating as a hard rule rather than a minor caveat.
PWM and Timers
Six 16-bit and two 32-bit timers are available, and — as with the Black Pill — nearly any GPIO can be routed to a PWM channel via the chip's alternate-function mapping rather than being limited to a small fixed set of pins.
analogWrite(D9, 128); // works via Arduino-style STM32 core
Communication Pins
UART / USART
The Nucleo commonly exposes multiple hardware USARTs across its two header sets — a genuine upgrade over the Uno's single UART. USART2 is the default virtual COM port routed back through the onboard ST-Link, meaning you can use Serial Monitor over the same USB cable used for programming, without sacrificing your only UART the way you would on an Uno.
| Peripheral | Notes |
|---|---|
| USART2 | Default — routed to ST-Link, appears as your PC's serial console automatically |
| USART1, USART6 | Available on Morpho pins for a second and third independent serial connection |
This is one of the most practical advantages the Nucleo has over an Uno-class board: debugging a GPS module or Bluetooth radio no longer means giving up your programming/debug connection.
SPI Pins
Multiple SPI peripherals (commonly SPI1, SPI2, SPI3) are available across the Morpho headers, with signals also reachable through the Arduino-compatible D10–D13 pins for shield compatibility (SS, MOSI, MISO, SCK in the familiar Arduino positions).
#include <SPI.h>
SPI.begin();
I2C Pins
I2C is available on the Arduino-standard A4/A5 pins for shield compatibility, backed by one of the chip's I2C peripherals, with additional I2C instances (up to three total, depending on the specific target MCU) reachable via Morpho.
#include <Wire.h>
Wire.begin();
The SWD Debug Header
If you ever separate the ST-Link half of the board from the target MCU half (or want to debug a completely separate external STM32 chip using this board's built-in programmer), the SWD interface is exposed on specific Morpho CN7 pins — commonly used to connect an external target's SWDIO/SWCLK/GND/3V3 lines. This is what makes a Nucleo genuinely useful as a standalone programmer for other STM32 projects, not just for the chip soldered onto it.
Practical Pin Usage Tips
Never wire a 5V analog signal into an Arduino-header analog pin. This is the single most Nucleo-specific gotcha — the digital pins forgive 5V, the analog pins do not.
Use USART2's automatic virtual COM port for Serial Monitor, and save USART1/USART6 for actual peripherals — you get debug output and a device connection simultaneously, unlike on an Uno.
Cross-reference Arduino pin names with their Morpho equivalents early, especially if you're moving code between a genuine Uno and a Nucleo — the pin names differ even when the electrical function is the same.
Double-check your specific Nucleo model's datasheet for the exact LED/button GPIO, since it does shift between the F401RE, F411RE, F446RE, and other variants that share this same physical layout.
Leave the board fully assembled unless you specifically need the standalone MCU footprint — the built-in ST-Link is genuinely convenient, and separating the boards means sourcing your own power and programmer afterward.
Common Mistakes and How to Avoid Them
Feeding a 5V analog sensor into an analog pin. Unlike the digital pins, these are not 5V tolerant and can be damaged.
Forgetting to move JP5 when powering via E5V. Powering through Morpho's E5V pin without repositioning this jumper from its default U5V setting can create a power-path conflict with USB.
Assuming the LED/button GPIOs are identical across every Nucleo-64 model. They're consistent in header position but can map to different underlying STM32 pins depending on which target chip your specific board uses.
Treating the Arduino headers as the only usable I/O. The Morpho connectors expose dramatically more pins and peripherals — sticking to just the Arduino set gives up most of what makes the board worth using over a plain Uno.
Assuming shield compatibility guarantees full compatibility. Most Arduino Uno shields fit and work, but shields relying on specific AVR quirks (certain timer behaviors, 5V analog signals) may need adjustment.
Summary: Nucleo-64 (F411RE) Pin Reference at a Glance
| Feature | Count / Detail |
|---|---|
| MCU | STM32F411RE, Cortex-M4 @ 100 MHz |
| Flash / SRAM | 512 KB / 96 KB |
| Total header pins | 76 across CN7 + CN10 (38 each), plus Arduino-compatible CN5/CN6/CN8/CN9 |
| Onboard debugger | ST-LINK/V2-1, built in |
| ADC | 12-bit, up to 16 channels |
| Timers | 6× 16-bit, 2× 32-bit |
| USART | Multiple — USART2 auto-routes to virtual COM port |
| SPI / I2C | Multiple instances via Morpho, Arduino-compatible pins for shields |
| Onboard LED / button | LD2 (usually active-HIGH) / B1 on PC13 |
| Analog pin voltage limit | 3.3V max — not 5V tolerant |
| Shield compatibility | Arduino Uno R3 form factor |
The Nucleo's real value is combining an Arduino shield ecosystem with genuine 32-bit ARM performance and a built-in debugger — you get to keep using familiar shields while stepping through breakpoints on real hardware, something neither a plain Uno nor a bare Black Pill offers on its own. The two-header-system layout looks like more to learn at first, but it's really one set of pins described two different ways for two different audiences.
STM32 Nucleo-64 (F411RE) · Cortex-M4 @ 100MHz · Built-in ST-LINK · Arduino Shield Compatible · Morpho Connectors
Quick Answers to Common Nucleo Pin Questions
Why are there two sets of headers? The Arduino-compatible headers (CN5/CN6/CN8/CN9) exist for shield compatibility; the ST Morpho connectors (CN7/CN10) expose nearly every pin the chip has, under their real STM32 names. Most signals are shared between both.
Do I need a separate ST-Link programmer? No — every Nucleo board has one built in. Plug in USB and you can flash and debug immediately.
Are the analog pins 5V tolerant like the digital pins? No. This is the most important exception on the board — analog inputs accept a maximum of 3.3V even though most digital pins tolerate 5V.
Can I use Serial Monitor and a peripheral's UART at the same time? Yes — USART2 typically routes automatically through the onboard ST-Link as a virtual COM port, leaving other USART instances free for your own devices, unlike an Arduino Uno's single shared UART.
Will my Arduino Uno shields work on a Nucleo? Most do, since the Arduino-compatible headers match the Uno's pin positions exactly. Shields depending on 5V analog signals or AVR-specific timer quirks may need adjustment.
Which Nucleo pin is the onboard LED? Usually D13 on the Arduino header, mapped to PA5 or PB13 on Morpho depending on the specific target MCU — check your board's exact model.
What's the difference between this and a Black Pill? The Nucleo includes a built-in debugger and Arduino shield compatibility in a larger form factor; the Black Pill is smaller and cheaper but needs an external ST-Link for debugging (though not for basic flashing, thanks to its DFU bootloader).
Can I use this board to program a separate STM32 chip? Yes — the SWD pins are exposed on the Morpho connector specifically so the onboard ST-Link can debug an external target, not just the chip soldered to the board.
Where to Go From Here
Once the dual-header layout and the 3.3V-only analog pins feel like second nature, the built-in ST-Link's live debugging — real breakpoints, variable inspection, step-through execution — is the feature most worth spending time on next, since it's the thing an Uno genuinely can't offer. From there, exploring the additional USART and SPI instances available only through the Morpho connectors is the natural next step for projects that have outgrown what the Arduino-compatible header alone can expose.