Skip to content

Guide

STM32 Nucleo Pinout: Arduino Headers, Morpho Connectors, and GPIO Explained

Complete STM32 Nucleo pinout reference: Arduino-compatible headers vs ST Morpho connectors, the built-in ST-LINK debugger, ADC voltage limits, and every peripheral pin mapped.

  • 10 min read
  • Updated November 7, 2026
STM32 Nucleo Pinout: Arduino Headers, Morpho Connectors, and GPIO Explained

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.

Full STM32 Nucleo pinout — Arduino headers, Morpho connectors, power, and GPIO

Nucleo-64 at a glance

QuestionAnswer (NUCLEO-F411RE)
ChipSTM32F411RE, Cortex-M4F up to 100 MHz, 512 KB flash, 128 KB SRAM
Logic level3.3 V
Arduino headerUno R3 layout (CN5, CN6, CN8, CN9)
ST Morpho headersCN7 and CN10, 38 pins each
DebuggerST-LINK/V2-1 on the same board, with a virtual COM port
Serial Monitor pinsUSART2 on PA2/PA3, which are D1/D0
User LED / buttonLD2 on D13 (PA5), B1 on PC13
Default I2C / SPII2C D14/D15, SPI D10–D13
Power from VIN7–12 V, current falls as voltage rises

What is on the board

A Nucleo-64 is really two boards on one PCB: an ST-LINK/V2-1 debugger section and the target STM32 section. Because the debugger is built in, there is no separate ST-Link purchase and no programmer cable. One USB cable flashes, debugs (with real breakpoints) and gives you a serial port. You can even snap the ST-LINK off along the perforation later if you want a bare MCU board, though most people never do.

This guide uses the NUCLEO-F411RE as the example. The Nucleo-64 family shares the same connector layout, but the exact STM32 pin behind each Arduino name can change between models, so always check your own board's user manual (UM1724).

NUCLEO-F411RE connectors: Arduino headers CN5, CN6, CN8 and CN9 between the ST morpho headers CN7 and CN10, plus the ST-LINK USB port CN1
The ST-LINK half of the board: CN1 USB, the CN2 jumpers (fit them to program this board), the CN4 SWD header, CN3 virtual COM port pins and the LD1 COM LED

Two header systems, one set of pins

Arduino Uno R3 headers (CN5, CN6, CN8, CN9) are female headers in the Uno's exact positions, so Arduino shields plug straight in. They carry the familiar names D0–D15, A0–A5, 5V, GND and VIN.

ST Morpho connectors (CN7, CN10) are two 38-pin male headers on the board edges. They expose almost every pin of the chip under its real port name (PA5, PB6, PC13).

Every Arduino pin is also on the Morpho headers. D13 and PA5 are the same wire. You can plug a shield into the Arduino headers and still probe those exact signals on Morpho.

Chart: Nucleo-64 Arduino header map, D0–D15 and A0–A5 with their STM32 pin names and special roles

The full Arduino to STM32 map (NUCLEO-F411RE)

ArduinoConnectorSTM32 pinRole
D0CN9PA3USART2 RX (ST-LINK virtual COM port)
D1CN9PA2USART2 TX (ST-LINK virtual COM port)
D2CN9PA10
D3CN9PB3PWM (TIM2_CH2)
D4CN9PB5
D5CN9PB4PWM (TIM3_CH1)
D6CN9PB10PWM (TIM2_CH3)
D7CN9PA8
D8CN5PA9
D9CN5PC7PWM (TIM3_CH2)
D10CN5PB6PWM (TIM4_CH1), SPI chip select
D11CN5PA7PWM (TIM1_CH1N), SPI MOSI
D12CN5PA6SPI MISO
D13CN5PA5SPI SCK and the green LED LD2
D14CN5PB9I2C SDA
D15CN5PB8I2C SCL
A0CN8PA0ADC1_0
A1CN8PA1ADC1_1
A2CN8PA4ADC1_4
A3CN8PB0ADC1_8
A4CN8PC1 (or PB9)ADC1_11, or I2C SDA with solder bridges changed
A5CN8PC0 (or PB8)ADC1_10, or I2C SCL with solder bridges changed

Source: ST UM1724 (STM32 Nucleo-64 boards). The six PWM pins on the Arduino header are D3, D5, D6, D9, D10 and D11, the same set the Uno uses.

Four traps Nucleo newcomers hit

1. D0 and D1 are the ST-LINK serial port. They are USART2 (PA3/PA2), which is also what the on-board virtual COM port uses. A shield that drives D0/D1, or a wire you leave on them, will garble your Serial Monitor. Keep both free.

2. D13 is the LED and the SPI clock. PA5 drives LD2 and also SPI1 SCK. An SPI shield or display will flicker the green LED, and a wire on D13 loads the LED circuit.

3. I2C is D14/D15, not A4/A5. On a Uno, I2C is A4/A5. On a Nucleo, the default is D14 (SDA) and D15 (SCL). A4/A5 only carry I2C if you change the solder bridges (SB46 and SB52 ON, SB51 and SB56 OFF), which also stops them working as analog pins.

4. The analog pins are 3.3 V. Most digital pins tolerate 5 V, but any analog input must stay at or below 3.3 V. A 5 V analog sensor on an Arduino-shield analog pin can damage the chip.

Powering the board

SourceHowNotes
USBST-LINK USB cable, JP5 on U5V (pins 1–2)Default. Programming, debugging and serial over one cable
VIN7–12 V on CN6 pin 8 or CN7 pin 24Goes through the on-board regulator
E5VRegulated 5 V on the Morpho connectorJP5 on E5V (pins 2–3) and JP1 removed

VIN current drops as the input voltage rises, because the linear regulator turns the difference into heat. ST specifies a maximum of 800 mA at 7 V, 450 mA between 7 and 9 V, and 250 mA between 9 and 12 V. If you power motors or an LED strip from VIN, use a lower input voltage or, better, a separate 5 V supply with a shared ground.

Chart: Nucleo-64 power options and the maximum VIN current at 7 V, 7–9 V and 9–12 V

LED and button

PartPinNotes
LD2, green user LEDD13, PA5 (PB13 on a few Nucleo-64 models)Active HIGH: HIGH turns it on
B1, blue user buttonPC13 (CN7 pin 23)Reads LOW when pressed, HIGH when released
sketch.ino
void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(USER_BTN, INPUT);   // B1 is wired to PC13
}

void loop() {
  digitalWrite(LED_BUILTIN, digitalRead(USER_BTN) == LOW ? HIGH : LOW);  // LED on while pressed
}

If USER_BTN is not defined for your board, use PC13 instead. Unlike the Black Pill's PC13 LED, the Nucleo LED is active HIGH, which matches Arduino conventions.

Green LD2 (PA5, shared with D13), blue B1 USER button (PC13), black B2 RESET button, and the JP5 and JP6 jumpers

ADC and PWM

The ADC is 12-bit (0–4095) with up to 16 external channels. The Arduino header exposes A0–A5; the rest are on Morpho.

sketch.ino
int value = analogRead(A0);   // 0–4095, input must stay at or below 3.3 V

PWM works on pins with a timer channel, not every GPIO. On the Arduino header those are D3, D5, D6, D9, D10 and D11; more are available on Morpho.

sketch.ino
analogWrite(D9, 128);   // about 50 % duty

UART, SPI and I2C

BusPinsNotes
USART2D1 (TX, PA2) / D0 (RX, PA3)Routed to the ST-LINK virtual COM port, so it shows up as a COM port on your PC
USART1PB6 / PB7Free for your own peripherals (shared with D10 on the Arduino header)
SPI1D13 SCK (PA5), D12 MISO (PA6), D11 MOSI (PA7), D10 or any pin for chip selectMatches Arduino shield positions
I2C1D14 SDA (PB9), D15 SCL (PB8)Default Arduino I2C

USART2's virtual COM port is a major advantage over an Uno: you can debug over the same USB cable you program with, while other USARTs talk to a GPS or Bluetooth module.

Set up Arduino IDE for a Nucleo

  1. Install STM32CubeProgrammer from ST. The default upload method needs it.
  2. In Arduino IDE open File → Preferences and add this to Additional Boards Manager URLs: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
  3. Open Tools → Board → Boards Manager, search STM32 MCU based boards and install it.
  4. Choose Tools → Board → STM32 boards groups → Nucleo-64, then Board part number → Nucleo F411RE.
  5. Leave Upload method on STM32CubeProgrammer (SWD). Plug in the board over USB.
  6. Open the blink example and upload. Open the Serial Monitor on the ST-LINK COM port.

Use the on-board ST-LINK on another STM32 chip

The Nucleo can program and debug a separate STM32 target. Remove both CN2 jumpers, then connect the CN4 SWD header to your target:

CN4 pinSignal
1VDD_TARGET (reference voltage from the target)
2SWCLK
3GND
4SWDIO
5NRST
6SWO (reserved)

Put the CN2 jumpers back to program the chip on the Nucleo again. If you use NRST from CN4, the manual says SB12 must be OFF.

Flowchart: Nucleo-64 troubleshooting, from the PC not seeing the ST-LINK to serial, upload and shield problems

Common mistakes and how to avoid them

Putting a 5 V analog signal on an analog pin. Analog inputs are 3.3 V only.

Leaving a wire on D0/D1 and then wondering why the Serial Monitor is garbled. Those pins are the virtual COM port.

Expecting A4/A5 to be I2C. The default Nucleo I2C is D14/D15.

Powering motors from VIN. At 9–12 V you only get about 250 mA.

Assuming the LED and button are on the same pins on every Nucleo-64. They are in the same positions, but the underlying STM32 pin can change between models.

Ignoring the Morpho headers. They expose far more pins and peripherals than the Arduino set.

Quick answers

Why two sets of headers? The Arduino headers give you shield compatibility. The Morpho headers give you nearly every STM32 pin under its real name.

Do I need a separate programmer? No. The ST-LINK is built in.

Are analog pins 5 V tolerant? No, 3.3 V maximum.

Can I use the Serial Monitor and another UART at once? Yes. USART2 is the virtual COM port; other USARTs stay free.

Will my Uno shields work? Most do. Shields that need 5 V analog signals or I2C on A4/A5 need attention.

Nucleo or Black Pill? The Nucleo adds a built-in debugger and Arduino shield compatibility. The Black Pill is smaller and cheaper. If you are coming from an Uno, read the Arduino Uno pinout guide side by side.

Sources

Pin assignments can differ between Nucleo-64 models, so confirm against the user manual for your exact board.

Continue learning

Related articles

All articles

Signal In

Built from what makers search for

The lookups piling up in SolderHub's search bar every day shape what we publish next — new component pages, board guides, and firmware notes, sent out as they go live.

By subscribing you agree to our Privacy Policy. Unsubscribe anytime.