91. Ethernet subsystem overview (ETHSS)

91.1 Introduction

This section describes the STM32MP23/25xx Ethernet subsystem.

The Ethernet subsystem includes two independent TSN Gigabit Ethernet controllers and a three-port TSN Gigabit switch. An acceleration module bridges the two external ports of the switch to support very low latency use-cases (such as motion control).

This section includes the subsystem overview, details the interconnections between the peripherals and provides the subsystem-related registers description.

For more information on:

91.2 ETHSS main features

91.3 ETHSS functional description

91.3.1 ETHSS block diagram

Figure 1068 shows the main components of the Ethernet subsystem.

Figure 1068. Ethernet subsystem block diagram

Ethernet subsystem block diagram showing ETH1 and ETH2 controllers, ETHSW switch, and ETHSW_ACM accelerator connected to ETH1, ETH2, and ETH3 ports.

The diagram illustrates the Ethernet subsystem (ETHSS) architecture. At the top, two 1G Ethernet controllers, ETH1 and ETH2, are shown, both supporting IEEE1588/AVB/TSN. ETH1 is connected to a multiplexer with inputs '1' and '0'. Input '1' is labeled 'Ethernet switch bypass (ETH1_DIRECT)'. The output of this multiplexer connects to the 'Time sensitive networking (TSN) Ethernet switch (ETHSW)'. ETH2 is connected directly to the ETHSW. The ETHSW has two output paths, each labeled 'RMII' and 'RGMII'. These paths lead to a block labeled 'Ultra-low latency cut-through (ETHSW_ACM)'. The output of the ETHSW_ACM block leads to another multiplexer with inputs '1' and '0'. Input '0' is labeled 'ETH1_DIRECT'. The output of this second multiplexer connects to the 'ETH1 Port', which supports 'MII/RMII/RGMII' interfaces. The ETHSW also has a direct connection to the 'ETH3 Port', which supports 'RMII/RGMII' interfaces. The ETH2 controller connects to the 'ETH2 Port', which supports 'MII/RMII/RGMII' interfaces. The reference ID 'MSv68366V2' is located in the bottom right corner of the diagram area.

Ethernet subsystem block diagram showing ETH1 and ETH2 controllers, ETHSW switch, and ETHSW_ACM accelerator connected to ETH1, ETH2, and ETH3 ports.

91.3.2 ETHSS pins and internal signals

The ETHSS features two Ethernet controllers (ETH1 and ETH2), a three-port Gigabit Ethernet switch (ETHSW) and a cut-through accelerator (ETHSW_ACM). They share three external ports ETH1, ETH2 and ETH3:

The port 0 of the switch is internally connected to the ETH1 controller and is used in RGMII MAC-to-MAC mode.

Figure 1069 shows a simplified view of ETHSS pins (the MII/RMII and RGMII signals are detailed in Section 93: Ethernet switch (ETHSW) and Section 92: Ethernet (ETH): gigabit media access control (GMAC) with DMA controller).

Figure 1069. ETHSS external signals (simplified view)

Block diagram of the Ethernet subsystem (ETHSS) showing external signals and internal components.

The diagram illustrates the Ethernet subsystem (ETHSS) architecture. It features two main Ethernet controllers, ETH1 and ETH2. ETH1 is connected to a switch (ETHSW) via Port 0, and ETH2 is connected via Port 1. The ETHSW also includes Port 2 and an Ethernet Switch Access Control Module (ETHSW_ACM). The system supports multiple interface types: MII/RMII/RGMII and RGMII. External signals for ETH1 and ETH2 include MDC, MDIO, PPS_OUT, and PTP_AUX_TS. A switch bypass mode is controlled by the ETH1_DIRECT signal, which can be set to 1 or 0. The ETH3 port is connected to the ETHSW via Port 2. The diagram also shows the connection of ETH1_DIRECT to the ETHSW_ACM and the ETHSW. The ETH3 port is connected to the ETHSW via Port 2. The ETH3 port is connected to the ETHSW via Port 2. The ETH3 port is connected to the ETHSW via Port 2.

Block diagram of the Ethernet subsystem (ETHSS) showing external signals and internal components.

The auxiliary timestamp inputs (ETHx_PTP_AUX_TS pins) and management inputs/outputs are connected to the ETH1 and ETH2 controllers only. The PHY connected to ETH3 port must therefore be configured using ETH1_MDC and ETH1_MDIO pins, or ETH2_MDC and ETH2_MDIO pins.

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 port side.

When ETH1_DIRECT = 1 (switch bypass mode), ETH1_SEL[2:0] defines the interface on ETH1 port.

When ETH1_DIRECT = 0 (switch enabled), ETH1_SEL[2:0] must be set to 0b001 (RGMII interface used for ETH1 to ETHSW port 0 connection). ETH1 and ETH3 ports are controlled by the ETHSW, and the interface type (RMII or RGMII) is defined using ETHSW_CFG_IF_SEL bit in SYSCFG_ETHSWCR.

Table 891. PHY interface selection

ETH1_DIRECTETH1 portETH2 portETH3 port
0 (ETHSW enabled)
  • ETH1 port controlled by ETHSW
  • ETHSW port 0 in RGMII (ETH1_SEL2[2:0] = 0b001)
  • ETHSW port 2 configured through ETHSW_CFG_IF_SEL
ETH2 port connected to ETH2 controller and configured through ETH2_SEL2[2:0]
  • ETH3 port controlled by ETHSW
  • ETHSW port 1 configured through ETHSW_CFG_IF_SEL
1 (ETHSW bypassed)ETH1 port connected to PHY and configured through ETH1_SEL2[2:0]NA

Internal connections

The figure below represents the internal connection within the Ethernet subsystem and with the other peripherals.

Figure 1070. Ethernet subsystem internal signals

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

The diagram illustrates the internal signal connections within the Ethernet subsystem. It features four main blocks: TIM2, TIM3, ETH1, and ETH2, all interfacing with a central ETHSW block.

MSv68797V2

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

Auxiliary timestamp inputs

ETH1 and ETH2 have four 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 one of the following two modes:

ETH1 and ETH2 controller can be disciplined to the PTP clock of the ETHSW Ethernet switch, when the gPTP protocol is running on the switch. This allows the synchronization of the TSN traffic with ETH and ETHSW, using a unique clock reference.

The only source for eth_ptp_timestamp_i is the ethsw_time_data bus from ETHSW. This can be selected using the ETH1_PTP_CLK_SEL or ETH2_PTP_CLK_SEL bit, and by configuring the ETH to operate in External system time mode.

The PTP system time buses have different widths, 64-bit for ETH and 96-bit for ETHSW, but can be interconnected. The eth_ptp_timestamp_i[63:0] bus is connected to the ethsw_time_data[79:16] bus as follows:

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). The ETH peripheral must be in digital rollover mode (TSCTRLSSR bit = 1 in ETH_MACTSCR) to be compatible with the system time format provided by the ETHSW.

The external system time mode must be enabled in ETH1 when using the ETHSW so that the “system time” is provided to ETH1, to have synchronized TSN traffic. This also means ETH1 Flexible PPS output is available and synchronized. The synchronization can also be extended to the ETH2 controller.

ETHSW_ACM

The Ethernet switch acceleration module (ETHSW_ACM) is tightly coupled with the ETHSW switch. It inherits the ports setting defined by the ETHSW and does not have external pins.

91.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: