15. Peripherals interconnect matrix

15.1 Interconnect matrix introduction

Several peripherals have direct connections between them, enabling autonomous communication and/or synchronization: this approach saves CPU resources, and power supply consumption. In addition, these hardware connections remove software latency and help the design of predictable system.

Depending on peripherals, these interconnections can operate in Run, Sleep, and Stop modes.

15.2 Connection summary

Table 139. Peripherals interconnect matrix(1)(2)(3)

SourceDestination
TIM1TIM8TIM2TIM3TIM4TIM5TIM6TIM7TIM12TIM15TIM16TIM17LPTIM1LPTIM2LPTIM3/4/5/6ADC1/2ADC3COMP1COMP2DAC1/2GPDMA1/2TAMPRTCDTSPLAYAES/SAES
TIM1-11111--11-----2217174------
TIM81-1111--11-----2217174------
TIM211-111--11-----221717410---20-
TIM3111-11--11-----221717-----20-
TIM41111-1--11-----22--4------
TIM511111---11---------4------
TIM6---------------22--4------
TIM7-------------------4------
TIM12111111-------------410-----
TIM13111111--11----------------
TIM14111111--11----------------
TIM1511111---1------22-17410-----
TIM1611111---1-----------------
TIM1711111---1-----------------
LPTIM1/2---------------2217-410--2120-
LPTIM3/4/5/6--------------------10-----
ADC133----------------------3-
ADC233-------------------13--3-
ADC3-3------------------------
COMP1161616161616--1616--666----410---20-
COMP2161616161616--1616--666----410---20-
Table 139. Peripherals interconnect matrix(1)(2)(3) (continued)
RM0481 Sourcecolumn_2column_3column_4column_5column_6column_7column_8column_9column_10column_11column_12column_13column_14column_15TIM3/4/5/6 P Lcolumn_17column_18column_19column_20column_21G /2 P D M A1column_23column_24column_25column_26S/S S A E A E
TIM2 L P
C1 /2 D A
C O M P 2
C1 /2 A D
TIM1 L P
C O M P1
TIM15
TIM16
TIM12
T A M P
C A D 3
P LA Y
TIM4
TIM6
TIM7
TIM2
C R T
TIM1
S D T
GPDMA1/2--------------------10-----
EXTI------------6-62---410--21--
RTC wake-up -----7----7---------10-----
RTC alarm------------6-6-----10-----
TAMP------------6-6-----10-14--15
HSE----------5---------------
LSE--5------55--------12------
CSS in LSE---------------------13----
CSI--------55---------------
HSI--------5-----------------
LSI----------5---------------
MCO1-----------5------------19-
MCO2---------5--------------19-
VCORE---------------11 11---------
VREFINT---------------11 11---------
Vsensor---------------11 11---------
VBAT8---------------11 11---------
monitor---------------------13----
System errors88-------888--------------
memory-------------------------15
USART1/2-------------------------20
SPI1/2-------------------------20
AES/SAES-------------------------15
Ethernet--99----------------------
PLAY18 18 18---------662---41021----
EVENTOUT-------------------10----20
1. Numbers in this table are links to corresponding subsections ofSection 15.3.
  1. 1. Numbers in this table are links to corresponding subsections of Section 15.3.
  2. 2. “-” means no interconnect.
  3. 3. Refer to the product datasheet for the availability of peripherals. If the peripheral is not present, consider the associated interconnection as unavailable.

15.3 Interconnection details

15.3.1 Master to slave interconnection for timers

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

Purpose

Some timers are linked together internally for 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 44.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:

15.3.2 Triggers to ADCs

From EXTI, timers (TIM1/2/3/4/6/8/15), low-power timers (LPTIM1/2), and PLAY to ADC1/ADC2/ADC3.

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] (for a regular conversion) or JEXTEN[1:0] bits (for an injected conversion) are different from 0b00, external events can trigger a conversion with the selected polarity.

More details in:

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

Low-power timers (LPTIM1/2) can be used to generate the ADC triggering event through the LPTIM channels, in addition to the EXTI on channels 11 and 15.

PLAY can be used to generate the ADC triggering event through the PLAY outputs 7 and 9.

Triggering signals

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

Active power mode

This interconnection is active in Run and Sleep modes for all ADCs. The timers are active only in Run and Sleep modes. The effects of low-power modes are given in:

15.3.3 ADC analog watchdogs as triggers to timers and PLAY

From ADC1/ADC2/ADC3 to TIM1/8 and from ADC1/ADC2 to PLAY.

Purpose

The internal analog watchdog output signals coming from ADC1/ADC2/ADC3 are connected to on-chip timers. ADC1/ADC2/ADC3 can provide trigger events through analog watchdog signals to advanced-control timers (TIM1/8) 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).

The inputs (to PLAY) are on signal PLAY1_IN[15:0].

Active power mode

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

15.3.4 Triggers to DAC

From timer (TIM1/2/4/5/6/7/8/15), low-power timers (LPTIM1/2), COMP1/2, and EXTI to DAC.

Purpose

General-purpose timers (TIM2/4/5/15), basic timers (TIM6/7), advanced-control timers (TIM1/8), low-power timers (LPTIM1/2) outputs channels (lptim1_ch1 and lptim2_ch1), comparators (COMP1/2) output channels (comp1_out and comp2_out), 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 low-power 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, and Stop modes.

15.3.5 Clock sources to timers

From HSE, LSE, LSI, HSI, and MCO to timers (TIM2/12/15/16/17) and LP timers (LPTIM1/2).

Purpose

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

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

mode1 (tim_ti1_in) and mode2 (external trigger input tim_etr_in). 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.

15.3.6 Triggers to low-power timers

From EXTI, TAMP, PLAY, comparators (COMP1/2), GPDMA1, and RTC alarm to low-power timers (LPTIM1/2/3/4/5/6).

Purpose

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

RTC alarm, TAMP input detection, COMP1_OUT, and GPDMA transfer complete can be used as a trigger to start LPTIM counters (LPTIM1/2).

Triggering signals

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

Active power mode

This interconnection is active in Run, Sleep, and Stop modes.

15.3.7 RTC wake-up as inputs to timers

From RTC to timer (TIM16).

Purpose

RTC wake-up interrupt can be used as input to general-purpose timer (TIM16) channel 1.

Triggering signals

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

Active power mode

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

15.3.8 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, SRAM1 parity 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:

15.3.9 Triggers for communication peripherals

From Ethernet to timers (TIM2/TIM3).

Purpose

To synchronize system clock with network, internal connections are available between timers and PTP to check for clock drifts.

Triggering signals

Active power mode

These interconnections remain active in Run and Sleep modes.

15.3.10 Triggers to GPDMA1/2

From EXTI, RTC (alarm/wake-up), TAMP, timers (TIM2/12/15), low-power timers (LPTIM1/2/3/4/5/6), comparators (COMP1/2), PLAY, EVENTOUT, GPDMA1 transfer complete (gpdma1_chx_tc, gpdma2_chx_tcf) to GPDMA1/2.

Purpose

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

Triggering signals

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

Active power mode

This interconnection remains functional in Sleep mode.

Refer to Section 16.6: GPDMA in low-power modes

15.3.11 Internal analog signals to analog peripherals

From internal analog source to ADC (ADC1/ADC2/ADC3).

Purpose

The internal reference voltage (\(V_{REFINT}\)), the internal temperature sensor (\(V_{SENSE}\)), the internal digital core voltage (\(V_{DDCORE}\)), and the \(V_{BAT}\) monitoring channel are connected to ADC (ADC1/ADC2/ADC3) input channels.

This is according to:

15.3.12 Clock source for the DAC sample and hold mode

From LSI/LSE to DAC1.

Purpose

DAC1 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 305: 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 in Run, Sleep and Stop modes.

15.3.13 Internal tamper sources

From internal peripherals, clocks, or monitoring, to tamper.

Purpose

To detect any abnormal activity or tentative to corrupt the device, embedded tampers alert the system of undesired events. Different actions can be taken as consequence.

The list of tamper sources can be found in Table 569: TAMP interconnection.

Active power mode

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

15.3.14 Output from tamper to RTC

From TAMP to RTC.

Purpose

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

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

Active power mode

This interconnection remains active in all power modes.

15.3.15 Encryption keys to AES/SAES

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

Purpose

The encryption mechanism requires an hardware key that must be stored in a protected nonvolatile memory. Different approaches are implemented 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 38.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 38.4.15: SAES operation with shared keys for more details.

Active power mode

AES and SAES are operating under Run and Sleep modes.

15.3.16 Comparators as inputs, trigger, or break signals to timers1

From comparators to timers (TIM1/2/3/4/5/8/12/15).

Purpose

The comparators (COMP1/2) output values can be connected to timers (TIM1/2/3/4/5/8/12/15) input captures, TIMx_ETR, or timer break signals. The connection to ETR is described in Section 43.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 the 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 TIM12, the sources connected to timers coming from comparators and other peripherals, are given in:

For TIM15, 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 the same low-power modes as timer activities, specifically during Run and Sleep modes.

15.3.17 Blanking sources to comparators

From timers (TIM1/2/3/8/15) and low-power timers (LPTIM1/2) to comparators (COMP1/2).

Purpose

Advanced-control timers (TIM1/8), general-purpose timers (TIM2/3/15), and low-power timers (LPTIM1/2) can be used as blanking window input to COMP1/2.

The blanking function is described in Section 32.3.7: Comparator output blanking function.

The blanking sources are given in:

Triggering signals

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

The low-power timer output signal lptimx_ch2 are the input to the blanking source of COMP1.

Active power mode

This feature is available under Run and Sleep modes.

15.3.18 Play as input to timers

From PLAY to TIM1/TIM2/TIM3/TIM8.

Purpose

The PLAY outputs can be connected to the advanced-control timers (TIM1/8) and general-purpose timers (TIM2/3).

Triggering signals

Timer input signals of the timers are connected to the output signals of the PLAY play_out[3:0].

More details for connections are given in:

Active power mode

These interconnections remain active in Run and Sleep modes.

15.3.19 Clock source to PLAY

MCO1/2 to PLAY

Purpose

Microcontroller output clock (MCO): MCO1/2 can be used as an input to the programmable logic array PLAY.

Triggering signals

MCO1/2 can be connected to the PLAY internal inputs play_in[15:0].

The inputs connections are detailed in Table 183: PLAY logic array input n signal selection.

Active power mode

This feature is available under Run and Sleep modes.

15.3.20 Inputs to PLAY

From timers(TIM2/3), low-power timers (LPTIM1/2), comparators (COMP1/2), USART1/2, SPI1/2, and CPU to PLAY.

Purpose

General-purpose timers (TIM2/3), low-power timers (LPTIM1/2), comparators (COMP1/2), USART1/2, SPI1/2, and CPU are connected to PLAY1 inputs.

Triggering signals

The PLAY inputs play_in[15:0] are connected to the timers (TIM2/3), low-power timers (LPTIM1/2), comparators(COMP1/2), USART1/2, SPI1/2, and CPU.

The input connections are detailed in Table 183: PLAY logic array input n signal selection.

Active power mode

This feature is available under Run and Sleep modes. It is also available under Stop mode for the low-power timers (LPTIM1/2), the comparators (COMP1/2), USART1/2, SPI1/2, except for the general-purpose timers (TIM2/3), and CPU.

15.3.21 Triggers to DTS

From EXTI, low-power timers (LPTIM1/2) and PLAY to DTS.

Purpose

A temperature measurement can be triggered either by software, by low-power timers, by PLAY, or by an external event.

Triggering signals

The input triggering signals and the description of the interconnection between DTS, PLAY and low-power timers, are given in Table 299: Trigger configuration.