Simvik

Nucleo-F767ZI pinout

The Nucleo-F767ZI (STM32F767ZI) pinout: what each pin does, from GPIO, analog inputs and PWM to UART, I2C and SPI, with the notes that catch people out.

The board

  • Microcontroller: STM32F767ZIT6, 32-bit Arm Cortex-M7 with a double-precision floating-point unit and 16 KB instruction and data caches
  • Clock: 216 MHz (the 16 MHz HSI / 8 × 216 / 2 through the PLL, with the regulator's over-drive on); APB1 at 54 MHz, APB2 at 108 MHz
  • Flash / SRAM: 2 MB / 512 KB (the first 128 KB is the DTCM), and 16 KB of ITCM RAM
  • Logic level: 3.3 V; every pin 5 V tolerant but PA4 and PA5 (the DAC's), and none in analog mode
  • Analog inputs: 16 pin channels on ADC1 (PA0–PA7, PB0, PB1, PC0–PC5), 12-bit; A0–A5 are PA3, PC0, PC3, PF3, PF5 and PF10
  • PWM: Timer channels TIM1–TIM5 (TIM2 and TIM5 32-bit), TIM8–TIM14: 1 kHz by default
  • Serial: USART3 on PD8/PD9 through the ST-LINK (Serial); USART6 on D1/D0 (PG14/PG9), USART2 on PD5/PD6, UART4, UART5, UART7 and UART8
  • I2C and SPI: Wire is I2C1 on D14/D15 (PB9/PB8), SPI is SPI1 on D11–D13 (PA7, PA6, PA5); I2C2 on PF0/PF1, I2C4 on PF15/PF14, SPI2–SPI6
  • Floating point: float in hardware; double too on the chip, though STM32duino builds for single precision, so a sketch's doubles run in software (bare-metal C can use the double-precision unit)
  • External interrupts: Any pin: EXTI line n takes pin n of one port
  • On-board LEDs: LD1 green on PB0 (LED_BUILTIN), LD2 blue on PB7 (LED_BLUE), LD3 red on PB14 (LED_RED), each lit HIGH
  • Buttons: B1 USER on PC13 (USER_BTN): the board pulls it down, so it reads HIGH while pressed; B2 resets

Pins

PinFunctionsNotes
PC6PC6, EXTI6, TIM3_CH1, TIM8_CH1, USART6 TX, ~PWManalogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH1, 1 kHz by default (analogWriteFrequency()). USART6 transmit (AF8). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PC6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB8PB8, EXTI8, D15, I2C4 SCL, TIM4_CH3, TIM10_CH1, I2C1 SCL, UART5 RX, ~PWMThe ZIO connector's D15, where an Uno has it: the same pin, under that name in code too. I2C4 clock. analogWrite() PWM from TIM4_CH3, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM10_CH1, 1 kHz by default (analogWriteFrequency()). I2C1 clock for Wire (D15). UART5 receive (AF7). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PB8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB15PB15, EXTI15, TIM1_CH3N, TIM8_CH3N, USART1 RX, SPI2 MOSI, TIM12_CH2, ~PWManalogWrite() PWM from TIM1_CH3N, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH3N, 1 kHz by default (analogWriteFrequency()). USART1 receive (AF4). SPI2 data out. analogWrite() PWM from TIM12_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PB15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB9PB9, EXTI9, D14, I2C4 SDA, TIM4_CH4, TIM11_CH1, I2C1 SDA, SPI2 NSS, UART5 TX, ~PWMThe ZIO connector's D14, where an Uno has it: the same pin, under that name in code too. I2C4 data. analogWrite() PWM from TIM4_CH4, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM11_CH1, 1 kHz by default (analogWriteFrequency()). I2C1 data for Wire (D14). SPI2 chip select. UART5 transmit (AF7). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PB9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB13PB13, EXTI13, TIM1_CH1N, SPI2 SCK, UART5 TX, ~PWManalogWrite() PWM from TIM1_CH1N, 1 kHz by default (analogWriteFrequency()). SPI2 clock. UART5 transmit (AF8). External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PB13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB12PB12, EXTI12, SPI2 NSS, UART5 RXSPI2 chip select. UART5 receive (AF8). External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PB12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA15PA15, EXTI15, JTDI, TIM2_CH1, SPI1 NSS, SPI3 NSS, SPI6 NSS, UART7 TX, ~PWMJTAG data in at reset (alternate function 0); a GPIO once the sketch sets its mode. analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). SPI1 chip select. SPI3 chip select. SPI6 chip select. UART7 transmit (AF12). External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PA15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA5PA5, EXTI5, D13, ADC5, TIM2_CH1, TIM8_CH1N, SPI1 SCK, SPI6 SCK, ~PWMThe ZIO connector's D13, where an Uno has it: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 5 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH1N, 1 kHz by default (analogWriteFrequency()). SPI1 clock for the SPI library (D13). SPI6 clock. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PA5), handler, mode). Not 5 V tolerant: keep it at 3.3 V or below.
PC7PC7, EXTI7, TIM3_CH2, TIM8_CH2, USART6 RX, ~PWManalogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH2, 1 kHz by default (analogWriteFrequency()). USART6 receive (AF8). External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PC7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA6PA6, EXTI6, D12, ADC6, TIM3_CH1, SPI1 MISO, SPI6 MISO, TIM13_CH1, ~PWMThe ZIO connector's D12, where an Uno has it: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 6 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). SPI1 data in for the SPI library (D12). SPI6 data in. analogWrite() PWM from TIM13_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PA6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB5PB5, EXTI5, UART5 RX, TIM3_CH2, SPI1 MOSI, SPI3 MOSI, SPI6 MOSI, ~PWMUART5 receive (AF1). analogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). SPI1 data out. SPI3 data out. SPI6 data out. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PB5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA7PA7, EXTI7, D11, ADC7, TIM1_CH1N, TIM3_CH2, TIM8_CH1N, SPI1 MOSI, SPI6 MOSI, TIM14_CH1, ~PWMThe ZIO connector's D11, where an Uno has it: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 7 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM1_CH1N, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH1N, 1 kHz by default (analogWriteFrequency()). SPI1 data out for the SPI library (D11). SPI6 data out. analogWrite() PWM from TIM14_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PA7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB3PB3, EXTI3, JTDO/SWO, TIM2_CH2, SPI1 SCK, SPI3 SCK, SPI6 SCK, UART7 RX, ~PWMJTAG data out and the trace output at reset; a GPIO once the sketch sets its mode. analogWrite() PWM from TIM2_CH2, 1 kHz by default (analogWriteFrequency()). SPI1 clock. SPI3 clock. SPI6 clock. UART7 receive (AF12). External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PB3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD14PD14, EXTI14, D10, TIM4_CH3, ~PWMThe ZIO connector's D10, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM4_CH3, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PD14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA4PA4, EXTI4, ADC4, SPI1 NSS, SPI3 NSS, SPI6 NSSAnalog input: analogRead() reads ADC channel 4 (12-bit; the core returns 10 bits unless analogReadResolution(12)). SPI1 chip select. SPI3 chip select. SPI6 chip select. External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PA4), handler, mode). Not 5 V tolerant: keep it at 3.3 V or below.
PD15PD15, EXTI15, D9, TIM4_CH4, ~PWMThe ZIO connector's D9, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM4_CH4, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PD15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB4PB4, EXTI4, NJTRST, TIM3_CH1, SPI1 MISO, SPI3 MISO, SPI2 NSS, SPI6 MISO, UART7 TX, ~PWMJTAG reset at reset (alternate function 0, pulled up); a GPIO once the sketch sets its mode. analogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). SPI1 data in. SPI3 data in. SPI2 chip select. SPI6 data in. UART7 transmit (AF12). External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PB4), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF12PF12, EXTI12, D8The ZIO connector's D8, where an Uno has it: the same pin, under that name in code too. External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PF12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF13PF13, EXTI13, D7The ZIO connector's D7, where an Uno has it: the same pin, under that name in code too. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PF13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE9PE9, EXTI9, D6, TIM1_CH1, ~PWMThe ZIO connector's D6, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PE9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE11PE11, EXTI11, D5, TIM1_CH2, SPI4 NSS, ~PWMThe ZIO connector's D5, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH2, 1 kHz by default (analogWriteFrequency()). SPI4 chip select. External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PE11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB1PB1, EXTI1, ADC9, TIM1_CH3N, TIM3_CH4, TIM8_CH3N, ~PWMAnalog input: analogRead() reads ADC channel 9 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM1_CH3N, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM3_CH4, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH3N, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PB1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF14PF14, EXTI14, D4, I2C4 SCLThe ZIO connector's D4, where an Uno has it: the same pin, under that name in code too. I2C4 clock. External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PF14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC2PC2, EXTI2, ADC12, SPI2 MISOAnalog input: analogRead() reads ADC channel 12 (12-bit; the core returns 10 bits unless analogReadResolution(12)). SPI2 data in. External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PC2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE13PE13, EXTI13, D3, TIM1_CH3, SPI4 MISO, ~PWMThe ZIO connector's D3, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH3, 1 kHz by default (analogWriteFrequency()). SPI4 data in. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PE13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF4PF4, EXTI4External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PF4), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF15PF15, EXTI15, D2, I2C4 SDAThe ZIO connector's D2, where an Uno has it: the same pin, under that name in code too. I2C4 data. External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PF15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB6PB6, EXTI6, UART5 TX, TIM4_CH1, I2C1 SCL, USART1 TX, I2C4 SCL, ~PWMUART5 transmit (AF1). analogWrite() PWM from TIM4_CH1, 1 kHz by default (analogWriteFrequency()). I2C1 clock. USART1 transmit (AF7). I2C4 clock. External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PB6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG14PG14, EXTI14, D1, SPI6 MOSI, USART6 TXThe ZIO connector's D1, where an Uno has it: the same pin, under that name in code too. SPI6 data out. USART6 transmit (AF8). External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PG14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB2PB2, EXTI2, SPI3 MOSISPI3 data out. External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PB2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG9PG9, EXTI9, D0, SPI1 MISO, USART6 RXThe ZIO connector's D0, where an Uno has it: the same pin, under that name in code too. SPI1 data in. USART6 receive (AF8). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PG9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE8PE8, EXTI8, TIM1_CH1N, UART7 TX, ~PWManalogWrite() PWM from TIM1_CH1N, 1 kHz by default (analogWriteFrequency()). UART7 transmit (AF8). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PE8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD13PD13, EXTI13, TIM4_CH2, I2C4 SDA, ~PWManalogWrite() PWM from TIM4_CH2, 1 kHz by default (analogWriteFrequency()). I2C4 data. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PD13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE7PE7, EXTI7, UART7 RXUART7 receive (AF8). External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PE7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD12PD12, EXTI12, TIM4_CH1, I2C4 SCL, ~PWManalogWrite() PWM from TIM4_CH1, 1 kHz by default (analogWriteFrequency()). I2C4 clock. External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PD12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD11PD11, EXTI11External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PD11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE10PE10, EXTI10, TIM1_CH2N, ~PWManalogWrite() PWM from TIM1_CH2N, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PE10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE2PE2, EXTI2, SPI4 SCKSPI4 clock. External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PE2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE12PE12, EXTI12, TIM1_CH3N, SPI4 SCK, ~PWManalogWrite() PWM from TIM1_CH3N, 1 kHz by default (analogWriteFrequency()). SPI4 clock. External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PE12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE14PE14, EXTI14, TIM1_CH4, SPI4 MOSI, ~PWManalogWrite() PWM from TIM1_CH4, 1 kHz by default (analogWriteFrequency()). SPI4 data out. External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PE14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA0PA0, EXTI0, ADC0, TIM2_CH1, TIM5_CH1, UART4 TX, ~PWMAnalog input: analogRead() reads ADC channel 0 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM5_CH1, 1 kHz by default (analogWriteFrequency()). UART4 transmit (AF8). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PA0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE15PE15, EXTI15External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PE15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB0PB0, EXTI0, LD1, ADC8, TIM1_CH2N, TIM3_CH3, TIM8_CH2N, ~PWMThe green user LED LD1 (LED_BUILTIN), lit HIGH. Analog input: analogRead() reads ADC channel 8 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM1_CH2N, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM3_CH3, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH2N, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PB0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB10PB10, EXTI10, TIM2_CH3, I2C2 SCL, SPI2 SCK, USART3 TX, ~PWManalogWrite() PWM from TIM2_CH3, 1 kHz by default (analogWriteFrequency()). I2C2 clock. SPI2 clock. USART3 transmit (AF7). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PB10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE0PE0, EXTI0, UART8 RXUART8 receive (AF8). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PE0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB11PB11, EXTI11, TIM2_CH4, I2C2 SDA, USART3 RX, ~PWManalogWrite() PWM from TIM2_CH4, 1 kHz by default (analogWriteFrequency()). I2C2 data. USART3 receive (AF7). External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PB11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC8PC8, EXTI8, TIM3_CH3, TIM8_CH3, ~PWManalogWrite() PWM from TIM3_CH3, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH3, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PC8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC9PC9, EXTI9, TIM3_CH4, TIM8_CH4, I2C3 SDA, ~PWManalogWrite() PWM from TIM3_CH4, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH4, 1 kHz by default (analogWriteFrequency()). I2C3 data. External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PC9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC10PC10, EXTI10, SPI3 SCK, USART3 TX, UART4 TXSPI3 clock. USART3 transmit (AF7). UART4 transmit (AF8). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PC10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC11PC11, EXTI11, SPI3 MISO, USART3 RX, UART4 RXSPI3 data in. USART3 receive (AF7). UART4 receive (AF8). External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PC11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC12PC12, EXTI12, SPI3 MOSI, UART5 TXSPI3 data out. UART5 transmit (AF8). External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PC12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD2PD2, EXTI2, UART5 RXUART5 receive (AF8). External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PD2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG2PG2, EXTI2External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PG2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG3PG3, EXTI3External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PG3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA3PA3, EXTI3, A0, ADC3, TIM2_CH4, TIM5_CH4, TIM9_CH2, USART2 RX, ~PWMThe ZIO connector's A0, where an Uno has it: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 3 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH4, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM5_CH4, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM9_CH2, 1 kHz by default (analogWriteFrequency()). USART2 receive (AF7). External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PA3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD7PD7, EXTI7, SPI1 MOSISPI1 data out. External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PD7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC0PC0, EXTI0, A1, ADC10The ZIO connector's A1, where an Uno has it: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 10 (12-bit; the core returns 10 bits unless analogReadResolution(12)). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PC0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD6PD6, EXTI6, SPI3 MOSI, USART2 RXSPI3 data out. USART2 receive (AF7). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PD6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC3PC3, EXTI3, A2, ADC13, SPI2 MOSIThe ZIO connector's A2, where an Uno has it: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 13 (12-bit; the core returns 10 bits unless analogReadResolution(12)). SPI2 data out. External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PC3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD5PD5, EXTI5, USART2 TXUSART2 transmit (AF7). External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PD5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF3PF3, EXTI3, A3The ZIO connector's A3, where an Uno has it: the same pin, under that name in code too. External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PF3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD4PD4, EXTI4External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PD4), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF5PF5, EXTI5, A4The ZIO connector's A4, where an Uno has it: the same pin, under that name in code too. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PF5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD3PD3, EXTI3, SPI2 SCKSPI2 clock. External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PD3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF10PF10, EXTI10, A5The ZIO connector's A5, where an Uno has it: the same pin, under that name in code too. External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PF10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE4PE4, EXTI4, SPI4 NSSSPI4 chip select. External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PE4), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF2PF2, EXTI2External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PF2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE5PE5, EXTI5, TIM9_CH1, SPI4 MISO, ~PWManalogWrite() PWM from TIM9_CH1, 1 kHz by default (analogWriteFrequency()). SPI4 data in. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PE5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF1PF1, EXTI1, I2C2 SCLI2C2 clock. External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PF1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE6PE6, EXTI6, TIM9_CH2, SPI4 MOSI, ~PWManalogWrite() PWM from TIM9_CH2, 1 kHz by default (analogWriteFrequency()). SPI4 data out. External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PE6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF0PF0, EXTI0, I2C2 SDAI2C2 data. External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PF0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE3PE3, EXTI3External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PE3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF8PF8, EXTI8, SPI5 MISO, TIM13_CH1, ~PWMSPI5 data in. analogWrite() PWM from TIM13_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PF8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD0PD0, EXTI0, UART4 RXUART4 receive (AF8). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PD0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF7PF7, EXTI7, TIM11_CH1, SPI5 SCK, UART7 TX, ~PWManalogWrite() PWM from TIM11_CH1, 1 kHz by default (analogWriteFrequency()). SPI5 clock. UART7 transmit (AF8). External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PF7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD1PD1, EXTI1, UART4 TXUART4 transmit (AF8). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PD1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF9PF9, EXTI9, SPI5 MOSI, TIM14_CH1, ~PWMSPI5 data out. analogWrite() PWM from TIM14_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PF9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG0PG0, EXTI0External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PG0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG1PG1, EXTI1External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PG1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF6PF6, EXTI6, TIM10_CH1, SPI5 NSS, UART7 RX, ~PWManalogWrite() PWM from TIM10_CH1, 1 kHz by default (analogWriteFrequency()). SPI5 chip select. UART7 receive (AF8). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PF6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA13PA13, EXTI13, SWDIOSerial Wire Debug data, wired to the ST-LINK: leave it to the debugger. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PA13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA14PA14, EXTI14, SWCLKSerial Wire Debug clock, wired to the ST-LINK: leave it to the debugger. External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PA14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB7PB7, EXTI7, LD2, TIM4_CH2, I2C1 SDA, USART1 RX, I2C4 SDA, ~PWMThe blue user LED LD2 (LED_BLUE), lit HIGH. Not on a ZIO connector: on the morpho connector, CN11 pin 21. analogWrite() PWM from TIM4_CH2, 1 kHz by default (analogWriteFrequency()). I2C1 data. USART1 receive (AF7). I2C4 data. External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PB7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC13PC13, EXTI13, B1 USERThe blue B1 USER button (USER_BTN): the board pulls it down, so it reads HIGH while pressed. Not on a ZIO connector: on the morpho connector, CN11 pin 23. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PC13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC14PC14, EXTI14, OSC32_INThe 32.768 kHz crystal (X2) for the RTC; the board's solder bridges leave it off the morpho connector by default. External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PC14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC15PC15, EXTI15, OSC32_OUTThe 32.768 kHz crystal's other side. External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PC15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PH0PH0, EXTI0, OSC_INThe HSE input, fed the ST-LINK's 8 MHz (MCO), but the core runs from the 16 MHz HSI. External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PH0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA1PA1, EXTI1, ADC1, TIM2_CH2, TIM5_CH2, UART4 RX, ~PWMAnalog input: analogRead() reads ADC channel 1 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH2, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM5_CH2, 1 kHz by default (analogWriteFrequency()). UART4 receive (AF8). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PA1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PH1PH1, EXTI1, OSC_OUTThe HSE output. External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PH1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC1PC1, EXTI1, ADC11, SPI2 MOSIAnalog input: analogRead() reads ADC channel 11 (12-bit; the core returns 10 bits unless analogReadResolution(12)). SPI2 data out. External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PC1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PE1PE1, EXTI1, UART8 TXUART8 transmit (AF8). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PE1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG15PG15, EXTI15External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PG15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG12PG12, EXTI12, SPI6 MISOSPI6 data in. External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PG12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG10PG10, EXTI10, SPI1 NSSSPI1 chip select. External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PG10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG13PG13, EXTI13, SPI6 SCKSPI6 clock. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PG13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD9PD9, EXTI9, USART3 RXUSART3 receive: what the Serial Monitor sends (AF7). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PD9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG11PG11, EXTI11, SPI1 SCKSPI1 clock. External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PG11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC5PC5, EXTI5, ADC15Analog input: analogRead() reads ADC channel 15 (12-bit; the core returns 10 bits unless analogReadResolution(12)). External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PC5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD8PD8, EXTI8, USART3 TXUSART3 transmit: Serial, which the ST-LINK carries to USB and the Serial Monitor shows (AF7). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PD8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA12PA12, EXTI12, SPI2 SCK, UART4 TXSPI2 clock. UART4 transmit (AF6). External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PA12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA11PA11, EXTI11, TIM1_CH4, SPI2 NSS, UART4 RX, ~PWManalogWrite() PWM from TIM1_CH4, 1 kHz by default (analogWriteFrequency()). SPI2 chip select. UART4 receive (AF6). External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PA11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA9PA9, EXTI9, TIM1_CH2, SPI2 SCK, USART1 TX, ~PWManalogWrite() PWM from TIM1_CH2, 1 kHz by default (analogWriteFrequency()). SPI2 clock. USART1 transmit (AF7). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PA9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA8PA8, EXTI8, TIM1_CH1, I2C3 SCL, UART7 RX, ~PWManalogWrite() PWM from TIM1_CH1, 1 kHz by default (analogWriteFrequency()). I2C3 clock. UART7 receive (AF12). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PA8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB14PB14, EXTI14, LD3, TIM1_CH2N, TIM8_CH2N, USART1 TX, SPI2 MISO, TIM12_CH1, ~PWMThe red user LED LD3 (LED_RED), lit HIGH. Not on a ZIO connector: on the morpho connector, CN12 pin 28. analogWrite() PWM from TIM1_CH2N, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM8_CH2N, 1 kHz by default (analogWriteFrequency()). USART1 transmit (AF4). SPI2 data in. analogWrite() PWM from TIM12_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PB14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA10PA10, EXTI10, TIM1_CH3, USART1 RX, ~PWManalogWrite() PWM from TIM1_CH3, 1 kHz by default (analogWriteFrequency()). USART1 receive (AF7). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PA10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC4PC4, EXTI4, ADC14Analog input: analogRead() reads ADC channel 14 (12-bit; the core returns 10 bits unless analogReadResolution(12)). External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PC4), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA2PA2, EXTI2, ADC2, TIM2_CH3, TIM5_CH3, TIM9_CH1, USART2 TX, ~PWMAnalog input: analogRead() reads ADC channel 2 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH3, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM5_CH3, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM9_CH1, 1 kHz by default (analogWriteFrequency()). USART2 transmit (AF7). External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PA2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PF11PF11, EXTI11, SPI5 MOSISPI5 data out. External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PF11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PD10PD10, EXTI10External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PD10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG8PG8, EXTI8, SPI6 NSSSPI6 chip select. External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PG8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG7PG7, EXTI7External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PG7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG5PG5, EXTI5External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PG5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG4PG4, EXTI4External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PG4), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PG6PG6, EXTI6External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PG6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
AVDDAVDDThe chip's analog supply (3.3 V), the ADC's reference.
GNDGNDGround (0 V).
AVDDAVDDThe chip's analog supply (3.3 V), the ADC's reference.
AGNDAGNDAnalog ground (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
IOREFIOREFTells shields the I/O voltage of the board (3.3 V). Not a supply to draw from.
+3V3+3V33.3 V from the board's regulator, for parts.
+5V+5V5 V from the ST-LINK's USB (or E5V), for parts.
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
VDDVDDThe chip's 3.3 V supply.
E5VE5VAn external 5 V supply input (jumper JP5 in E5V).
GNDGNDGround (0 V).
IOREFIOREFTells shields the I/O voltage of the board (3.3 V). Not a supply to draw from.
+3V3+3V33.3 V from the board's regulator, for parts.
+5V+5V5 V from the ST-LINK's USB (or E5V), for parts.
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
AVDDAVDDThe chip's analog supply (3.3 V), the ADC's reference.
U5VU5V5 V straight from the ST-LINK's USB connector.
GNDGNDGround (0 V).
GNDGNDGround (0 V).
AGNDAGNDAnalog ground (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).

Good to know

  • Pins are named by port and bit (PB0), or by their Arduino number (D13, A0) where the ZIO connectors give one: both work in code and when wiring.
  • Register by register: the ports are on AHB1 (RCC->AHB1ENR |= RCC_AHB1ENR_GPIOBEN), the peripherals on APB1 (54 MHz) and APB2 (108 MHz), and each bus's timers count at twice it. The F7's USART has ISR and TDR where the F4 has SR and DR (while (!(USART3->ISR & USART_ISR_TXE)) {} USART3->TDR = c;), its I2C is set by TIMINGR and its SPI frame size by CR2 DS, as on the F0 and G0.
  • Above 180 MHz the regulator needs over-drive: PWR->CR1 ODEN, wait for ODRDY, then ODSWEN and ODSWRDY, with seven flash wait states (FLASH->ACR LATENCY) at 216 MHz. STM32duino's clock setup does this, and turns on both caches (SCB_EnableICache, SCB_EnableDCache), before setup().
  • The caches are simulated as always up to date: code that forgets SCB_CleanDCache_by_Addr or SCB_InvalidateDCache_by_Addr around a DMA buffer in cached RAM still reads the right data here, and might not on the chip.
  • PA13 and PA14 are the SWD pins; PA15, PB3 and PB4 start as JTAG pins and become GPIO as soon as the sketch sets their mode.
  • The board's Ethernet uses PA1, PA2, PA7, PB13, PC1, PC4, PC5, PG11 and PG13 on the chip (PA7 through solder bridge SB121, which also leaves D11 free of it on the board); Ethernet is not simulated.
  • The ST morpho connectors (CN11 and CN12, down the board's long edges) carry every pin of the chip; a pin that is on a ZIO connector too is the same pin on both. On the board, solder bridges leave PC14, PC15 (the 32 kHz crystal) and PH0 (the ST-LINK's clock) off the morpho connector, and PD8 and PD9 carry Serial to the ST-LINK; in the simulator they can all be wired.
  • In the simulator, VIN, VBAT, BOOT0 and the NC pins connect to nothing; press B1 and B2 on the board drawing. ADC2, ADC3, USB and Ethernet are not simulated yet.