4. I/O operating modes

The STM32WB09xE device proposes up to 20 programmable I/Os (in all the package options).

Each I/O can be programmed in several modes:

The STM32WB09xE device supports six alternate modes called AFx (x = 0 to 4 and 6). The configuration of each I/O for those alternate modes is detailed in Table 7 and Table 8.

Note: The I/O features presented in Table 7 and Table 8 are valid only when the associated I/O is programmed as alternate function.

Refer to Section 7: General-purpose I/Os (GPIO) for more details on all configurations.

The number of I/Os available in the STM32WB09xE device depends on the package:

Type acronyms correspond to:

Table 7. Alternate modes 0, 1 and 2

Pin nameAF0 modeAF1 modeAF2 mode
TypeSignalTypeSignalTypeSignal
Port A
PA0(1)I/ODI2C1_SCLIUSART_CTSOIR_OUT
PA1(1)I/ODI2C1_SDAOIR_OUTI/OUSART_TX
PA2I/ODEBUG_SWDIOI/OUSART_CK--
PA3IDEBUG_SWCLKOUSART_RTS_DE--
PA8I/OUSART_RXORTC_OUTORADIO_RX_SEQUENCE
CE
PA9I/OUSART_TX--ORTC_OUT
PA10--ILPUART_CTSORADIO_TX_SEQUENC
E
PA11ORCC_MCO--ORADIO_RX_SEQUENC
CE
Port B
PB0I/OUSART_RXOLPUART_RTS_DEI/OTIM16_CH1

Table 7. Alternate modes 0, 1 and 2 (continued)

Pin nameAF0 modeAF1 modeAF2 mode
TypeSignalTypeSignalTypeSignal
PB1I/OUSART_CK--OTIM16_CH1N
PB2OUSART_RTS_DE--I/OTIM16_BRK
PB3IUSART_CTSI/OLPUART_TXI/OTIM17_CH1
PB4I/OLPUART_TX--OTIM17_CH1N
PB5I/OLPUART_RX--I/OTIM17_BRK
PB6(1)I/ODI2C1_SCL--I/OTIM17_CH1
PB7(1)I/ODI2C1_SDA--IUSART_CTS
PB12(2)--ORCC_LCOILPUART_CTS
PB13(3)------
PB14I/OI2C1_SMBAORADIO_TX_SEQUENC
E
ITIM2_ETR
PB15------
  1. 1. This I/O is able to be configured in open-drain.
  2. 2. This I/O is shared with OSC32_OUT (low speed clock oscillator pin).
  3. 3. This I/O is shared with OSC32_IN (low speed clock oscillator pin).

Table 8. Alternate modes 3, 4, and 6

Pin nameAF3 modeAF4 modeAF6 mode
TypeSignalTypeSignalTypeSignal
Port A
PA0(1)--I/OTIM2_CH3--
PA1(1)--I/OTIM2_CH4--
PA2OI2S3_MCKI/OTIM2_CH1I/OTIM16_CH1
PA3I/OSPI3_SCK/ I2S3_SCKI/OTIM2_CH2OTIM16_CH1N
PA8I/OSPI3_MISOI/OTIM2_CH3I/OTIM16_BRK
PA9I/OSPI3_NSS/ I2S3_WSI/OTIM2_CH4I/OTIM17_CH1
PA10OI2S3_MCKI/O-OTIM17_CH1N
PA11I/OSPI3_MOSI/ I2S3_SDI-I/OTIM17_BRK
Port B
PB0----OANT_ID[0]
PB1ITIM2_ETR--OANT_ID[1]
PB2I/OTIM2_CH3--OANT_ID[2]
PB3I/OTIM2_CH4I/OSPI3_SCK/ I2S3_SCKOANT_ID[3]
PB4--I/OTIM2_CH1OANT_ID[4]

Table 8. Alternate modes 3, 4, and 6

Pin nameAF3 modeAF4 modeAF6 mode
TypeSignalTypeSignalTypeSignal
PB5--I/OTIM2_CH2OANT_ID[5]
PB6(1)I/OLPUART_TXI/OTIM2_CH1OANT_ID[6]
PB7(1)I/OLPUART_RXI/OTIM2_CH2ORADIO_RF_ACTIVITY
PB12(2)--I/OTIM2_CH3--
PB13(3)--I/OTIM2_CH4--
PB14ORCC_MCO--I/OUSART_RX
PB15----I/OUSART_TX
  1. 1. This I/O is able to be configured in open-drain.
  2. 2. This I/O is shared with OSC32_OUT (low speed clock oscillator pin).
  3. 3. This I/O is shared with OSC32_IN (low speed clock oscillator pin).

Concerning the ADC block present in the STM32WB09xE device:

Note: The ADC features on those pins are available if the associated pin is configured in analog mode (see Section 7: General-purpose I/Os (GPIO) for more details).

Table 9 shows the mapping associated to analog configuration (for pins able to support analog mode).

Table 9. I/O Analog feature mapping(1)
Pin nameAnalog featureParallel Analog featurePin nameAnalog featureParallel Analog feature
Port APort B
PA0N/A-PB0ADC_VINM1N/A
PA1N/A-PB1ADC_VINP1N/A
PA2ADC_VINM2-PB2ADC_VINM0N/A
PA3ADC_VINP2-PB3ADC_VINP0N/A
PA8N/A-PB4ADC_VINM3N/A
PA9N/A-PB5ADC_VINP3N/A
PA10N/A-PB6N/AN/A
PA11N/A-PB7N/AN/A
---PB12-RCC_OSC32_OUT (2)
---PB13-RCC_OSC32_IN (2)
---PB14-PVD VIN
---PB15-N/A
  1. 1. N/A means Not Applicable as the associated I/O does not support analog option.
  1. The parallel analog feature is obtained by setting the RCC_CR.LSEON bit in the RCC registers. Then the PB12 and PB13 are forced by hardware to manage the LSE through RCC_OSC32_OUT/RCC_OSC32_IN whatever the selected mode in the associated GPIO_MODERx register, but if PWRC_CR1.APC bit is set, it's necessary to disable PUB12, PUB13, PDB12, PDB13 in PWRC registers.
Table 10. I/O Additional function mapping(1)
Pin nameFunctionPin nameFunction
Port APort B
PA0WakeupPB0Wakeup
PA1WakeupPB1Wakeup
PA2WakeupPB2Wakeup
PA3WakeupPB3Wakeup
PA8WakeupPB4Wakeup
PA9WakeupPB5Wakeup
PA10Wakeup, RCC_LCOPB6Wakeup
PA11WakeupPB7Wakeup
--PB12Wakeup, RCC_OSC32_OUT (2)
--PB13Wakeup, RCC_OSC32_IN (2)
--PB14Wakeup
--PB15Wakeup
  1. For the additional functions like Wakeup I/O, LSE oscillator, LCO configure the required function in the related PWRC, RCC, RTC registers. These functions have priority over the configuration in the standard GPIO registers.
  2. The additional functions for LSE oscillator are obtained by setting the RCC_CR.LSEON bit in the RCC registers. Then the PB12 and PB13 are forced by hardware to manage the LSE through RCC_OSC32_OUT/RCC_OSC32_IN whatever the selected mode in the associated GPIOx_MODER register, but if PWRC_CR1.APC bit is set, it's necessary to disable PUB12, PUB13, PDB12, PDB13 in PWRC registers.