4. I/O operating modes

The STM32WB05xZ device proposes up to 20 programmable I/Os (on all packages).

Each I/O can be programmed in several modes:

The STM32WB05xZ 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. GPIO alternate options AF0, AF1 and AF2 modes and Table 8. GPIOs AF3, AF4 and AF6 modes .

Note: I/Os features presented in Table 7. GPIO alternate options AF0, AF1 and AF2 modes and Table 8. GPIOs AF3, AF4 and AF6 modes are valid only when the associated I/O is programmed as alternate function.

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

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

Type acronyms correspond to:

Table 7. GPIO alternate options AF0, AF1 and AF2 modes

Pin nameAF0 modeAF1 modeAF2 mode
TypeSignalTypeSignalTypeSignal
Port A
PA0 (1)I/ODI2C1_SCLIUSART_CTSOIR_OUT
PA1 (1)I/ODI2C1_SDAOIR_OUTI/ODUSART_TX
PA2I/ODEBUG_SWDIOI/OUSART_CK--
PA3IDEBUG_SWCLKOUSART_RTS_DE--
PA8I/OUSART_RXORTC_OUTORADIO_RX_SEQUENCE
PA9I/OUSART_TX--ORTC_OUT
PA10--ILPUART_CTSORADIO_TX_SEQUENCE
PA11OMCO--ORADIO_RX_SEQUENCE
Port B
PB0I/OUSART_RXOLPUART_RTS_DEI/OTIM16_CH1
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_SEQUENCEITIM2_ETR
PB15------

1. This I/O is able to be configured in open-drain.

2. This I/O is shared with RCC_OSC32_OUT (low speed clock oscillator pin).

3. This I/O is shared with RCC_OSC32_IN (low speed clock oscillator pin).

Table 8. GPIOs AF3, AF4 and AF6 modes

Pin nameAF3 modeAF4 modeAF6 mode
TypeSignalTypeSignalTypeSignal
Port A
PA0 (1)I-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_MCK--OTIM17_CH1N
PA11I/OSPI3_MOSI / I2S3_SD--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]
PB5--I/OTIM2_CH2OANT_ID[5]
PB6 (1)I/OLPUART_TXI/OTIM2_CH1OANT_ID[6]
PB7 (1)I/OLPUART_RXI/OTIM2_CH2ORXACTIVITY
PB12 (2)--I/OTIM2_CH3--
PB13 (3)--I/OTIM2_CH4--
PB14OMCO--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 RCC_OSC32_OUT (low speed clock oscillator pin).
  3. 3. This I/O is shared with RCC_OSC32_IN (low speed clock oscillator pin).

Note: Concerning the ADC block present in the STM32WB05xZ device:

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

The Table 9. I/O analog feature mapping shows the mapping associated to analog configuration (for pins which can support analog mode).

Table 9. I/O analog feature mapping

Pin nameAnalog featurePin nameAnalog featureParallel analog feature
Port APort B
PA0N/A (1)PB0ADC_VINM1N/A (1)
PA1N/A (1)PB1ADC_VINP1N/A (1)
PA2ADC_VINM2PB2ADC_VINM0N/A (1)
PA3ADC_VINP2PB3ADC_VINP0N/A (1)
PA8N/A (1)PB4ADC_VINM3N/A (1)
PA9N/A (1)PB5ADC_VINP3N/A (1)
PA10N/A (1)PB6N/A (1)N/A (1)
PA11N/A (1)PB7N/A (1)N/A (1)
--PB12N/A (1)RCC_OSC32_OUT
--PB13N/A (1)RCC_OSC32_IN
--PB14N/A (1)PVD input voltage
--PB15N/A (1)N/A

1. N/A means not applicable as the associated I/O does not support analog option.

Table 10. I/O additional function mapping

Pin nameFunctionPin nameFunction
Port APort B
PA0WakeupPB0Wakeup
PA1WakeupPB1Wakeup
PA2WakeupPB2Wakeup
PA3WakeupPB3Wakeup
PA8WakeupPB4Wakeup
PA9WakeupPB5Wakeup
PA10Wakeup, RCC_LCOPB6Wakeup
PA11WakeupPB7Wakeup
--PB12Wakeup, RCC_OSC32_OUT (1)
--PB13Wakeup, RCC_OSC32_IN (1)
--PB14Wakeup
--PB15Wakeup

1. 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 is necessary to disable PUB12, PUB13, PDB12, PDB13 in PWRC registers.

Note: For the additional functions like Wakeup I/O, LSE oscillator, RCC_LCO configure the required function in the related PWRC, RCC, RTC registers. These functions have priority over the configuration in the standard GPIO registers.