76. Ethernet subsystem overview (ETHSS)
76.1 Introduction
This section describes the STM32MP21xx Ethernet subsystem.
The Ethernet subsystem includes two independent TSN Gigabit Ethernet controllers.
This section includes the subsystem overview, details the interconnections between the peripherals and provides the subsystem-related registers description.
For more information on the Ethernet controller, refer to Section 77: Ethernet (ETH): gigabit media access control (GMAC) with DMA controller
76.2 ETHSS main features
- • Two fully independent instances of 10/100/1G Ethernet MAC controller, enabling transmission and reception of data over Ethernet, in compliance with IEEE 802.3-2008. Each Ethernet MAC controller is connected to an external Ethernet PHY via a standard media independent interface (MII/RMII/RGMII)
- • Possibility to handle the PTP system time via an internal system time: each Ethernet controller handles it own system time.
- • MDIO PHY control interface per port
- • Flexible PPS generator per port
76.3 ETHSS functional description
76.3.1 ETHSS block diagram
Figure 951 shows the main components of the Ethernet subsystem.
Figure 951. Ethernet subsystem block diagram

The diagram illustrates the Ethernet subsystem architecture. It is enclosed in a large rectangular box labeled 'Ethernet subsystem' on the left. Inside, there are two identical blocks for 'ETH1' and 'ETH2'. Each block contains the text '1G Ethernet controller' and 'IEEE1588/AVB/TSN'. Below each controller block, a vertical line connects it to a corresponding port block at the bottom. The connection is labeled 'MII/RMII/RGMII'. The port blocks are labeled 'ETH1 Port MII/RMII/RGMII' and 'ETH2 Port MII/RMII/RGMII'. In the bottom right corner of the main box, the identifier 'MSv72613V1' is present.
76.3.2 ETHSS pins and internal signals
The ETHSS features two Ethernet controllers (ETH1 and ETH2). They share two external ports ETH1 and ETH2.
ETH1 and ETH2 ports are directly connected to the ETH1 Ethernet controller and ETH2 Ethernet controller, respectively.
Figure 952 shows a simplified view of ETHSS pins (the MII/RMII and RGMII signals are detailed in Section 77: Ethernet (ETH): gigabit media access control (GMAC) with DMA controller).
Figure 952. ETHSS external signals (simplified view)

The diagram illustrates the Ethernet subsystem (ETHSS) containing two controllers, ETH1 and ETH2. Each controller is connected to a set of external signals and a port.
- ETH1 Controller:
- External signals: ETH1_MDC, ETH1_MDIO, ETH1_PPS_OUT, and ETH1_PTP_AUX_TS.
- Connection to ETH1 port via a vertical line labeled MII/RMII/RGMII.
- ETH2 Controller:
- External signals: ETH2_MDC, ETH2_MDIO, ETH2_PPS_OUT, and ETH2_PTP_AUX_TS.
- Connection to ETH2 port via a vertical line labeled MII/RMII/RGMII.
MSv72614V1
The auxiliary timestamp inputs (ETHx_PTP_AUX_TS pins) and management inputs/outputs are connected to the ETH1 and ETH2 controllers only.
PHY interface selection
The interface selection is done in the system configuration controller (SYSCFG).
The ETH1 and ETH2 port PHY interface selection is done using ETH1_SEL[2:0] in SYSCFG_ETH1CR, and ETH2_SEL[2:0] in SYSCFG_ETH2CR. This is done on the Ethernet controller side, not on the port side.
Table 797. PHY interface selection
| ETH1 port | ETH2 port |
|---|---|
| ETH1 port connected to ETH1 controller and configured through ETH1_SEL2[2:0] | ETH2 port connected to ETH2 controller and configured through ETH2_SEL2[2:0] |
Internal connections
The figure below represents the internal connection within the Ethernet subsystem and with the other peripherals.
Figure 953. Ethernet subsystem internal signals

The diagram illustrates the internal signal connections within the Ethernet subsystem. It features four main blocks: TIM2, TIM3, ETH1, and ETH2.
- TIM2 (top left) receives inputs: eth1_ptp_pps_out1 to tim2_etr8, eth2_ptp_pps_out1 to tim2_etr9, eth1_ptp_pps_out1 to tim2_ti1_in1, and eth2_ptp_pps_out1 to tim2_ti2_in1. It outputs tim2_trgo to ETH2.
- TIM3 (top right) receives inputs: eth1_ptp_pps_out1 to tim3_etr6, eth2_ptp_pps_out1 to tim3_etr7, eth1_ptp_pps_out1 to tim3_ti1_in1, and eth2_ptp_pps_out1 to tim3_ti2_in1. It outputs tim3_trgo to ETH1.
- ETH1 (bottom left) receives inputs: eth1_ptp_aux_ts_trig0, eth1_ptp_aux_ts_trig1, and eth1_ptp_aux_ts_trig2. It outputs eth1_ptp_pps_out1 and eth1_ptp_pps_out0. The PPS outputs are connected to external pins ETH1_PTP_AUX_TS and ETH1_PPS_OUT0, and also feed back to TIM2 and TIM3.
- ETH2 (bottom right) receives inputs: eth2_ptp_aux_ts_trig0, eth2_ptp_aux_ts_trig1, and eth2_ptp_aux_ts_trig2. It outputs eth2_ptp_pps_out1 and eth2_ptp_pps_out0. The PPS outputs are connected to external pins ETH2_PPS_OUT0 and ETH2_PTP_AUX_TS, and also feed back to TIM2 and TIM3.
Cross-connections between timers and Ethernet controllers are shown: TIM2's tim2_trgo connects to ETH2's eth2_ptp_aux_ts_trig0, and TIM3's tim3_trgo connects to ETH1's eth1_ptp_aux_ts_trig1.
Auxiliary timestamp inputs
ETH1 and ETH2 have three auxiliary timestamp inputs, which can be connected to:
- • TIM2 or TIM3 tim_trgo outputs, to simultaneously timestamp in the two Ethernet controllers when each one run in a different PTP clock domain.
- • ETHx_PTP_AUX_TS pins, to timestamp with an external signal (such as GPS)
PPS outputs
ethx_ptp_pps_out outputs are available off-chip as alternate functions, but can also be used internally. They are connected to the following inputs of TIM2 and TIM3 timers:
- • tim_etrx pins, to serve as timer counter clock source or as a trigger to start/reset the timer (for example for PTP synchronized PWM)
- • tim_tix_in pins, to measure PTP time intervals and trigger counter captures.
The PPS outputs can be configured as regular pulse-per-second outputs or in flexible PPS mode to provide a programmable train of pulses. They can also be used to synchronize software tasks on the PTP clock.
System time source selection
The IEEE 802.1AS-Rev draft defines a “system time” (also known as “gPTP clock”) that is shared among all Ethernet nodes, and one node in the system known as “grandmaster” reference. All other Ethernet nodes implement a “slave clock”, which is periodically synchronized with the “grandmaster” clock.
The Ethernet controller can be configured by software in internal system time mode. This mode assumes that the “system clock” is generated internally by the Ethernet controller. If an external “grandmaster” is present on the Ethernet network, it periodically synchronizes itself with it. If no “grandmaster” is present on the network, ETH1 and/or ETH2 can play this role.
The maximum value of the lower 32 bits of the system time is 999,999,999 decimal (0x3B9A C9FF) and it wraps to 0 when reaching this value (representing a full second).
76.3.3 ETHSS clocks
The clocking scheme of the Ethernet subsystem peripherals is detailed in the RCC section.
The control bits are located in the following registers:
- • RCC Ethernet 1 configuration register (RCC_ETH1CFGR)
- • RCC Ethernet 2 configuration register (RCC_ETH2CFGR)
- • SYSCFG Ethernet1 control register (SYSCFG_ETH1CR)
- • SYSCFG Ethernet1 status register (SYSCFG_ETH1SR)
- • SYSCFG Ethernet2 control register (SYSCFG_ETH2CR)
- • SYSCFG Ethernet2 status register (SYSCFG_ETH2SR)