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:
- • Input mode
- • Output mode
- • Alternate function
- • Analog mode (when available see Table 9)
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:
- – 20 I/Os in VFQFPN32
- – 20 I/Os in WLCSP36
Type acronyms correspond to:
- – I: Input
- – O: Output
- – I/O: Input Output
- – OD: Open Drain
Table 7. Alternate modes 0, 1 and 2
| Pin name | AF0 mode | AF1 mode | AF2 mode | |||
|---|---|---|---|---|---|---|
| Type | Signal | Type | Signal | Type | Signal | |
| Port A | ||||||
| PA0(1) | I/OD | I2C1_SCL | I | USART_CTS | O | IR_OUT |
| PA1(1) | I/OD | I2C1_SDA | O | IR_OUT | I/O | USART_TX |
| PA2 | I/O | DEBUG_SWDIO | I/O | USART_CK | - | - |
| PA3 | I | DEBUG_SWCLK | O | USART_RTS_DE | - | - |
| PA8 | I/O | USART_RX | O | RTC_OUT | O | RADIO_RX_SEQUENCE CE |
| PA9 | I/O | USART_TX | - | - | O | RTC_OUT |
| PA10 | - | - | I | LPUART_CTS | O | RADIO_TX_SEQUENC E |
| PA11 | O | RCC_MCO | - | - | O | RADIO_RX_SEQUENC CE |
| Port B | ||||||
| PB0 | I/O | USART_RX | O | LPUART_RTS_DE | I/O | TIM16_CH1 |
Table 7. Alternate modes 0, 1 and 2 (continued)
| Pin name | AF0 mode | AF1 mode | AF2 mode | |||
|---|---|---|---|---|---|---|
| Type | Signal | Type | Signal | Type | Signal | |
| PB1 | I/O | USART_CK | - | - | O | TIM16_CH1N |
| PB2 | O | USART_RTS_DE | - | - | I/O | TIM16_BRK |
| PB3 | I | USART_CTS | I/O | LPUART_TX | I/O | TIM17_CH1 |
| PB4 | I/O | LPUART_TX | - | - | O | TIM17_CH1N |
| PB5 | I/O | LPUART_RX | - | - | I/O | TIM17_BRK |
| PB6(1) | I/OD | I2C1_SCL | - | - | I/O | TIM17_CH1 |
| PB7(1) | I/OD | I2C1_SDA | - | - | I | USART_CTS |
| PB12(2) | - | - | O | RCC_LCO | I | LPUART_CTS |
| PB13(3) | - | - | - | - | - | - |
| PB14 | I/O | I2C1_SMBA | O | RADIO_TX_SEQUENC E | I | TIM2_ETR |
| PB15 | - | - | - | - | - | - |
- 1. This I/O is able to be configured in open-drain.
- 2. This I/O is shared with OSC32_OUT (low speed clock oscillator pin).
- 3. This I/O is shared with OSC32_IN (low speed clock oscillator pin).
Table 8. Alternate modes 3, 4, and 6
| Pin name | AF3 mode | AF4 mode | AF6 mode | |||
|---|---|---|---|---|---|---|
| Type | Signal | Type | Signal | Type | Signal | |
| Port A | ||||||
| PA0(1) | - | - | I/O | TIM2_CH3 | - | - |
| PA1(1) | - | - | I/O | TIM2_CH4 | - | - |
| PA2 | O | I2S3_MCK | I/O | TIM2_CH1 | I/O | TIM16_CH1 |
| PA3 | I/O | SPI3_SCK/ I2S3_SCK | I/O | TIM2_CH2 | O | TIM16_CH1N |
| PA8 | I/O | SPI3_MISO | I/O | TIM2_CH3 | I/O | TIM16_BRK |
| PA9 | I/O | SPI3_NSS/ I2S3_WS | I/O | TIM2_CH4 | I/O | TIM17_CH1 |
| PA10 | O | I2S3_MCK | I/O | - | O | TIM17_CH1N |
| PA11 | I/O | SPI3_MOSI/ I2S3_SD | I | - | I/O | TIM17_BRK |
| Port B | ||||||
| PB0 | - | - | - | - | O | ANT_ID[0] |
| PB1 | I | TIM2_ETR | - | - | O | ANT_ID[1] |
| PB2 | I/O | TIM2_CH3 | - | - | O | ANT_ID[2] |
| PB3 | I/O | TIM2_CH4 | I/O | SPI3_SCK/ I2S3_SCK | O | ANT_ID[3] |
| PB4 | - | - | I/O | TIM2_CH1 | O | ANT_ID[4] |
Table 8. Alternate modes 3, 4, and 6
| Pin name | AF3 mode | AF4 mode | AF6 mode | |||
|---|---|---|---|---|---|---|
| Type | Signal | Type | Signal | Type | Signal | |
| PB5 | - | - | I/O | TIM2_CH2 | O | ANT_ID[5] |
| PB6(1) | I/O | LPUART_TX | I/O | TIM2_CH1 | O | ANT_ID[6] |
| PB7(1) | I/O | LPUART_RX | I/O | TIM2_CH2 | O | RADIO_RF_ACTIVITY |
| PB12(2) | - | - | I/O | TIM2_CH3 | - | - |
| PB13(3) | - | - | I/O | TIM2_CH4 | - | - |
| PB14 | O | RCC_MCO | - | - | I/O | USART_RX |
| PB15 | - | - | - | - | I/O | USART_TX |
- 1. This I/O is able to be configured in open-drain.
- 2. This I/O is shared with OSC32_OUT (low speed clock oscillator pin).
- 3. This I/O is shared with OSC32_IN (low speed clock oscillator pin).
Concerning the ADC block present in the STM32WB09xE device:
- • The eight ADC channels are available on PA2, PA3, PB0, PB1, PB2, PB3, PB4, PB5
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 name | Analog feature | Parallel Analog feature | Pin name | Analog feature | Parallel Analog feature |
|---|---|---|---|---|---|
| Port A | Port B | ||||
| PA0 | N/A | - | PB0 | ADC_VINM1 | N/A |
| PA1 | N/A | - | PB1 | ADC_VINP1 | N/A |
| PA2 | ADC_VINM2 | - | PB2 | ADC_VINM0 | N/A |
| PA3 | ADC_VINP2 | - | PB3 | ADC_VINP0 | N/A |
| PA8 | N/A | - | PB4 | ADC_VINM3 | N/A |
| PA9 | N/A | - | PB5 | ADC_VINP3 | N/A |
| PA10 | N/A | - | PB6 | N/A | N/A |
| PA11 | N/A | - | PB7 | N/A | N/A |
| - | - | - | PB12 | - | RCC_OSC32_OUT (2) |
| - | - | - | PB13 | - | RCC_OSC32_IN (2) |
| - | - | - | PB14 | - | PVD VIN |
| - | - | - | PB15 | - | N/A |
- 1. N/A means Not Applicable as the associated I/O does not support analog option.
- 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.
| Pin name | Function | Pin name | Function |
|---|---|---|---|
| Port A | Port B | ||
| PA0 | Wakeup | PB0 | Wakeup |
| PA1 | Wakeup | PB1 | Wakeup |
| PA2 | Wakeup | PB2 | Wakeup |
| PA3 | Wakeup | PB3 | Wakeup |
| PA8 | Wakeup | PB4 | Wakeup |
| PA9 | Wakeup | PB5 | Wakeup |
| PA10 | Wakeup, RCC_LCO | PB6 | Wakeup |
| PA11 | Wakeup | PB7 | Wakeup |
| - | - | PB12 | Wakeup, RCC_OSC32_OUT (2) |
| - | - | PB13 | Wakeup, RCC_OSC32_IN (2) |
| - | - | PB14 | Wakeup |
| - | - | PB15 | Wakeup |
- 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.
- 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.