4. I/O operating modes

The STM32WB07xC and STM32WB06xC devices propose up to 32 programmable I/Os (depending on the package).

Each I/O can be programmed in several modes:

The STM32WB07xC and STM32WB06xC devices support eight alternate modes called AFx (x = 0 to 7). The configuration of each I/O for those alternate modes is detailed in Table 8. GPIO alternate options AF3 - AF4 and Table 9. I/O analog feature mapping .

Caution: When an external slow clock XO is used (LSE on PB12 and PB13 I/Os), the USART transfers done on PB14 / PB15 I/Os in AF7 generate some disturbances on the slow clock.

Note: I/Os features presented in Table 8. GPIO alternate options AF3 - AF4 and Table 9. I/O analog feature mapping 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 STM32WB07xC and STM32WB06xC devices depends on the package:

Type acronyms correspond to:

Note: Pin names in bold indicate the I/O is able to wake up the device and is able to be in input or output during Deepstop.

Table 7. GPIO alternate options AF0 - AF2

Pin nameAF0 modeAF1 modeAF2 mode
TypeSignalTypeSignalTypeSignal
Port A
PA0 (1)I/ODI2C1_SCLIUSART_CTSOI2S2_MCK
PA1 (1)I/ODI2C1_SDAI/OSPI2_MISOI/ODUSART_TX
PA2I/ODEBUG_SWDIOI/OUSART_CKITIM_BKIN
PA3IDEBUG_SWCLKOUSART_RTS_DEITIM_BKIN2
PA4ORCC_LCOI/OSPI2_NSS/I2S2_WS--
PA5ORCC_MCOI/OSPI2_SCK/ I2S2_SCK--
PA6ILPUART_CTSI/OSPI2_MOSI/I2S2_SD--
PA7OLPUART_RTS_DEI/OSPI2_MISO--
PA8I/OUSART_RXI/OSPI1_MOSIORADIO_RX_SEQUENCE
PA9I/OUSART_TXI/OSPI1_SCKORTC_OUT
PA10ORCC_LCOI/OSPI1_MISOORADIO_TX_SEQUENCE
PA11ORCC_MCOI/OSPI1_NSSORADIO_RX_SEQUENCE
PA12 (1)I/OI2C1_SMBAI/ODEBUG_SWDIOI/OSPI1_NSS
PA13 (2)I/OI2C2_SCLIDEBUG_SWCLKI/OSPI1_SCK
PA14 (1)I/OI2C2_SDA--I/OSPI1_MISO
PA15 (1)I/OI2C2_SMBA--I/OSPI1_MOSI
Port B
PB0 (1)I/OUSART_RXOLPUART_RTS_DE--
PB1 (1)I/OSPI1_NSSOPDM_CLK--
PB2 (1)OUSART_RTS_DEIPDM_DATA--
PB3 (1)IUSART_CTSI/OLPUART_TX--
PB4 (1)I/OLPUART_TXI/OSPI2_MISO--
PB5 (1)I/OLPUART_RXI/OSPI2_MOSI
/I2S2_SD
--
PB6 (1)ODI2C2_SCLI/OSPI2_NSS
/I2S2_WS
--
PB7 (1)ODI2C2_SDAI/OSPI2_SCK
/I2S2_SCK
--
PB8I/OUSART_CKI/OLPUART_RX--
PB9I/OUSART_TXILPUART_CTSOI2S2_MCK
PB10I/OSPI1_NSSI/OSPI2_SCK
/I2S2_SCK
I/OI2C1_SDA
PB11I/OSPI1_SCKI/OSPI2_NSS
/I2S2_WS
I/OI2C1_SCL
PB12 (1)(2)I/OSPI1_SCKORCC_LCOIPDM_DATA
PB13 (1)(3)I/OSPI1_MISOI/OI2C2_SCLOPDM_CLK
PB14 (1)I/OSPI1_MOSII/OI2C2_SDAITIM1_ETR
PB15 (1)I/OI2C1_SMBAORADIO_TX_SEQUENCEORCC_MCO
  1. 1. This I/O is able to be configured as analog (mixedI/O) in VFQFPN32 package.
  2. 2. This I/O is shared with OSC32_OUT (low speed clock oscillator pin) available on VFQFPN48 package from a WLCSP49.
  3. 3. This I/O is shared with OSC32_IN (low speed clock oscillator pin).

Note: Refer to the device datasheet for details about the available pin for each supported device package.

Note: For Table 8. GPIO alternate options AF3 - AF4 , pin names in bold indicate the I/O is able to wake up the device and is able to be in input or output during Deepstop.

Table 8. GPIO alternate options AF3 - AF4

Pin nameAF3 modeAF4 mode
TypeSignalTypeSignal
Port A
PA0 (1)I-I/OTIM1_CH3
PA1 (1)O-I/OTIM1_CH4
PA2OI2S3_MCKO-
PA3I/OSPI3_SCK/
I2S3_SCK
O-
PA4I/OLPUART_TXI/OTIM1_CH1
PA5I/OLPUART_RXI/OTIM1_CH2
PA6I/OSPI2_NSS/
I2S2_WS
I/OTIM1_CH1
PA7I/OSPI2_SCK/I2S2_SCKI/OTIM1_CH2
PA8I/OSPI3_MISOI/OTIM1_CH3
PA9I/OSPI3_NSS/
I2S3_WS
I/OTIM1_CH4
PA10OI2S3_MCKO-
PA11I/OSPI3_MOSI/
I2S3_SD
O-
PA12 (2)I/OSPI2_MOSI/
I2S2_SD
I/OTIM1_CH1
PA13 (2)I/OSPI2_MISOITIM1_ETR
PA14 (2)--ITIM1_BKIN
PA15 (2)--ITIM1_BKIN2
Port B
PB0 (2)I/OTIM1_CH2N--
PB1 (2)ITIM1_ETR--
PB2 (2)I/OTIM1_CH3--
PB3 (2)I/OTIM1_CH4--
PB4 (2)IPDM_DATA--
PB5 (2)OPDM_CLK--
PB6 (1)I/OLPUART_TXI/OTIM1_CH1
PB7 (1)I/OLPUART_RXI/OTIM1_CH2
PB8I/OTIM1_CH4I/OTIM1_CH1N
PB9I/OTIM1_CH1NI/OTIM1_CH2N
PB10I/OTIM1_CH2I/OTIM1_CH3N
PB11I/OTIM1_CH1I/OTIM1_CH4N
PB12 (2)(3)ITIM1_BKINI/OTIM1_CH3
PB13 (2)(4)ITIM1_BKIN2I/OTIM1_CH4
PB14 (2)I/OTIM1_CH3NO-
PB15 (2)I/OTIM1_CH4NO-
  1. 1. This I/O is able to be configured in open-drain.
  2. 2. This I/O is able to be configured as analog (mixedI/O).
  3. 3. This I/O is shared with OSC32_OUT (low speed clock oscillator pin).
  4. 4. This I/O is shared with OSC32_IN (low speed clock oscillator pin).

Note: AF5, AF6, AF7 alternate functions:

PA2: SWDIO (AF5, AF7)

PA3: SWCLK (AF5, AF7)

PB14: USART_RX (AF7)

PB15: USART_TX (AF7)

Note: The STM32WB07xC and STM32WB06xC are provided with the RADIO_TX_SEQUENCE and RADIO_RX_SEQUENCE signals which alert, respectively, transmission and reception activities. A signal can be enabled for TX and RX on two pins, through alternate functions:

The signal is high when radio is in TX (or RX), low otherwise.

The signals can be used to control external antenna switching and support coexistence with other wireless technologies.

Note: Concerning the ADC block present in the STM32WB07xC and STM32WB06xC devices:

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

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

Note: Programming an alternate function sets the output value of the pin: I2C_SDA, I2C_SCL, I2C_SMBA set to 1, SPI_SCK, SPI_NSS, SPI_MISO, SPI_MOSI, SPI_MCK set to 0, UART_RX set to 0 and UART_TX set to 1.

Note: Refer to device the datasheet for details about the available pin for each supported device package.

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)
PA2N/A (1)PB2ADC_VINM0PGA_CAP0 (2)
PA3N/A (1)PB3ADC_VINP0PGA_CAP1 (2)
PA4N/A (1)PB4PGA_VINN/A (1)
PA5N/A (1)PB5PGA_VBIAS_MIC (3)N/A (1)
PA6N/A (1)PB6N/A (1)N/A (1)
PA7N/A (1)PB7N/A (1)N/A (1)
PA8N/A (1)PB8N/A (1)N/A (1)
PA9N/A (1)PB9N/A (1)N/A (1)
PA10N/A (1)PB10N/A (1)N/A (1)
PA11N/A (1)PB11N/A (1)N/A (1)
PA12ADC_VINM3PB12N/A (1)RCC_OSC32_OUT (4)
PA13ADC_VINP3PB13N/A (1)RCC_OSC32_IN (4)
PA14ADC_VINM2PB14N/A (1)PVD input voltage
PA15ADC_VINP2PB15N/A (1)N/A
  1. 1. N/A means not applicable as the associated I/O does not support analog option.
  2. 2. The selection between ADC_VINx0 and PGA_CAPx is done through a register in the SYSCFG block. See Section 8.2.11: I/O analog switch control register (GPIO_SWA_CTRL) .
  3. 3. This pin is not 5 V tolerant. All other 31 pins are 5 V tolerant.
  4. 4. 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.