In factory automation applications, due to the increasing number of field device nodes, and the increasingly high requirements for automation equipment processing accuracy and real-time performance, the traditional serial industrial bus has been unable to meet the requirements of production line synchronization and large-scale data transmission. Ethernet has gradually become the mainstream, and the deterministic network industrial Ethernet protocols developed by mainstream global OEMs based on Ethernet include Profinet, Ethercat, Powerlink, etc. These protocols all require Ethernet as the transmission medium, and Ethernet PHY is mainly responsible.The current industrial Ethernet bus rate is mainly based on the 10/100M rate, and the next-generation industrial bus technology will be based on TSN (time sensitive

Author: Shenzhen Engineer Zhou Fang

In factory automation applications, due to the increasing number of field device nodes, and the increasingly high requirements for automation equipment processing accuracy and real-time performance, the traditional serial industrial bus has been unable to meet the requirements of production line synchronization and large-scale data transmission. Ethernet has gradually become the mainstream, and the deterministic network industrial Ethernet protocols developed by mainstream global OEMs based on Ethernet include Profinet, Ethercat, Powerlink, etc. These protocols all require Ethernet as the transmission medium, and Ethernet PHY is mainly responsible. The current industrial Ethernet bus rate is mainly based on the 10/100M rate, and the next-generation industrial bus technology will be based on TSN (Time Sensitive Network) and Ethernet protocols with a rate of 1000M and above.

In the process of debugging the function of the Ethernet port, the most common problem is that the physical layer link cannot be established correctly before the two ports. Therefore, the content of this document is based on the TI Ethernet PHY product DP83822, introducing the auto-negotiation function phenomenon of the Ethernet network port, the correct test waveform and the strap resistance setting.

1 Introduction

The OSI model defines a 7-layer network model. The Ethernet MAC layer corresponds to the second layer in the OSI model-the data link layer, and the Ethernet PHY corresponds to the first layer-the physical layer in the OSI model. For Ethernet, the main function of the physical layer is to convert the original data (voltage, current, etc.) transmitted in the network cable or optical fiber into a digital signal that can be received and conforms to the protocol, which provides a physical connection for the data link layer. The physical layer mainly specifies the signal voltage, frequency, pin function, impedance, etc. As the basis of network communication, communication data can be transmitted between ports only after the link is successfully established at the physical layer. The Ethernet PHY takes on all the work of the physical layer link, and the communication link can work normally only when the PHY is properly configured. The following will take 10M/100M Ethernet PHY as an example to illustrate the physical layer link establishment method C auto-negotiation and how to check the TRX_P/N pin waveform to determine whether the DP83822 is correctly enabled.

2. DP83822 Auto-Negotiation function

According to IEEE802.3, the auto-negotiation mode function is that the Ethernet port automatically adjusts the speed and working mode of the port to the highest level that the two ports can support according to the device link speed and duplex mode of another port. The main content of the auto-negotiation protocol includes: duplex mode, operating speed, etc. The auto-negotiation function is completely implemented by the physical layer PHY chip, without additional data packets and high-level protocol overhead. According to the broadcast communication rate of 10M or 100M, the auto-negotiation function provides two modes: NLP (Figure 6) and FLP (Figure 2).

DP83822I (industrial version) supports 10M C 10Base-TE mode and 100M C 100Bast C TX mode

10Base-TE auto-negotiation mode (10M)

When using the independent 10Base-TE broadcast auto-negotiation mode, the PHY chip will send NLP (Normal Link Pulse) normal link pulses through TXD_P, TXD_N, RXD_P, and RXD_N in Figure 1, with an interval of 16ms between each pulse. In order to be compatible with the T568A direct connection cable and the T568B crossover cable at the same time, the NLP is broadcast at the receiving and sending end at the same time, and the automatic crossover switching function (Auto-MDIX) is judged according to the monitoring situation of the counterparty.

100Base-TX auto-negotiation mode (100M)

When using the 100Bast-TX auto-negotiation mode, the PHY chip will send FLP (Fast Link Pulse) fast link pulses through TXD_P, TXD_N, RXD_P and RXD_N in Figure 1. Since the 100Base-TX auto-negotiation mode is compatible from 100Base-T to 10Base-T, if the other port can only support 10M Ethernet, both sides will be judged as 10Base-T. In order to be compatible with the T568A direct connection cable and the T568B crossover cable at the same time, the FLP is broadcast at the transceiver end at the same time, and the automatic crossover switch function (Auto-MDIX) is judged according to the monitoring situation of the other party’s counterpart.

DP83822I industrial Ethernet PHY auto-negotiation function and its strap resistance configuration
Figure 1 DP83822 schematic

Turn on auto-negotiation mode: TXD_P/N pin waveform

Test using DP83822I evaluation module[1], The default resistance and register configuration, when there is no network cable connected to other Ethernet ports. By observing the TXD_P pin waveform, it can be judged whether the chip is in auto-negotiation.

When there is no other port connected to this port, the FLP waveform sent by the TXD_P/N pin in the automatic mode is as shown in Figure 2. TXD_P/N will continue to send FLP signals to the remote Ethernet port, and TXD_P/N will also monitor whether the opposite end is transmitting FLP signals through the network cable. The FLP pulse sending time interval of each frame is 16ms. The DC common mode voltage is 3.3V, and the single-ended peak voltage is 5.2V.

DP83822I industrial Ethernet PHY auto-negotiation function and its strap resistance configuration
Figure 2 100base-TX auto-negotiation FLP signal

If the pulse period of a single frame is amplified, it can be observed that the FLP signal contains multiple pulse signals. The maximum number is 33 pulses, the first pulse and the last pulse are clock pulses, and the data pulse between every two clock pulses. When the data pulse appears, the bit is ‘1’, when the data pulse is 0, the bit is ‘0’. Duplex mode, speed and other information are contained in 16 data pulses, as shown in Figure 3.

DP83822I industrial Ethernet PHY auto-negotiation function and its strap resistance configuration
Figure 3 100base-TX auto-negotiation single frame FLP signal

As shown in Figure 4, a single pulse TXD_P and TXD_N have the same amplitude and a phase difference of 180 degrees.

DP83822I industrial Ethernet PHY auto-negotiation function and its strap resistance configuration
Figure 4 100base-TX auto-negotiation TXD_P/N differential signal (red TXDP-TXDN) peak value is 3.3V

Turn off auto-negotiation mode: TXD_P/N pin waveform

Use DP83822I evaluation board, use tools after power-on[2]Change 0x0000 (BMCR) BIT12 to ‘0’ to turn off the auto-negotiation mode. At this time, Figure 5 is obtained. From the figure, it can be seen that TXD_P no longer sends FLP bursts, but continues to send MLT-3 signals. Sending MLT-3 indicates that the PHY believes that it has entered the mandatory 100Base-TX at this time. Figure 5 indicates that the Ethernet PHY is working in the idle state of 100Bast-TX.

DP83822I industrial Ethernet PHY auto-negotiation function and its strap resistance configuration
Figure 5 100Base-TX Ethernet characteristic signal (MTL-3 level)-auto-negotiation function closed

At this time, 0x0000 (BMCR) BIT13 is set to ‘0’, that is, the Ethernet speed is changed from 100M to 10M. At this time, TXD_P/N is continuously sending NLP signals, because the 10Base-TE idle mode is the same as NLP signals. At this time, the PHY enters the forced 10Base-TE mode.

DP83822I industrial Ethernet PHY auto-negotiation function and its strap resistance configuration
Figure 6 10Base-TE NLP-Auto-negotiation function closed

From the above test results, it can be found that observing the TXD_P/N pin signal through an oscilloscope can classify the mode and state of the link circuit after the Ethernet PHY (such as DP83822I) is powered on. In the current design of general Ethernet PHY, it is usually recommended to turn on the auto-negotiation mode to support the highest speed and full-duplex mode (Auto-Negotiation). When there is no remote Ethernet port link, it should be able to switch to TXD_P/N. The foot view side to the Figure 2 and Figure 3 waveforms.

Strap resistance configuration in auto-negotiation mode

After the DP83822I is powered on, it needs to enable the auto-negotiation mode by default, and ensure the fastest speed and full-duplex mode. The most important point is to ensure that the basic mode is selected correctly, that is, AN_EN=1, AN_1=1, AN_0=1.

DP83822I industrial Ethernet PHY auto-negotiation function and its strap resistance configuration
Figure 7 Auto-negotiation mode configurable

The resistance configuration of related pins is shown in Figure 8. According to[3]The recommended resistance configuration of RX_D0, RX_D3 and LED_0 can be obtained as follows:

DP83822I industrial Ethernet PHY auto-negotiation function and its strap resistance configuration
Figure 8 Strap resistance configuration related to auto-negotiation mode

RX_D0 pin resistance configuration:

MODE1 (pull-up resistance: OPEN; pull-down resistance: OPEN) and MODE4 (pull-up resistance: 2.49k Ohm; pull-down resistance: OPEN).

RX_D3 pin resistance configuration:

MODE1 (pull-up resistance: OPEN; pull-down resistance: OPEN) and MODE4 (pull-up resistance: 2.49k Ohm; pull-down resistance: OPEN).

LED_0 pin resistance configuration:

MODE3 (pull-up resistor: 6.2k Ohm; pull-down resistor: 1.96k Ohm) and MODE4 (pull-up resistor: OPEN; pull-down resistor: OPEN).

The Links:   G121SN01-V403 LQ050W1LA0A LCD-INVERTER