SNLA431 January 2024 DP83TC812R-Q1 , DP83TC812S-Q1
When packets are not able to be received between nodes or bit errors are appearing in the stream, an integrated debugging tool called loopbacks can be used to narrow down the source of the problem. Loopback allows the PHY to transmit received data and isolate different parts of the data path to see where the problem resolves. In a connection between two nodes, a problem can lie on the MAC interface of PHY1, MAC interface of PHY2, or MDI connection between PHYs. Loopbacks can isolate which one of the three is the problem.
Two different kinds of loopback exist on the DP83TC812 PHY: MAC side (digital loopback) and cable side (reverse loopback). These can be used together to check each segment of the data path. Most MACs have packet generating and checking capabilities. A packet can be transmitted, looped back, and received by the MAC and compared to the original value. If the packet is not received or packet errors occur when a segment has been isolated from the data path, we know that to be the problem segment. Below shows the two tests required to isolate such a problem.
First, a MAC side loopback (digital loopback) is enabled on PHY 1 (by writing 0x16 = 0x0104). Packets are then generated and checked by MAC1. If errors are present, the problem is located on the xMII interface between MAC1 and PHY1. If not, the problem is elsewhere.
Next, a cable side loopback is enabled on PHY2 (by writing 0x16 = 0x0110), and packets are once again generated and checked by MAC1. If the issue persists here but not in the previous step, the problem is located on the MDI interface between the two PHYs. If packet errors are still not present, the problem must be located on the xMII interface between PHY2 and MAC2.
Now that we know where the problem lies, targeted investigation can be had at this location. For problems with the MDI, see Section 4.7. For problems with the xMII, see Section 4.11.