Simvik

Nucleo-F446RE pinout

The Nucleo-F446RE (STM32F446RE) 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: STM32F446RET6, 32-bit Arm Cortex-M4 with a floating-point unit
  • Clock: 180 MHz (the 16 MHz HSI / 8 × 180 / 2 through the PLL, with the regulator's over-drive on); APB1 at 45 MHz, APB2 at 90 MHz
  • Flash / SRAM: 512 KB / 128 KB
  • 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 (PA0–PA7, PB0, PB1, PC0–PC5), 12-bit, on ADC1
  • PWM: Timer channels TIM1–TIM5 (TIM2 and TIM5 32-bit), TIM8–TIM14: 1 kHz by default
  • Serial: USART2 on PA2/PA3 through the ST-LINK (Serial); USART1 on PA9/PA10, USART3 on PB10/PC5, UART4 on PA0/PA1, UART5 on PC12/PD2, USART6 on PC6/PC7
  • I2C and SPI: Wire is I2C1 on D14/D15 (PB9/PB8), SPI is SPI1 on D11–D13 (SCK shares PA5 with the LED); I2C2 on PB3/PB10, I2C3 on PC9/PA8, SPI2 and SPI3
  • Floating point: float in hardware (single precision), double in software; the DSP instructions
  • External interrupts: Any pin: EXTI line n takes pin n of one port
  • On-board LED: LD2 on D13 (PA5), lit HIGH
  • Buttons: B1 USER on PC13 (USER_BTN): the board pulls it up, so it reads LOW while pressed; B2 resets

Pins

PinFunctionsNotes
PC10PC10, EXTI10, SPI3 SCK, UART4 TX, USART3 TXSPI3 clock. UART4 transmit: HardwareSerial Serial4(PC11, PC10). USART3 transmit as PC10_ALT1: HardwareSerial Serial3(PC11_ALT1, PC10_ALT1). 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, UART4 RX, USART3 RXSPI3 data in. UART4 receive. USART3 receive as PC11_ALT1. 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, I2C2 SDA, UART5 TXSPI3 data out. I2C2 data. UART5 transmit: HardwareSerial Serial5(PD2, PC12). 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. External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PD2), 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. External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PA14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA15PA15, EXTI15, JTDI, TIM2_CH1, SPI1 NSS, SPI3 NSS, ~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. External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PA15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB7PB7, EXTI7, TIM4_CH2, I2C1 SDA, USART1 RX, ~PWManalogWrite() PWM from TIM4_CH2, 1 kHz by default (analogWriteFrequency()). I2C1 data. USART1 receive. 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 USER button B1 (USER_BTN), which pulls the pin low when pressed. 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 for the RTC sits here on the board. 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.
PA0PA0, EXTI0, A0, ADC0, WKUP, TIM2_CH1, TIM5_CH1, UART4 TX, ~PWMThe Arduino header's A0: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 0 (12-bit; the core returns 10 bits unless analogReadResolution(12)). Wakes the chip from Standby on a rising edge. analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM5_CH1, 1 kHz by default (analogWriteFrequency()). UART4 transmit: HardwareSerial Serial4(PA1, PA0). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PA0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PH0PH0, EXTI0, OSC_INThe HSE input: the ST-LINK's 8 MHz can be fed here, 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, A1, ADC1, TIM2_CH2, TIM5_CH2, UART4 RX, ~PWMThe Arduino header's A1: the same pin, under that name in code too. Analog 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. 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.
PA4PA4, EXTI4, A2, ADC4, SPI1 NSS, SPI3 NSSThe Arduino header's A2: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 4 (12-bit; the core returns 10 bits unless analogReadResolution(12)). SPI1 chip select. SPI3 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.
PB0PB0, EXTI0, A3, ADC8, TIM1_CH2N, TIM3_CH3, TIM8_CH2N, SPI3 MOSI, ~PWMThe Arduino header's A3: the same pin, under that name in code too. 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()). SPI3 data out. External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PB0), 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.
PC1PC1, EXTI1, A4, ADC11, SPI2 MOSI, SPI3 MOSIThe Arduino header's A4: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 11 (12-bit; the core returns 10 bits unless analogReadResolution(12)). SPI2 data out. SPI3 data out. External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PC1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC3PC3, EXTI3, ADC13, SPI2 MOSIAnalog 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.
PC0PC0, EXTI0, A5, ADC10The Arduino header's A5: 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.
PC9PC9, EXTI9, MCO2, TIM3_CH4, I2C3 SDA, TIM8_CH4, ~PWMCan output a clock (MCO2). analogWrite() PWM from TIM3_CH4, 1 kHz by default (analogWriteFrequency()). I2C3 data. analogWrite() PWM from TIM8_CH4, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PC9), 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.
PB8PB8, EXTI8, D15, TIM4_CH3, TIM10_CH1, I2C1 SCL, TIM2_CH1, ~PWMThe Arduino header's D15: the same pin, under that name in code too. analogWrite() PWM from TIM4_CH3, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM10_CH1, 1 kHz by default (analogWriteFrequency()). I2C1 clock for Wire. analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PB8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC6PC6, EXTI6, TIM3_CH1, USART6 TX, TIM8_CH1, ~PWManalogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). USART6 transmit: HardwareSerial Serial6(PC7, PC6). analogWrite() PWM from TIM8_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PC6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB9PB9, EXTI9, D14, TIM4_CH4, TIM11_CH1, I2C1 SDA, SPI2 NSS, TIM2_CH2, ~PWMThe Arduino header's D14: the same pin, under that name in code too. analogWrite() PWM from TIM4_CH4, 1 kHz by default (analogWriteFrequency()). analogWrite() PWM from TIM11_CH1, 1 kHz by default (analogWriteFrequency()). I2C1 data for Wire. SPI2 chip select. analogWrite() PWM from TIM2_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PB9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC5PC5, EXTI5, ADC15, USART3 RXAnalog input: analogRead() reads ADC channel 15 (12-bit; the core returns 10 bits unless analogReadResolution(12)). USART3 receive. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PC5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA5PA5, EXTI5, D13, ADC5, LD2, TIM2_CH1, SPI1 SCK, TIM8_CH1N, ~PWMThe Arduino header's D13: 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)). The green LED LD2: digitalWrite(LED_BUILTIN, HIGH) lights it. analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). SPI1 clock for the SPI library. analogWrite() PWM from TIM8_CH1N, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PA5), handler, mode). Not 5 V tolerant: keep it at 3.3 V or below.
PA12PA12, EXTI12External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PA12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA6PA6, EXTI6, D12, ADC6, TIM3_CH1, SPI1 MISO, TIM13_CH1, ~PWMThe Arduino header's D12: 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. 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.
PA11PA11, EXTI11, TIM1_CH4, ~PWManalogWrite() PWM from TIM1_CH4, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PA11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA7PA7, EXTI7, D11, ADC7, TIM1_CH1N, TIM3_CH2, SPI1 MOSI, TIM8_CH1N, TIM14_CH1, ~PWMThe Arduino header's D11: 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()). SPI1 data out for the SPI library. analogWrite() PWM from TIM8_CH1N, 1 kHz by default (analogWriteFrequency()). 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.
PB12PB12, EXTI12, SPI2 NSSSPI2 chip select. External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PB12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB6PB6, EXTI6, D10, TIM4_CH1, I2C1 SCL, USART1 TX, ~PWMThe Arduino header's D10: the same pin, under that name in code too. analogWrite() PWM from TIM4_CH1, 1 kHz by default (analogWriteFrequency()). I2C1 clock. USART1 transmit: HardwareSerial Serial1(PA10, PA9). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PB6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC7PC7, EXTI7, D9, TIM3_CH2, USART6 RX, TIM8_CH2, SPI2 SCK, ~PWMThe Arduino header's D9: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). USART6 receive. analogWrite() PWM from TIM8_CH2, 1 kHz by default (analogWriteFrequency()). SPI2 clock. External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PC7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA9PA9, EXTI9, D8, TIM1_CH2, USART1 TX, SPI2 SCK, ~PWMThe Arduino header's D8: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH2, 1 kHz by default (analogWriteFrequency()). USART1 transmit: HardwareSerial Serial1(PA10, PA9). SPI2 clock. External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PA9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB2PB2, EXTI2, BOOT1, TIM2_CH4, SPI3 MOSI, ~PWMRead at reset with BOOT0; a GPIO after. analogWrite() PWM from TIM2_CH4, 1 kHz by default (analogWriteFrequency()). SPI3 data out. External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PB2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA8PA8, EXTI8, D7, MCO1, TIM1_CH1, I2C3 SCL, ~PWMThe Arduino header's D7: the same pin, under that name in code too. Can output a clock (MCO1). analogWrite() PWM from TIM1_CH1, 1 kHz by default (analogWriteFrequency()). I2C3 clock. External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PA8), 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.
PB10PB10, EXTI10, D6, TIM2_CH3, I2C2 SCL, SPI2 SCK, USART3 TX, ~PWMThe Arduino header's D6: the same pin, under that name in code too. analogWrite() PWM from TIM2_CH3, 1 kHz by default (analogWriteFrequency()). I2C2 clock for TwoWire Wire2(PB3, PB10). SPI2 clock. USART3 transmit: HardwareSerial Serial3(PC5, PB10). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PB10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB15PB15, EXTI15, TIM1_CH3N, SPI2 MOSI, TIM8_CH3N, TIM12_CH2, ~PWManalogWrite() PWM from TIM1_CH3N, 1 kHz by default (analogWriteFrequency()). SPI2 data out. analogWrite() PWM from TIM8_CH3N, 1 kHz by default (analogWriteFrequency()). 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.
PB4PB4, EXTI4, D5, NJTRST, TIM3_CH1, SPI1 MISO, SPI3 MISO, I2C3 SDA, SPI2 NSS, ~PWMThe Arduino header's D5: the same pin, under that name in code too. JTAG 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. I2C3 data. SPI2 chip select. External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PB4), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB14PB14, EXTI14, TIM1_CH2N, SPI2 MISO, TIM8_CH2N, TIM12_CH1, ~PWManalogWrite() PWM from TIM1_CH2N, 1 kHz by default (analogWriteFrequency()). SPI2 data in. analogWrite() PWM from TIM8_CH2N, 1 kHz by default (analogWriteFrequency()). 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.
PB5PB5, EXTI5, D4, TIM3_CH2, SPI1 MOSI, SPI3 MOSI, ~PWMThe Arduino header's D4: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). SPI1 data out. SPI3 data out. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PB5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB13PB13, EXTI13, TIM1_CH1N, SPI2 SCK, ~PWManalogWrite() PWM from TIM1_CH1N, 1 kHz by default (analogWriteFrequency()). SPI2 clock. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PB13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB3PB3, EXTI3, D3, JTDO/SWO, TIM2_CH2, SPI1 SCK, SPI3 SCK, I2C2 SDA, ~PWMThe Arduino header's D3: the same pin, under that name in code too. JTAG 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. I2C2 data for TwoWire Wire2(PB3, PB10). External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PB3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA10PA10, EXTI10, D2, TIM1_CH3, USART1 RX, ~PWMThe Arduino header's D2: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH3, 1 kHz by default (analogWriteFrequency()). USART1 receive. 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, USART2 TX, TIM2_CH3, TIM5_CH3, TIM9_CH1, ~PWMAnalog input: analogRead() reads ADC channel 2 (12-bit; the core returns 10 bits unless analogReadResolution(12)). USART2 transmit: Serial, which the ST-LINK carries to USB and the Serial Monitor shows. Not on the Arduino header (D1), which the board's solder bridges leave unconnected. 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()). External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PA2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA3PA3, EXTI3, ADC3, USART2 RX, TIM2_CH4, TIM5_CH4, TIM9_CH2, ~PWMAnalog input: analogRead() reads ADC channel 3 (12-bit; the core returns 10 bits unless analogReadResolution(12)). USART2 receive: what the Serial Monitor sends, through the ST-LINK. Not on D0. 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()). External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PA3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
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).
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).

Good to know

  • Pins are named by port and bit (PA5), or by the Arduino header (D13, A0) where the board has one: both work in code and when wiring.
  • Register by register: the ports are on AHB1 (RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN), the peripherals on APB1 (45 MHz) and APB2 (90 MHz), and each bus's timers count at twice it: 90 and 180 MHz. Set the pin's two bits in MODER, its alternate function in AFR[0] or AFR[1] (USART1-3 are AF7, UART4 and UART5 AF8, I2C AF4, SPI1 AF5), then drive it with BSRR or ODR.
  • Above 168 MHz the regulator needs over-drive: PWR->CR ODEN, wait for ODRDY, then ODSWEN and ODSWRDY, with five flash wait states (FLASH->ACR LATENCY) before switching to the PLL. STM32duino's clock setup does this before setup().
  • The Cortex-M4F does float arithmetic in hardware (VADD.F32, VMUL.F32, VSQRT.F32) and double in software, so 1.0f is much faster than 1.0. The core turns the FPU on (SCB->CPACR) before setup().
  • 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.
  • D0 and D1 are not wired to PA3 and PA2 (solder bridges SB62 and SB63 are open), since those carry Serial to the ST-LINK. The F446RE has no PB11: its pin is VCAP1.
  • In the simulator, BOOT0, VIN and the NC pins connect to nothing; press B1 and B2 on the board drawing. ADC2 and ADC3 are not simulated yet.