11. Peripheral interconnect

11.1 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 or Stop modes.

11.2 Connection summary

Table 87. Peripheral interconnect matrix (1) (2)

SourceDestination
TIM1TIM2TIM3TIM4TIM5TIM6TIM7TIM9TIM12TIM13TIM14TIM15TIM16TIM17LPTIM1LPTIM2LPTIM3LPTIM4LPTIM5ADC1/2ADFSAI1/2GP/HPDMATAMPRTCAES/SAES
TIM1-1111--11--1-------2--11---
TIM21-111--11--1-------2--11---
TIM311-11--11--1-------2--11---
TIM4111-1--11--1-------2--11---
TIM51111---11--1----------11---
TIM6-------------------2--11---
TIM7----------------------11---
TIM911111---1--1-------2--11---
TIM1211111--1---1-------2--11---
TIM1311111--11--1--------------
TIM1411111--11--1--------------
TIM1511111--11----------2--11---
TIM1611111--11--1--------------
TIM1711111--11--1--------------
LPTIM1-------------------2--11---
LPTIM2-------------------2--11---
LPTIM3-------------------2--11---
LPTIM4----------------------11---
LPTIM5----------------------11---
ADC1/2--------------------13-----
ADF--------------------------
Table 87. Peripheral interconnect matrix (1) (2) (continued)
SourceDestination
TIM1TIM2TIM3TIM4TIM5TIM6TIM7TIM9TIM12TIM13TIM14TIM15TIM16TIM17LPTIM1LPTIM2LPTIM3LPTIM4LPTIM5ADC1/2ADFSAI1/2GP/HPDMATAMPRTCAES/SAES
GPDMA----------------------11---
HPDMA----------------------11---
U(S)ART--------------------------
LPUART----------------------11---
HSE------------------------5-
LSE / LSI--------------55555-----5-
SPI----------------------11---
EXTI-------------------24-11---
TAMP--------------6---------1517
RTC Alarm--------------7-------11---
VBAT and Temp monitoring-----------------------16--
VCORE, VBAT-------------------12------
VREFINT-------------------12------
T sensor-------------------12------
CSS in LSE------------------------16-
System error9----------999------------
AES/SAES-------------------------17
System Flash-------------------------17
SAI1/2--------------------------
DCMIPP14141414------------------11---
DMA2D----------------------11---
JPEG----------------------11---
LTDC14141414------------------11---
GFXTIM1----------------------11---
USB OTG-8--8---------------------

1. Letters in the table correspond to the type of connection described in Section 11.2: Connection summary

2. The “-” symbol in a gray cell means no interconnect.

11.3 Interconnection details

11.3.1 Master to slave interconnection for timers

From timer (TIM1/TIM2/TIM3/TIM4/TIM5/TIM9/TIM12/TIM13/TIM14/TIM15/TIM16/TIM17) to timer (TIM1/TIM2/TIM3/TIM4/TIM5/TIM9/TIM12/TIM13/TIM14/TIM15/TIM16/TIM17).

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.

Timer synchronization

The synchronization modes are detailed in:

Triggering signals

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

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:

11.3.2 Triggers to ADCs

From EXTI, timers (TIM1/TIM2/TIM3/TIM4/TIM6/TIM9/TIM12/TIM15) and LP timers (LPTIM1/ LPTIM2/LPTIM3) to ADC1

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 ADC1, 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/TIM3/TIM4), basic timer (TIM6), advanced-control timers (TIM1) and general-purpose timer (TIM9/TIM12/TIM15) can be used to generate the ADC triggering event through the timer outputs tim_oc and tim_trgo.

Low-power timers (LPTIM1/ LPTIM2/LPTIM3) can be used to generate the ADC triggering event through the LPTIM channels (TIMx synchronization described in Section 41.3.30: Timer synchronization for TIM1) in addition to the EXTI on channels 11 and 15.

Triggering signals

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

Active power mode

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

11.3.3 ADC analog watchdogs as triggers to timers

From ADC1/ADC2 to TIM1

Purpose

The internal analog watchdog output signals coming from ADC1, are connected to on-chip timers. ADC1 can provide trigger event through analog watchdog signals to advanced-control timers (TIM1) 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 are active in Run and Sleep modes.

11.3.4 Triggers on ADF1

From EXTI to ADF1

Purpose

EXTI (EXTI15) can be used to generate a triggering event on ADF1 module and start an A/C conversion.

A description is given in:

Triggering signals

The adf_trgi trigger input is the triggering input signal. The ADF trigger inputs connections are detailed in:

Active power mode

This interconnection remains active down to Stop (SVOS high) for ADF1, assuming the trigger source remains active.

11.3.5 Internal input and clock sources to timers

From HSE, LSE, HSI CSI and MCO to TIM (TIM9, TIM12), LP timers (LPTIM1/LPTIM2/LPTIM3/LPTIM4/LPTIM5) and RTC

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.

Internal clocks (CSI, HSI) and microcontroller output clock (MCO) can be used as input to timers:

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.

11.3.6 Triggers to low-power timers

From EXTI, TAMP and RTC alarm to LP timers (LPTIM1/LPTIM2/LPTIM3/LPTIM4/LPTIM5)

Purpose

LPTIM1/LPTIM2/LPTIM3/LPTIM4/LPTIM5 counters may be started either by software or after the detection of an active edge on one of the eight trigger inputs.

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 Table 46.4.7: Trigger multiplexer and the following sections. The input selection is described in Table 483: LPTIM1/2/3/4/5 external trigger connections .

Active power mode

This interconnection remains active down to Stop mode.

11.3.7 RTC wake-up as inputs to timers

From RTC to timers (TIM16)

Purpose

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

Triggering signals

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

Active power mode

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

11.3.8 USB OTG SOF as trigger to timers

From USB OTG SOF to TIM2

Purpose

USB OTG SOF (start-of-frame) can generate a trigger to the general-purpose timer TIM2/TIM5. The USB connection to TIM2/TIM5 are described in Table 433: TIMx internal trigger connection .

Triggering signals

The tim_itr13 internal signal is generated by OTG HS SOF, the tim_itr14 internal signal is generated by OTG FS SOF.

Active power mode

This interconnection is active in Run and Sleep modes.

11.3.9 System errors as break signals to timers

The following system-level errors can trigger a timer break event: Cortex-M7 lockup, PVD low threshold, CSS, double ECC errors in AXISRAM1, AXISRAM3, ITCM, DTCM, backup RAM and flash memory.

The purpose of the break event is to disable the timer outputs to protect the power transistors they control.

System errors apply in RUN and Sleep modes.

Active power mode

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

11.3.10 Triggers to GPDMA/HPDMA

From EXTI, RTC (wake-up), timers (TIM1/TIM2/TIM3/TIM4/TIM5/TIM6/TIM7/TIM9/TIM12/TIM15), LP timers (LPTIM1/LPTIM3/LPTIM4/LPTIM5), HP/GPDMA1 transfer complete (gpdma1_chx_tcf/hldma1_chx_tcf), SPI6, LPUART.

Purpose

An HP/GPDMA trigger can be assigned to a HP/GPDMA channel x. A programmed HP/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 94: Programmed GPDMA1 trigger , according to GPDMA_CxTR2.TRIGSEL[5:0].

HPDMA trigger mapping is specified in Table 106: Programmed HPDMA1 trigger , according to HPDMA_CxTR2.TRIGSEL[5:0].

Active power mode

Assuming sources are active down to Stop modes, this interconnection remains functional in Stop.

Refer to:

11.3.11 Internal analog signals to analog peripherals

From internal analog source to ADC (ADC1).

Purpose

The internal reference voltage (VREFINT), the internal temperature sensor (V SENSE ) monitoring channel are connected to ADC (ADC1) input channels. In addition, the internal

digital core voltage (VCORE) and VBAT are connected to input channels. This is according to:

Active power mode

These interconnections remain in Stop modes if the selected peripheral is kept active. Refer to Section 27.5: ADC in low-power modes

11.3.12 ADC data filtering by the ADF1

From ADC1 to ADF1.

Purpose

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

Active power mode

This feature remains available down to Sleep mode.

11.3.13 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 21: Internal tampers in TAMP

Active power mode

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

11.3.14 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 49.3.3: GPIOs controlled by the RTC and TAMP for more details.

Active power mode

This interconnection remain active in all power modes.

11.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 non-volatile memory. Different approaches are implemented in order 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 36.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 36.4.15: SAES operation with shared keys for more details.

Active power mode

AES and SAES are operating under Run and Sleep modes.