Simvik

Nucleo-WBA55CG pinout

The Nucleo-WBA55CG (STM32WBA55CG) 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: STM32WBA55CGU6, 32-bit Arm Cortex-M33 with a single-precision floating-point unit, the DSP instructions and a 2.4 GHz radio (the radio is not simulated); TrustZone in the silicon, off here
  • Clock: 100 MHz (the 32 MHz crystal / 2 × 12.5 / 2 through PLL1, in voltage range 1, with three flash wait states); AHB and APB buses at 100 MHz
  • Flash / RAM: 1 MB / 128 KB (SRAM1 and SRAM2, 64 KB each)
  • Logic level: 3.3 V
  • Analog inputs: One 12-bit ADC (ADC4) on PA0–PA2, PA5–PA8 and PB9; A0–A5 are PA7, PA6, PA2, PA1, PA5 and PA0
  • PWM: Timer channels TIM1, TIM2, TIM3 (TIM2 and TIM3 32-bit), TIM16 and TIM17: 1 kHz by default
  • Serial: USART1 on PB12/PA8 through the ST-LINK (Serial); LPUART1 on D1/D0 (PB5/PA10), USART2
  • I2C and SPI: Wire is I2C1 on D14/D15 (PB1/PB2), SPI is SPI1 on D11–D13 (PA15, PB3, PB4); I2C3 on PA7/PA6, SPI3
  • Floating point: float in hardware; double in software
  • External interrupts: Any pin: EXTI line n takes pin n of one port, and each of the 16 lines has its own interrupt
  • On-board LEDs: LD1 blue on PB4 (LED_BUILTIN, also D13), LD2 green on PA9 (D9), LD3 red on PB8; each lit with its pin low
  • Buttons: B1 on PC13 (USER_BTN), B2 on PB6 and B3 on PB7, each reading low while pressed

Pins

PinFunctionsNotes
PB9PB9, EXTI9, D7, ADC4_IN10, TIM1_CH3N, TIM3_CH4, SPI3 MISO, TIM16_CH1, ~PWMThe ZIO connector's D7, where an Uno has it: the same pin, under that name in code too. Analog input: channel 10 of ADC4 (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()). SPI3 data in. analogWrite() PWM from TIM16_CH1, 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.
PA13PA13, EXTI13External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PA13), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA14PA14, EXTI14, USART2 TXUSART2 transmit (AF3). External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PA14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA9PA9, EXTI9, D9, TIM3_CH2, ~PWMThe ZIO connector's D9, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PA9), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC14PC14, EXTI14External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PC14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC15PC15, EXTI15External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PC15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA7PA7, EXTI7, A0, ADC4_IN2, TIM2_CH3, I2C3 SDA, ~PWMThe ZIO connector's A0, where an Uno has it: the same pin, under that name in code too. Analog input: channel 2 of ADC4 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH3, 1 kHz by default (analogWriteFrequency()). I2C3 data. External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PA7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA6PA6, EXTI6, A1, ADC4_IN3, TIM2_CH4, I2C3 SCL, ~PWMThe ZIO connector's A1, where an Uno has it: the same pin, under that name in code too. Analog input: channel 3 of ADC4 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH4, 1 kHz by default (analogWriteFrequency()). I2C3 clock. External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PA6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA2PA2, EXTI2, A2, ADC4_IN7, TIM3_CH1, LPUART1 TX, TIM16_CH1, ~PWMThe ZIO connector's A2, where an Uno has it: the same pin, under that name in code too. Analog input: channel 7 of ADC4 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). LPUART1 transmit (AF8). analogWrite() PWM from TIM16_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.
PA1PA1, EXTI1, A3, ADC4_IN8, TIM1_CH1N, TIM3_CH2, LPUART1 RX, TIM17_CH1, ~PWMThe ZIO connector's A3, where an Uno has it: the same pin, under that name in code too. Analog input: channel 8 of ADC4 (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()). LPUART1 receive (AF8). analogWrite() PWM from TIM17_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PA1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA8PA8, EXTI8, ADC4_IN1, TIM2_CH2, USART1 RX, ~PWMAnalog input: channel 1 of ADC4 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH2, 1 kHz by default (analogWriteFrequency()). USART1 receive (AF7). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PA8), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA5PA5, EXTI5, A4, ADC4_IN4, TIM2_CH1, SPI3 NSS, ~PWMThe ZIO connector's A4, where an Uno has it: the same pin, under that name in code too. Analog input: channel 4 of ADC4 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). SPI3 chip select. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PA5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB12PB12, EXTI12, TIM2_CH1, USART1 TX, ~PWManalogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). USART1 transmit (AF7). External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PB12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA0PA0, EXTI0, A5, ADC4_IN9, TIM1_CH2N, TIM3_CH3, SPI3 SCK, ~PWMThe ZIO connector's A5, where an Uno has it: the same pin, under that name in code too. Analog input: channel 9 of ADC4 (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()). SPI3 clock. External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PA0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB2PB2, EXTI2, D15, TIM1_CH1N, I2C1 SCL, I2C3 SCL, ~PWMThe ZIO connector's D15, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH1N, 1 kHz by default (analogWriteFrequency()). I2C1 clock. I2C3 clock. External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PB2), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB1PB1, EXTI1, D14, TIM1_CH2N, I2C1 SDA, I2C3 SDA, ~PWMThe ZIO connector's D14, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH2N, 1 kHz by default (analogWriteFrequency()). I2C1 data. I2C3 data. External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PB1), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB4PB4, EXTI4, D13, TIM1_CH3, USART2 RX, SPI1 SCK, TIM17_CH1, ~PWMThe ZIO connector's D13, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH3, 1 kHz by default (analogWriteFrequency()). USART2 receive (AF3). SPI1 clock. analogWrite() PWM from TIM17_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PB4), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB3PB3, EXTI3, D12, TIM1_CH4, I2C1 SDA, SPI1 MISO, TIM17_CH1N, ~PWMThe ZIO connector's D12, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH4, 1 kHz by default (analogWriteFrequency()). I2C1 data. SPI1 data in. analogWrite() PWM from TIM17_CH1N, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PB3), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA15PA15, EXTI15, D11, I2C1 SCL, SPI1 MOSIThe ZIO connector's D11, where an Uno has it: the same pin, under that name in code too. I2C1 clock. SPI1 data out. External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PA15), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA12PA12, EXTI12, D10, TIM1_CH2, USART2 TX, SPI1 NSS, ~PWMThe ZIO connector's D10, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH2, 1 kHz by default (analogWriteFrequency()). USART2 transmit (AF3). SPI1 chip select. External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PA12), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB15PB15, EXTI15, D8The ZIO connector's D8, where an Uno has it: the same pin, under that name in code too. External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PB15), handler, mode). Not 5 V tolerant: keep it at 3.3 V or below.
PB0PB0, EXTI0, D6, TIM1_CH3N, USART2 TX, ~PWMThe ZIO connector's D6, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH3N, 1 kHz by default (analogWriteFrequency()). USART2 transmit (AF3). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PB0), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB14PB14, EXTI14, D5, TIM3_CH3, USART1 TX, ~PWMThe ZIO connector's D5, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH3, 1 kHz by default (analogWriteFrequency()). USART1 transmit (AF7). External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PB14), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PA11PA11, EXTI11, D4, TIM1_CH1, USART2 RX, ~PWMThe ZIO connector's D4, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH1, 1 kHz by default (analogWriteFrequency()). USART2 receive (AF3). External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PA11), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB6PB6, EXTI6, D3, TIM2_CH1, ~PWMThe ZIO connector's D3, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PB6), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB7PB7, EXTI7, D2, TIM1_CH4N, ~PWMThe ZIO connector's D2, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH4N, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PB7), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB5PB5, EXTI5, D1, TIM3_CH1, LPUART1 TX, ~PWMThe ZIO connector's D1, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). LPUART1 transmit (AF8). External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PB5), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PC13PC13, EXTI13, B1The B1 button (USER_BTN): 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.
PA10PA10, EXTI10, D0, TIM3_CH1, LPUART1 RX, ~PWMThe ZIO connector's D0, where an Uno has it: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). LPUART1 receive (AF8). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PA10), handler, mode). 5 V tolerant (FT): a 5 V input is safe.
PB8PB8, EXTI8, LD3, TIM1_CH1, USART2 RX, SPI3 MOSI, TIM16_CH1N, ~PWMThe red user LED LD3 (LED3). analogWrite() PWM from TIM1_CH1, 1 kHz by default (analogWriteFrequency()). USART2 receive (AF3). SPI3 data out. analogWrite() PWM from TIM16_CH1N, 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.
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.
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).

Good to know

  • Pins are named by port and bit (PB4), or by their Arduino number (D13, A0): both work in code and when wiring. The chip has only ports A, B, C and H.
  • The connectors follow the board's manual (UM3301), where they are CN3 and CN4 (morpho) and CN5 to CN8 (Arduino). On a real board D0, D1 and D9 need solder bridges changed; here they are connected. The drawing is measured off ST's photo of this board, so its places are estimates.
  • After reset the chip runs from the 16 MHz HSI. The RCC here has its own layout: HPRE and the APB dividers in CFGR2 and CFGR3, PLL1 with a fraction (PLL1FRACR), and the HSE, a 32 MHz crystal, over two with CR HSEPRE. 100 MHz takes voltage range 1 (PWR->VOSR VOS) and three flash wait states.
  • The SPIs are the H7's kind (CFG1, CR2 TSIZE, CR1 CSTART), and ADC4 is the G0's kind (CHSELR, one sample time pair) with RES and SCANDIR in other places.
  • The Cortex-M33 runs here as everything non-secure, as STM32duino builds it, and an interrupt's EXC_RETURN reads 0xFFFFFFB8, 0xFFFFFFBC or 0xFFFFFFB0. TrustZone is not simulated.
  • Not simulated yet, and reported when used: the 2.4 GHz radio, the GPDMA (so no DMA on this board), the LPTIMs, AES, SAES, HASH, RNG, PKA and TSC.