4. I/O operating modes

STM32WL3Rxx devices propose up to 32 programmable I/Os (depending on the package).

Each I/O can be programmed in several modes:

STM32WL3Rxx devices support seven alternate modes called AFx (x = 0 to 6). The configuration of each I/O for those alternate modes is detailed in Table 8, Table 9 and Table 10. Some additional functions are also available see Table 11.

Note: The I/Os features presented in Table 8 and Table 9 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 STM32WL3Rxx has 17 available I/Os.

Type acronyms correspond to:

Table 8. GPIO alternate options AF0 - AF3(1)

Pin nameAF0 modeAF1 modeAF2 modeAF3 mode
TypeSignalTypeSignalTypeSignalTypeSignal
Port A
PA0(2)I/ODI2C1_SCLIUSART_CTS----
PA1(2)I/ODI2C1_SDAI/OUSART_TXI/OTIM16_BRK--
PA2I/OSWDIOI/OUSART_CKI/OTIM16_CH1OI2S3_MCK
PA3ISWCLKOUSART_RTS_DEOTIM16_CH1NI/OSPI3_SCK/
I2S3_CK
PA7----OLPUART_RTS_DE----
PA8I/ORTC_OUT
/RTC_TAMP1
/RTC_TS
I/OUSART_RXORX_SEQUENCEI/OSPI3_MISO
PA9--I/OUSART_TXORTC_OUTI/OSPI3_NSS/
I2S3_WS
PA10--ILPUART_CTSOTX_SEQUENCEOI2S3_MCK
PA11OMCO--ORX_SEQUENCEI/OSPI3_MOSI/
I2S3_SD
Port B
Table 8. GPIO alternate options AF0 - AF3(1) (continued)
Pin nameAF0 modeAF1 modeAF2 modeAF3 mode
TypeSignalTypeSignalTypeSignalTypeSignal
PB0(3)I/OUSART_RXOLPUART_RTS_DEI/OTIM16_CH1I/O-
PB1I/OUSART_CKI/OSWDIOOTIM16_CH1NI/O-
PB2OUSART_RTS_DEISWCLKI/OTIM16_BRKI/O-
PB6(2)I/ODI2C1_SCLI/OLPUART_TXO-I/OSPI3_SCK/
I2S3_CK
PB7(2)I/ODI2C1_SDAI/OLPUART_RXORF_ACTIVITYI/OSPI3_MOSI/
I2S3_SD
PB12(3)OUSART_RTS_DEILPUART_CTSOLCO--
PB13(4)I/O-------
PB14I/OI2C1_SMBAI/OUSART_RXOTX_SEQUENCEOMCO
PB15--I/OUSART_TXO---
  1. 1. STM32WL3Rxx devices are only available in the VFQFPN32 package.
  2. 2. This I/O is able to be configured in open-drain.
  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).
Table 9. GPIO alternate options AF4 - AF6(1)
Pin nameAF4 modeAF5 modeAF6 mode
TypeSignalTypeSignalTypeSignal
Port A
PA0(2)I/OTIM2_CH3--O-
PA1(2)I/OTIM2_CH4--O-
PA2I/OTIM2_CH1I/OSWDIOO-
PA3I/OTIM2_CH2ISWCLKO-
PA7I/OTIM2_CH2-----
PA8I/OTIM2_CH3--O-
PA9I/OTIM2_CH4--O-
PA10ISUBG_TX_DATA--O-
PA11OSUBG_TX_CLOCK--O-
Port B
PB0OANTENNA_SWITCH--O-
PB1OSUBG_RX_DATA--O-
PB2OSUBG_RX_CLOCK--O-
PB6(2)I/OTIM2_CH3--O-
PB7(2)ITIM2_ETR--O-
PB12(3)I/OTIM2_CH3----
PB13(4)I/OTIM2_CH4----
PB14ITIM2_ETR--O-
PB15----I/O-
  1. 1. STM32WL3Rxx devices are only available in the VFQFPN32 package.
  2. 2. This I/O is able to be configured in open-drain.
  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).

Concerning the ADC block present in the STM32WL3Rxx.

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 10 shows the mapping associated to analog configuration (for pins able to support analog mode).

Table 10. I/O Analog feature mapping(1) (2)

Pin nameAnalog featureParallel Analog featurePin nameAnalog featureParallel Analog feature
Port APort B
PA0N/A-PB0ADC_VINM1--
PA1N/A-PB1ADC_VINP1--
PA2ADC_VINM2-PB2ADC_VINM0--
PA3ADC_VINP2-PB6N/AN/A
PA7N/A-PB7N/AN/A
PA8N/A-PB12-SXTALO (3)
PA9N/A-PB13-SXTALI (3)
PA10N/A-PB14-PVD VIN(4)
PA11N/A-PB15-N/A
------
  1. N/A means Not Applicable as the associated I/O does not support analog option.
  2. STM32WL3Rxx devices are only available in the VFQFPN32 package.
  3. 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 SXTALO/SXTALI whatever the selected mode in the associated GPIO_MODERx register, but if APC is set is necessary to disable PUB12/PUB13/PDB12/PDB13 in PWR registers.
  4. The selection between ATB1 and PVD is done through a register in the SYSCFG block (see 8.2.11: I/O analog switch control register (GPIO_SWA_CTRL) for details).
Table 11. I/O Additional function mapping(1)
Pin nameFunctionPin nameFunction
Port APort B
PA0-PB0-
PA1-PB1-
PA2-PB2-
PA3-PB6-
PA7-PB7-
PA8-PB12SXTALO(2)
PA9-PB13SXTALI(2)
PA10LCOPB14-
PA11-PB15-
----
  1. 1. STM32WL3Rxx devices are only available in the VFQFPN32 package.
  2. 2. 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 SXTALO/SXTALI whatever the selected mode in the associated GPIO_MODERx register, but if APC is set is necessary to disable PUB12/PUB13/PDB12/PDB13 in PWR registers.