16. Peripherals interconnect matrix

16.1 Introduction

Several peripherals have direct connections between them, enabling autonomous communication and/or synchronization. This saves CPU resources and consequently reduces power consumption. In addition, these hardware connections eliminate software latency and lead in more predictable system design.

Depending on the peripherals, these interconnections can operate in Run, Sleep, Stop 0, Stop 1, and Stop 2 modes.

16.2 Connection summary

Table 127. Peripherals interconnect matrix (1)(2)

SourceDestination
TIM1TIM2TIM3TIM4 (3)TIM16TIM17LPTIM1LPTIM2ADC4COMP1/2GPDMA1IRTIM (4)USART1USART2USART3 (3)LPUART1I2C1I2C2 (3)I2C3I2C4 (3)SPI1SPI2 (3)SPI3TAMPRTCAES/SAES
TIM1-111----215----------------
TIM21-11----2159---------------
TIM311-1-----15----------------
TIM4 (3)111------15----------------
TIM161111-------13--------------
TIM171111-------13--------------
LPTIM1--------2-9-1111111111111111111111---
LPTIM2----------9-111111-1111-111111----
ADC43-----------------------10-
USB OTG_HS (3)-6----------------------10-
Temperature sensor--------7-----------------
V CORE--------7-----------------
VREFINT--------7-----------------
HSE32----44--------------------
HSI16444444-4------------------
LSE-4--444-------------------
LSI----444-------------------
MCO----44--------------------
GPIO (exti)------552-9-1111111111111111111111---
RTC------55--9-111111111111111111111110--
Table 127. Peripherals interconnect matrix (1)(2) (continued)
SourceDestination
TIM1TIM2TIM3TIM4 (3)TIM16TIM17LPTIM1LPTIM2ADC4COMP1/2GPDMA1IRTIM (4)USART1USART2USART3 (3)LPUART1I2C1I2C2 (3)I2C3I2C4 (3)SPI1SPI2 (3)SPI3TAMPRTCAES/SAES
TAMP------55--9-------------12-
COMP11616161616161616--9-1111111111111111111111---
COMP2 (4)1616161616161616--9-11111111111111111111----
GPDMA1----------9-1111111111111111111111---
SYST ERR8---88--------------------
Backup registers-------------------------14
FLASH-------------------------14
AES/SAES-----------------------10-14
PKA-----------------------10--
TRNG-----------------------10--
IWDG-----------------------10--
DEBUG-----------------------10--

1. Numbers in this table are links to corresponding subsections of Section 16.3 .

2. The “-” symbol in grayed cells means no interconnect.

3. Not available on STM32WBA63xx devices.

4. Not available on STM32WBA64xx devices.

16.3 Interconnection details

16.3.1 Master to slave interconnection for timers

From timers (TIM1/TIM2/TIM3/TIM4/TIM16/TIM17) to timers (TIM1/TIM2/TIM3/TIM4).

Purpose

Some of the TIMx timers are linked together internally for timer synchronization or chaining.

When one timer is configured in master mode, it can reset, start, stop or clock the counter of another timer configured in slave mode.

The synchronization modes are detailed in:

Triggering signals

The output from master timer is on signal tim_trgo for TIM1/TIM2/TIM3/TIM4, and tim_oc for TIM16/TIM17, following a configurable timer event. The input to slave timer is on signals tim_itr .

The possible master/slave connections are given in:

Active power mode

Timers are active in Run and Sleep modes.

16.3.2 Triggers to ADC4

From GPIO ( exti ) and timers (TIM1/TIM2) and (LPTIM1) to ADC4.

Purpose

The timers (TIM1/TIM2) can be used to generate the ADC4 trigger event through the timer outputs tim_oc or tim_trgo . The low-power timer (LPTIM1) can be used to generate the ADC4 trigger event through output lptim1_ch1 . In addition, the GPIO via exti15 can be used to generate an ADC4 trigger event.

Triggering signals

The input trigger signal list and the description of the interconnection between ADC4 and timers and GPIO are given in:

Active power mode

Timers are active Run and Sleep mode. In addition, the low-power timer and GPIO are active in Stop 0 and Stop 1 modes.

16.3.3 ADC4 analog watchdog as trigger to timers

From ADC4 to timers (TIM1/TIM3).

Purpose

The internal analog watchdog output signals from ADC4 are connected to timers. ADC4 can provide trigger event through watchdog signals to timers (TIM1/TIM3) to reset, start, stop, or enable the counting.

Descriptions of the settings for the ADC analog watchdog and timer trigger are provided in:

Triggering signals

The output from ADC4 is on signals adc_awa (three watchdogs on ADC4) and the input to timer on signal tim_etr .

Active power mode

ADC4 is active in Run and Sleep modes, and an ADC4 conversion in autonomous mode in Stop 0 and Stop 1 modes can generate a wake-up interrupt and desired trigger action to timers.

16.3.4 Clock sources to timers

From HSE32, HSI16, LSE, LSI, and MCO to timers (TIM1/TIM2/TIM3/TIM4/TIM16/TIM17) and low-power timers (LPTIM1/LPTIM2).

Purpose

A timer input or clock can receive different clock sources and can be used, for example, to calibrate internal oscillators and a reference clock.

External clocks (HSE32, LSE), internal clocks (HSI16, LSI), and the microcontroller output clock (MCO) can be used as input to timers.

Triggering signals

The input to timers is on signals tim_etr or tim_ti1_in and for low-power timers on signals lptim_ic2_mux .

The possible connections are given in:

Active power mode

This feature is available in Run and Sleep modes.

16.3.5 Triggers to low-power timers

From RTC wake-up, RTC alarm, TAMP, GPDMA1, and LPTIM_ETR to low-power timers (LPTIM1/LPTIM2).

Purpose

Low-power timer counters may be started after the detection of an active edge on a trigger input (lptim_ext_trig0 to 5). This feature is detailed in Section 33.4.7: Trigger multiplexer .

Triggering signals

The input to low-power timer is on signals lptim_ext_trig.

The possible connections are given in Table 325: LPTIM1/2 external trigger connections .

Active power mode

This feature is available in Run and Sleep modes, and for autonomous peripherals in Stop 0, Stop 1, and Stop 2 modes.

16.3.6 USB OTG_HS trigger to timer

From USB OTG_HS (start-of-frame) to the timer (TIM2).

Purpose

The USB OTG_HS SOF (start-of-frame) can generate a trigger to the timer (TIM2).

Triggering signals

The input to timer on signal tim_itr11 is connected to USB OTG_HS usb_sof.

The possible connections are given in Table 297: TIMx internal trigger connection .

Active power mode

USB OTG_HS and the timer are active in Run and Sleep modes.

16.3.7 Internal analog signals to analog peripheral

From internal analog source to analog peripheral (ADC4).

Purpose

The internal reference voltage (V REFINT ), the internal temperature sensor (V SENSE ), and the digital core voltage (V CORE ) monitoring signals are connected to the analog peripheral (ADC4), as described in:

Input signals

The input to analog peripheral is on signals Vin.

The possible connections are given in Table 154: ADC interconnection .

Active power mode

ADC4 is active in Run, Sleep, Stop 0, and Stop 1 modes.

16.3.8 System errors as break signals to timers

From system errors to timers (TIM1/TIM16/TIM17).

Purpose

HSE32 clock security, CPU lockup, SRAM2 parity error, FLASH ECC double error detection, and PVD can generate system errors in the form of timer break toward timers (TIM1/TIM16/TIM17).

The purpose of the break function is to protect power switches driven by PWM signals generated by the timers. This feature is detailed in:

Break signals

The input to timer is on signals tim_sys_brk.

The possible connections are given in:

Active power mode

Timers are active in Run and Sleep modes.

16.3.9 Triggers to GPDMA1

From GPIO (exti), RTC, TAMP, timer (TIM2), low-power timers (LPTIM1/LPTIM2), COMP1/COMP2, GPDMA1, and ADC4 to GPDMA1.

Purpose

A GPDMA trigger can be assigned to a GPDMA channel x. A programmed GPDMA transfer can be triggered by a rising/falling edge of a selected input trigger event. The trigger mode can also be programmed to condition the linked-list item transfer.

More details are given in:

Triggering signals

The trigger mapping is specified in Table 132: Programmed GPDMA1 trigger .

Active power mode

This feature is available in Run and Sleep modes, and for autonomous peripherals in Stop 0 and Stop 1 modes.

16.3.10 Internal tamper sources

From LSE clock security, RTC, Debug, ADC4, AES/SAES, PKA, TRNG, and IWDG to TAMP.

Purpose

To detect any abnormal activity or tentative to corrupt the device, tampers are available to alert the system of such undesired events. Different actions can be taken as a consequence. More details are given in Section 38: Tamper and backup registers (TAMP) .

Resources

The list of tamper sources is available in Table 359: TAMP interconnection .

Active power mode

These interconnections are active in all power modes if the tamper source is enabled.

16.3.11 Triggers to communication peripherals

From Low-power timers (LPTIM1/LPTIM2), comparators (COMP1/COMP2), GPDMA1 transfer complete, GPIO (exti), RTC alarm, and RTC wake-up to I2C1, I2C2, I2C3, I2C4, USART1, USART2, USART3, LPUART1, SPI1, SPI2, and SPI3.

Purpose

Low-power timers (LPTIM1/LPTIM2) output channels (lptim1_ch1 and lptim2_ch1), comparators (COMP1/COMP2) output channels (comp1_out and comp2_out), GPIO (exti), RTC alarm, and RTC wake-up can be used as triggers to start communication on the selected I2C, USART, LPUART, and SPI peripherals.

A GPDMA1 transfer complete can trigger both the GPDMA1 regular or linked-list new transfers and communication on the selected communication peripheral.

These features are detailed in:

Triggering signals

The outputs from triggers are directly connected to peripheral trigger inputs.

The selection of input triggers is detailed in:

Active power mode

These interconnections remain active in Run, Sleep, and Stop modes if both source and communication peripheral are autonomous under the mode.

More details are given in:

16.3.12 Output from tamper

From TAMP to RTC.

Purpose

The RTC can timestamp a tamper event to retrieve history in time of such detection. The RTC can also control RTC_OUT and send tamp status tamp_evt outside the MCU. More details are given in Section 37.3.3: GPIOs controlled by the RTC and TAMP .

Active power mode

This interconnection remain active in all power modes if the tamper source is enabled.

16.3.13 Timers generating IRTIM signal

From timers (TIM16/TIM17) to IRTIM.

Purpose

Timers (TIM16/TIM17) output channels timx_oc1 are used to generate the waveform of the infrared signal output. The functionality is detailed in Section 34: Infrared interface (IRTIM) .

Active power mode

Timers are active in Run and Sleep modes.

16.3.14 From encryption keys to AES/SAES

From TAMP backup registers, system flash memory to and in between SAES and AES.

Purpose

The encryption mechanism requires a hardware key that must be stored in a protected non-volatile memory. Different approaches are implemented to load them in a non-readable way. Tamper backup registers or system Flash can be used to store respectively BHK or RHUK, and to implement a dedicated bus to pass it to the SAES. Refer to Section 27.4.14: SAES operation with wrapped keys for more details.

The AES encryption mechanism (faster than the SAES) can benefit from the sharing key of the SAES. Refer to Section 27.4.15: SAES operation with shared keys for more details.

Active power mode

AES and SAES are operational in Run and Sleep modes.

16.3.15 Blanking sources to comparators

From timers (TIM1/TIM2/TIM3/TIM4) to comparators (COMP1/COMP2).

Purpose

The advanced-control timer (TIM1) and general-purpose timers (TIM2/TIM3/TIM4) can be used as blanking window input to comparators (COMP1/COMP2).

The blanking function is described in Section 23.4.6: Comparator output-blanking function .

The blanking sources are given in:

Triggering signals

Timer output signals TIMx_OCx are the inputs to blanking source of comparators (COMP1/COMP2).

Active power mode

Timers are active in Run and Sleep modes.

16.3.16 Comparators as inputs, triggers or break signals to timers

From comparators (COMP1/COMP2) to timers (TIM1/TIM2/TIM3/TIM4/TIM16/TIM17) and low-power timers (LPTIM1/LPTIM2).

Purpose

Comparators (COMP1/COMP2) output values can be connected to timers (TIM1/TIM2/TIM3/TIM4/TIM16/TIM17) input captures or TIMx_ETR signals.

Comparators (COMP1/COMP2) output values can also generate break input signals for timer (TIM1) on input pins TIMx_BKIN or TIMx_BKIN2 through GPIO alternate function selection using open drain connection of I/Os.

Comparators (COMP1/COMP2) output values can be connected to low-power timers (LPTIM1/LPTIM2) input, input capture, and external trigger signals.

The possible connections are given in:

Active power mode

Timers are active in Run and Sleep modes, and low-power timers are also active in Stop 0, Stop 1, and Stop 2 modes.