16. Peripherals interconnect matrix

16.1 Interconnect matrix introduction

Several peripherals have direct connections between them. This allows autonomous communication and or synchronization between peripherals, saving CPU resources, thus power supply consumption.

In addition, these hardware connections remove software latency and allow design of predictable system.

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

STMicroelectronics logo
STMicroelectronics logo

16.2 Connection summary

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

SourceDestination
TIM1TIM8TIM2TIM3TIM4TIM5TIM6TIM7TIM15TIM16TIM17LPTIM1/2/3LPTIM4ADC1/2ADC4MDF1ADF1OPAMP1/2DAC1/2COMP1/2GP/LPDMAIRTIMU(S)ARTsLPUART1I2CsSPIsTAMPRTCAES/SAES
TIM1-11111--1----225--49---------
TIM81-1111--1----2-5--49--------
TIM211-111--1----22---4916-------
TIM3111-11--1----2-5---916-------
TIM41111-1--1----2-5--4-16-------
TIM511111---1---------4-16-------
TIM6-------------225--4---------
TIM7---------------5--4---------
TIM1511111--------22---4916-------
TIM1611111---1------5-----14------
TIM1711111---1------------14------
LPTIM1-------------225--4-16-15151515---
LPTIM2-------------2------16-15-1515---
LPTIM3-------------22---4-16--151515---
LPTIM4-------------2------16-------
ADC1/233-33----------18----16-------
ADC433------------------16-----20-
MDF166--------------5-----------
ADF1---------------5------------
DAC1/2-----------------17-17--------
COMP1/2121212121212--12121288-------16-15151515---
GPDMA1--------------------16-15-1515---
LPDMA1-----------88-------16--151515---
EXTI-----------882255-4-16-15151515---
RTC wake-up-----10---1010---------16-15151515---
STMicroelectronics logo
STMicroelectronics logo
Table 134. Peripherals interconnect matrix (1) (2) (continued)
SourceDestination
TIM1TIM8TIM2TIM3TIM4TIM5TIM6TIM7TIM15TIM16TIM17LPTIM1/2/3LPTIM4ADC1/2ADC4MDF1ADF1OPAMP1/2DAC1/2COMP1/2GP/LPDMAIRTIMU(S)ARTsLPUART1I2CsSPIsTAMPRTCAES/SAES
RTC Alarm-----------88-------16-15151515---
TAMP-----------88-------16------2122
HSE---------77------------------
LSE--7--7--7777------19----------
CSS in LSE--------------------------20--
MSIS/MSIK777777---777-----------------
HSI777777---777-----------------
LSI-----7---777------19----------
MCO---------77------------------
VCORE--------------17--------------
VREFINT-------------1717----17---------
T sensor-------------1717--------------
VBAT-------------1717--------------
VBAT and temp monitor.--------------------------20--
OPAMP1/2-------------1717--------------
System errors1313------131313------------------
OTG_FS
OTG_HS
--11--------------------------
System flash----------------------------22
AES/SAES----------------------------22
LTDC--20202020--------------16--------
DSI--20202020--------------16--------
DMA2D--------------------16--------
GPU2D--------------------16--------
DCMI--20202020-----------------------

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

2. “-” means no interconnect.

16.3 Interconnection details

16.3.1 Master to slave interconnection for timers

From timer (TIM1/2/3/4/5/8/15/16/17) to timer (TIM1/2/3/4/5/8/15).

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.

A description of the feature is provided in Section 55.4.23: Timer synchronization .

The synchronization modes are detailed in:

Triggering signals

The output (from master) is on signal TIMx_TRGO (and TIMx_TRGO2 for TIM1/8) following a configurable timer event. It can be also from signals tim16_oc1 and tim17_oc1 in case of TIM16/17. The input (to slave) is on signals TIMx_ITR0/1/2/3.

The possible master/slave connections are given in:

Active power mode

Timers are optionally active in Run and Sleep modes. The effects of low-power modes on TIMx are given in:

16.3.2 Triggers to ADCs

From EXTI, timers (TIM1/2/3/4/5/6/8/15/16/17) and LP timers (LPTIM1/ 2/3/4) to ADC1/ADC2

From EXTI, timers (TIM1/2/6/15) and LP timers (LPTIM1/3) to ADC4

Purpose

A conversion, or a sequence of conversions, can be triggered either by software or by an external event (such as timer capture or input pins). For ADC12, if the EXTEN[1:0] control bits (for a regular conversion) or JEXTEN[1:0] bits (for an injected conversion) are different from 0b00, then external events can trigger a conversion with the selected polarity.

More details in:

General-purpose timers (TIM2/3/4/5), basic timer (TIM6), advanced-control timers (TIM1/8) and general-purpose timer (TIM15/16/17) can be used to generate the ADC triggering event through the timer outputs tim_oc and tim_trgo.

Low-power timers (LPTIM1/2/3/4) can be used to generate the ADC triggering event through the LPTIM channels (TIMx synchronization described in Section 54.3.31: ADC triggers for TIM1/8) in addition to the EXTI on channels 11 and 15.

The ADC4 do not have injected channels. The general-purpose timers (TIM2/15), basic timers (TIM6), and advanced-control timers (TIM1) can be used to generate the ADC triggering event through the timer outputs tim_oc and tim_trgo. Low-power timers (LPTIM1/3) can be used to generate the ADC triggering event through the LPTIM channels in addition to EXTI on channel 11 and 15.

Triggering signals

For ADC1/ADC2, the input triggering signals and the description of the interconnection between ADC1/ADC2, and timers, are given in:

For ADC4, the input triggering signals list and the description of the interconnection between ADC4 and timers, are given in:

Active power mode

This interconnection is active in Run and Sleep modes for all ADCs, and under Stop 0, Stop 1, and Stop 2 modes for ADC4 assuming that its trigger event line is active as well (such as LPTIM). The timers are active in Run and Sleep mode only. The effects of low-power modes are given in:

16.3.3 ADC analog watchdogs as triggers to timers

From ADC1/ADC4 to TIM1/3/8 on STM32U535/345/575/585.

From ADC1/ADC2/ADC4 to TIM1/3/4/8 on STM32U59x/5Ax/5Fx/5Gx.

Purpose

The internal analog watchdog output signals coming from ADC1/ADC2/ADC4, are connected to on-chip timers. ADC1/ADC2/ADC4 can provide trigger event through analog watchdog signals to advanced-control timers (TIM1/3/4/8) in order to reset, start, stop, or clock the counter.

Settings description of the ADC analog watchdog and timer trigger, are provided in:

Triggering signals

The output (from ADC) is on signals ADCn_AWDx_OUT, with n being the ADC instance and x = 1, 2, 3 (three watchdogs per ADC). The input (to timer) is on signal TIMx_ETR (external trigger).

Active power mode

ADC1/ADC2 and ADC4 are active in Run and Sleep modes.

The ADC4 conversion is functional and autonomous in Stop 0, Stop 1, and Stop 2 modes. This conversion can generate a wake-up interrupt and desired trigger action on timers.

16.3.4 Triggers to DAC

From timer (TIM1/2/4/5/6/7/8/15), Low-power timers (LPTIM1/3) and EXTI to DAC (DAC1/2)

Purpose

General-purpose timers (TIM2/4/5/15), basic timers (TIM6/7), advanced-control timers (TIM1/8), LP timers (LPTIM1/3) outputs channels (lptim1_ch1 and lptim3_ch1) and EXTI can be used as triggering event to start a DAC conversion.

Triggering signals

The output (from timer) on the TIMx_TRGO signal and from LP timers are directly connected to corresponding DAC inputs.

The selection of input triggers on DAC is provided in:

Active power mode

This interconnect is active in Run, Sleep, Stop 0, Stop 1, and Stop 2 modes.

16.3.5 Triggers on MDF1 or ADF1

From EXTI, ADF1, timers (TIM1/3/4/6/7/8/16) and LP timer (LPTIM1), to MDF1

From EXTI and MDF1 to ADF1

Purpose

General-purpose timers (TIM3/4/16), basic timers (TIM6/7), advanced-control timers (TIM1/8), low-power timer (LPTIM1), EXTI (EXTI11/15) and ADF1 can be used to generate a triggering event on MDF1 module and start an ADC conversion. In addition, EXTI15 and MDF1 can trigger ADF1.

A description is given in:

Triggering signals

The mdf_trgi[13:0] trigger inputs are the triggering input signals. The MDF and ADF trigger inputs connections are detailed in:

Active power mode

This interconnection remains active down to Stop 0 and Stop 1 modes for MDF1, and Stop 0, Stop 1, and Stop 2 modes for ADF1, assuming the trigger source remains active.

16.3.6 Timer break from MDF1

From MDF1 to advanced-control timer (TIM1/8)

Purpose

The MDF features an out-of-limit detectors (OLD) and a short circuit detector (SCD) functions. When a short-circuit or open-circuit errors (such as over current or over voltage) is detected an interrupt event or/and a break signal can be generated to TIM1/8.

This behavior is described in:

Triggering signals

The mdf1_break[0:3] output signals are connected to break1 and break2 inputs signals of TIM1/8. The tables below gives the assignment of break signals:

Active power mode

This interconnection is active under Run and Sleep modes. Refer to:

16.3.7 Clock sources to timers

From HSE, LSE, LSI, MSIK, HSI and MCO to timers (TIM1/2/3/4/5/8/15/16/17) and LP timers (LPTIM1/2/3)

Purpose

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

External clocks (HSE, LSE), internal clocks (LSI, MSI, HSI) and microcontroller output clock (MCO) can be used as input to timers:

an external clock source in mode1 (tim_ti1 or tim_ti2 signals). Inputs assignment and clock selection description are detailed in:

Triggering signals

Lptim_ic2_mux1 LPTIM input capture selection can be set in the LPTIM configuration register 2 (LPTIM_CFGR2). For timers, the internal clock signal can be selected as counter clock provided by an external clock source in mode1 (tim_ti1_in) and mode2 (external trigger input tim_etr_in).

Active power mode

This feature is available under Run and Sleep modes.

16.3.8 Triggers to low-power timers

From comparators (COMP1/2), EXTI, TAMP and RTC alarm to LP timers (LPTIM1/2/3/4)

Purpose

LPTIM1/2/3/4 counters may be started either by software or after the detection of an active edge on one of the eight trigger inputs (see Section 58.4.7: Trigger multiplexer ).

GPIO can also be selected as LPTIM input capture selection or LPTIM input selection, according to the LPTIM configuration register 2 (LPTIM_CFGR2).

Triggering signals

This trigger feature is described in Section 58.4.7: Trigger multiplexer and the following sections. The input selection is described in Table 604: LPTIM1/2/3/4 external trigger connections .

Active power mode

This interconnection remains active down to Stop 2 mode.

16.3.9 Blanking sources to comparators

From timers (TIM1/2/3/4/5/8/15/16/17) to comparators (COMP1/2)

Purpose

Advanced-control timers (TIM1/8) and general-purpose timers (TIM2/3/4/5/15/16/17) can be used as blanking window input to COMP1/2.

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

The blanking sources are given in:

Triggering signals

Timer output signal TIMx_Ocx are the inputs to blanking source of COMP1/2.

Active power mode

This feature is available under Run and Sleep modes.

16.3.10 RTC wake-up as inputs to timers

From RTC to timers (TIM5/16/17)

Purpose

RTC wake-up interrupt can be used as input to general-purpose timers (TIM5/16/17) channel 1.

Triggering signals

RTC wake-up signal is connected to tim_ti1_in3 signal as described in Table 559: Interconnect to the tim_ti1 input multiplexer for TIM5.

RTC wake-up signal is connected to tim_ti1_in4 signal as described in Table 578: Interconnect to the tim_ti1 input multiplexer for TIM16/TIM17.

Active power mode

This interconnection is active down to Stop 3 mode. Timers are not active but the count is performed at wake-up.

16.3.11 OTG_FS/OTG_HS SOF as trigger to timers

From OTG_FS/OTG_HS SOF to TIM2

Purpose

The OTG_FS/OTG_HS SOF (start-of-frame) can generate a trigger to the general-purpose timer TIM2. The OTG_FS/OTG_HS connection to TIM2 is described in Table 563: TIMx internal trigger connection .

Triggering signals

The tim_itr11 internal signal is generated by the OTG_FS/OTG_HS SOF.

Active power mode

This interconnection is active in Run and Sleep modes.

16.3.12 Comparators as inputs, trigger or break signals to timers

From comparators to timers (TIM1/2/3/4/5/8/15/16/17)

Purpose

The comparators (COMP1/2) output values can be connected to timers (TIM1/2/3/4/5/8/15/16/17) input captures, TIMx_ETR or timer break signals. The connection to ETR is described in Section 54.3.6: External trigger input .

Comparators (COMP1/2) output values can also generate break input signals for timers (such as TIM1 or TIM8). The sources for break (tim_brk) channel are one of the following:

Triggering signals

The tim_etr and tim_brk signals connected TIM1/8 (coming from COMP1/2) are given in:

For TIM2/3/4/5, the sources connected to the tim_ti[1:4] input multiplexers coming from comparators and some other peripherals, are given in:

For TIM15/16/17, the sources connected to timers coming from comparators and other peripherals are given in:

Active power mode

Run, Sleep, and wake-up capability in Stop 0, Stop 1, and Stop 2 modes for trigger sources. Input and break remain active in same low-power modes as timers activity, on Run and Sleep modes.

16.3.13 System errors as break signals to timers

From system errors to timers (TIM1/8/15/16/17)

Purpose

CSS, CPU lockup, SRAM2/3 ECC double errors, FLASH ECC double-error detection and PVD can generate system errors in the form of timer break toward timers (TIM1/8/15/16/17).

The purpose of the break function is to protect power switches driven by PWM signals generated by the timers.

Triggering signals

The possible sources of break are described in:

Active power mode

Timers are optionally active in Run and Sleep modes. The effects of low-power modes on TIMx are given in:

16.3.14 Timers generating IRTIM signal

From timers (TIM16/17) to IRTIM

The general-purpose timer (TIM16/17) output channels TIMx_OC1, are used to generate the waveform of the infrared signal output.

This functionality is described in Section 60: Infrared interface (IRTIM) .

16.3.15 Triggers for communication peripherals

From LP timers (LPTIM1/2/3), comparators (COMP1/2), GPDMA1 transfer complete, LPDMA1 transfer complete, EXTI, RTC alarm and RTC wake-up to USART1/2/3/6, UART4/5, LPUART1, I2C1/2/3/4/5/6, and SPI1/2/3.

Purpose

LP timer (LPTIM1/3) output channels (lptim1_ch1, lptim1_ch2 and lptim3_ch1), comparator (COMP1/2) output channels (comp1_out and comp2_out), EXTI, RTC alarm and RTC wake-up, can be used as trigger to start a communication on the selected USART, UART, LPUART, I2C, or SPI peripheral.

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

A LPDMA1 transfer complete can trigger both the LPDMA1 new transfers and the communication on selected peripheral.

Triggering signals

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

The selection of input triggers is detailed in:

The outputs (from timer) are directly connected to SPI1/2/3 inputs on signals spi_itrx (x = 6, 7). The selection of input triggers on SPI is provided in:

Active power mode

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

16.3.16 Triggers to GPDMA/LPDMA

From EXTI, RTC (alarm/wake-up), TAMP (TAMP1/2/3), timers (TIM2/15), LP timers (LPTIM1/3/4), comparators (COMP1/2), LP/GPDMA1 transfer complete (gpdma1_chx_tc/lpdma1_chx_tc), ADC1/4 analog watchdog, and LTDC, DSI, DMA2D, GPU2D, JPEG, to LPDMA1 and GPDMA1

Purpose

A LP/GPDMA trigger can be assigned to a LP/GPDMA channel x. A programmed LP/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 LLI link transfer. More details are given in the sections below:

Triggering signals

LPDMA trigger mapping is specified in Table 150: Programmed LPDMA1 trigger , according to LPDMA_CxTR2.TRIGSEL[5:0].

GPDMA trigger mapping is specified in Table 139: Programmed GPDMA1 trigger , according to GPDMA_CxTR2.TRIGSEL[5:0].

Active power mode

Assuming sources are active down to Stop modes, this interconnection remains functional in Stop 0 and Stop 1 modes for GPDMA, and Stop 0, Stop 1, and Stop 2 modes for LPDMA.

Refer to:

16.3.17 Internal analog signals to analog peripherals

From internal analog source to ADC (ADC1/2/4), comparators (COMP1/2) and OPAMP (OPAMP1/2)

Purpose

The internal reference voltage ( \( V_{REFINT} \) ), the internal temperature sensor ( \( V_{TS} \) ), and \( V_{BAT} \) monitoring channel are connected to ADC (ADC1/2/4) input channels. In addition, the internal digital core voltage ( \( V_{CORE} \) ) is connected to ADC1/2/4 input channels.

DAC channels (DAC1_OUT/DAC2_OUT) and VREFINT are connected to comparators (COMP1/2).

OPAMP1/2 outputs can be connected to ADC1 or ADC4 input channels through the GPIO. DAC1_OUT1 can be connected to OPAMP1_VINP. DAC1_OUT2 can be connected to OPAMP2_VINP.

Refer to Table 341: DAC internal input/output signals for:

This is according to:

Active power mode

These interconnections remain in Stop modes if the selected peripheral is kept active.
Refer to:

16.3.18 ADC data filtering by the MDF1

From ADC1/ADC2 to MDF1

Purpose

The MDF1 allows the connection of up to two ADCs to the filter path. For each filter, the DATSRC[1:0] field in the MDF digital filter configuration register x (MDF_DFLTxCICR) is used to select either data from the ADCs in:

Active power mode

This feature remains available down to Sleep mode.

16.3.19 Clock source for the DAC sample and hold mode

LSI/LSE to DAC1/2

Purpose

DAC1/2 can run in Stop mode. The sample and hold block and its associated registers use the LSI or LSE clock source (dac_hold_ck) in Stop mode.

Table 341: DAC internal input/output signals:

dac_hold_ck, Input, DAC low-power clock used in sample and hold mode

Active power mode

This feature remains available down to Stop 2 mode.

16.3.20 Triggers from graphic interfaces to timers

From DCMI, LTDC, DSI to timers (TIM2/TIM3/TIM4/TIM5) (for STM32U59x/5Ax/5Fx/5Gx) and GFXTIM (for STM32U5Fx/5Gx)

Purpose

DCMI, LTDC and DSI synchronization signals can be used as triggering event to start the timers.

Triggering signals

The inputs (to DCMI, LTDC, and DSI) are directly connected to the timers (TIM2/3/4/5). External trigger as described in Table 565: Interconnect to the tim_etr input multiplexer for the STM32U59x/5Ax/5Fx/5Gx .

GFXTIM input trigger as described in Table 619: GFXTIM trigger interconnections .

Active power mode

This feature remains available down to Sleep mode. Refer to Section 68.6: SPI in low-power modes .

16.3.21 Internal tamper sources

From internal peripherals, clocks or monitoring to tamper.

Purpose

In order to detect any abnormal activity or tentative to corrupt the device, tampers are introduced and alert the system of such undesired event. Different actions can be taken in consequences.

List of tamper sources can be found in Table 644: TAMP interconnection .

Active power mode

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

16.3.22 Output from tamper to RTC

From TAMP to RTC

Purpose

The RTC can timestamp a tamper event in order to retrieve history in time of such detection. The RTC can also control GPIOs and set a signal based on tamp or alarm status outside the MCU.

Refer to section Section 63.3.3: GPIOs controlled by the RTC and TAMP for more details.

Active power mode

This interconnection remains active in all power modes.

16.3.23 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 in order to load them in a non-readable way. Tamper backup registers or system flash memory can be used to store respectively BHK or RHUK, and to implement a dedicated bus to pass it to the SAES.

Refer to Section 50.4.9: 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 49.4.13: AES operation with shared keys for more details.

Active power mode

AES and SAES are operating under Run and Sleep modes.