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

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

Ethernet subsystem block diagram showing ETH1 and ETH2 controllers and ports.

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.

Ethernet subsystem block diagram showing ETH1 and ETH2 controllers and ports.

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)

Simplified block diagram of the Ethernet subsystem (ETHSS) showing ETH1 and ETH2 controllers, their external signals, and connections to ports.

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.

MSv72614V1

Simplified block diagram of the Ethernet subsystem (ETHSS) showing ETH1 and ETH2 controllers, their external signals, and connections to ports.

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 portETH2 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

Block diagram of Ethernet subsystem internal signals showing connections between TIM2, TIM3, ETH1, and ETH2.

The diagram illustrates the internal signal connections within the Ethernet subsystem. It features four main blocks: TIM2, TIM3, ETH1, and ETH2.

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.

Block diagram of Ethernet subsystem internal signals showing connections between TIM2, TIM3, ETH1, and ETH2.

Auxiliary timestamp inputs

ETH1 and ETH2 have three auxiliary timestamp inputs, which can be connected to:

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:

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: