Skip to content

Board Pinout ​

One page to check before you wire anything: what each board already connects to its pins, which pins are safe to use, and which pins every experiment uses. The board user manuals have the full details: UM1472 (F407 Discovery) and UM1724 (Nucleo-64).

F407 Discovery headers ​

Top view (component side) ​

Use this when you look at the board the normal way up, LEDs facing you.

STM32F4DISCOVERY P1 and P2 header pinout, top view

Bottom view (solder side) ​

Use this when you wire from underneath, for example with the board upside down on a breadboard. The board is flipped left-to-right, so P2 is on the left, P1 is on the right, and the even pins are in the left column of each header.

STM32F4DISCOVERY P1 and P2 header pinout, bottom view

Click a drawing to open it full size, or download the top view and bottom view. Drawn from ST's UM1472, Table 5.

F411 Nucleo-64 headers ​

These are the two long ST morpho headers (CN7 and CN10). Every pin on the short Arduino headers is also on a morpho pin; the blue tags give its Arduino name (A0–A5, D0–D15).

Top view (component side) ​

NUCLEO-F411RE CN7 and CN10 morpho header pinout, top view

Bottom view (solder side) ​

Flipped left-to-right: CN10 is on the left, CN7 is on the right, and the even pins are in the left column of each header.

NUCLEO-F411RE CN7 and CN10 morpho header pinout, bottom view

Download the top view and bottom view. Drawn from ST's UM1724, Tables 16 and 29, with the solder-bridge defaults of board revision MB1136 C-02 or later. All four drawings are generated by python3 scripts/draw-pinouts.py.

Official pinout documents ​

BoardHeader mapSchematic
F407 Discovery (MB997)UM1472: Extension connectors table (P1/P2 pin for every MCU pin) and the Top layout figureMB997 schematic
F411 Nucleo-64UM1724: Arduino and Morpho connectors figures for NUCLEO-F411REBoard page (schematic pack under Documentation)

On the Discovery, pin 1 of P1 and P2 is the square pad at the ST-LINK end, and every pin name is also printed on the board next to its pin.

Never use PA13 / PA14

They are the SWD debug pins on both boards. Assign them to anything else and the debugger can no longer connect. See Setup Guide → Know your board.

Pins used in each experiment ​

ExperimentSignalF407 DiscoveryF411 Nucleo-64
1. GPIO4 LEDs, 1 buttonYour choice, ideally all on one port (e.g. PD12–PD15)Your choice, ideally all on one port
2. LCD and KeypadLCD SCL / SDA (I2C1)PB6 / PB7PB6 / PB7 (D10 / Morpho CN7)
Keypad rows, columns8 free GPIOs, your choice8 free GPIOs, your choice
3. ADCPotentiometerPA4 (ADC1_IN4)PA4 (A2)
LDR dividerPA6 (ADC1_IN6)PA6 (D12)
4. TimersLED, TIM4_CH4PD15 (on-board blue LED)PB9 (D14)
Potentiometer, LCDPA4, PB6 / PB7PA4, PB6 / PB7
5. DC Motor and PWML298 ENA, TIM4_CH4PD15 (blue LED glows with the duty)PB9 (D14)
L298 IN1 / IN2PB4 / PB5PB4 / PB5 (D5 / D4)
User buttonPA0 (on-board)PC13 (on-board)
Potentiometer, LCDPA4, PB6 / PB7PA4, PB6 / PB7

F407 Discovery ​

Wired on the board ​

These pins already connect to something on the Discovery board. Use them for that part, or check the note before reusing them.

PartPinsNote
Green / orange / red / blue LEDs (LD4, LD3, LD5, LD6)PD12 / PD13 / PD14 / PD15Active high. PD12–PD15 are TIM4 channels 1–4.
User button B1 (blue)PA0Active high, with an on-board pull-down. Also WKUP and TIM2/TIM5_CH1.
SWD debugPA13 (SWDIO), PA14 (SWCLK), PB3 (SWO)Never reuse PA13/PA14. PB3 only matters if you use SWV trace.
8 MHz crystal (HSE)PH0, PH1Not available as GPIO.
Accelerometer (SPI1)PA5 SCK, PA6 MISO, PA7 MOSI, PE3 CS, PE0 / PE1 INT
Audio DAC CS43L22PB6 SCL, PB9 SDA (I2C1); PA4 WS, PC7 MCK, PC10 SCK, PC12 SD (I2S3); PD4 resetThe LCD shares I2C1 with this chip. They have different addresses, so both work on the same bus.
Microphone MP45DT02PB10 CLK, PC3 DOUT
USB OTG FSPA9 VBUS, PA10 ID, PA11 DM, PA12 DP, PC0 power enable, PD5 overcurrentPA9 also lights the green VBUS LED.
BOOT1PB2Has a resistor to GND; avoid.

PA4 and PA6 are shared, and that is fine

Experiment 3 reads the potentiometer on PA4 and the LDR on PA6, which are also wired to the audio DAC and the accelerometer. Neither chip drives those lines while it sits idle, so the ADC readings are normal. If a reading on one of them looks wrong, move that sensor to a free ADC pin such as PA1 or PC1 and change the channel to match.

Free for your circuits ​

Nothing on the board connects to these, so they are the safest picks for LEDs, buttons, keypads and sensors:

PortFree pins
APA1, PA2, PA3, PA8, PA15
BPB0, PB1, PB4, PB5, PB7, PB8, PB11–PB15
CPC1, PC2, PC4, PC5, PC6, PC8, PC9, PC11, PC13
DPD0–PD3, PD6–PD11
EPE2, PE4–PE15

Free pins with ADC channels: PA1 (IN1), PA2 (IN2), PA3 (IN3), PB0 (IN8), PB1 (IN9), PC1 (IN11), PC2 (IN12), PC4 (IN14), PC5 (IN15).

F411 Nucleo-64 ​

Wired on the board ​

PartPinsNote
User LED LD2 (green)PA5 (D13)Active high.
User button B1 (blue)PC13Active low: reads 0 when pressed.
ST-LINK virtual COM port (USART2)PA2 TX, PA3 RXUsed by the UART labs. By default they go to the ST-LINK only, not to the D1/D0 header pins (solder bridges SB62/63 open).
SWD debugPA13 (SWDIO), PA14 (SWCLK), PB3 (SWO)Never reuse PA13/PA14.
32.768 kHz crystal (LSE)PC14, PC15Avoid.
8 MHz clock from ST-LINK (MCO)PH0Not available as GPIO.

Arduino header ​

The Arduino-style header is the quickest way to find a pin on the Nucleo. Every other pin is on the two long Morpho headers (CN7, CN10).

HeaderPinHeaderPin
A0PA0D8PA9
A1PA1D9PC7
A2PA4D10PB6
A3PB0D11PA7
A4PC1D12PA6
A5PC0D13PA5 (LD2)
D0PA3 (VCP RX)D14PB9
D1PA2 (VCP TX)D15PB8
D2PA10
D3PB3 (SWO)
D4PB5
D5PB4
D6PB10
D7PA8

D14 / D15 are not I2C here

On many Arduino shields D14/D15 are SDA/SCL. On this board they are PB9/PB8, and Experiments 4 and 5 put TIM4_CH4 on PB9. Keep the LCD on PB6 / PB7, as in Experiment 4.