Guides · Component basics

PIC32MX795F512L RMII Not Linking? What to Check Before Replacing the MCU

Separate PHY management, physical link and frame traffic before replacing a PIC32MX795F512L. Check DEVCFG3, the routed pins and the 50 MHz RMII reference clock.

· StockWake team · Source: Original content by StockWake. Please credit StockWake when republishing.

Ethernet-hub-circuit-board-showing-ICs-and-the-metal-port-housing

If your PIC32MX795F512L RMII port appears down, first check whether the MCU can read the external PHY and whether the PHY reports a physical link. If the link is up, check whether frames reach the MAC. Verify the board revision, the programmed Ethernet settings, and the 50 MHz RMII reference clock at the MCU input before replacing the part.

Record Which Ethernet Stage Fails

The PIC32MX795F512L contains the Ethernet MAC. The external PHY connects it to the copper link. MDC and MDIO carry management transactions. The RMII data signals carry frames between the PHY and the MCU. A successful management read, a physical link, and a working frame path are three separate observations.

Record the board revision, complete MCU ordering code, fitted PHY, firmware build, and test connection. Use one known-good cable and one known-good link partner on an isolated bench network. Retain a baseline before swapping parts, reflashing, or changing straps. If the markings are all you have, use the top marking and full part number checks to decide what you still need to verify.

Scroll sideways to see the whole table

Observed State

First Check

Evidence to Save

Expected PHY ID cannot be read

PHY power, reset, management address, and MDC/MDIO at the PHY

Address queried, read value or timeout, and both signal traces

PHY ID reads, but physical link stays down

PHY operating mode, cable and partner, magnetics and connector

PHY link state, agreed partner settings, and cable substitution result

Physical link is up, but frames fail

RMII mode and wiring, 50 MHz reference clock, then RX/TX and MAC setup

Clock capture, observed data signals, and available MAC counters

PIC32-RMII-diagram-showing-PHY-management-physical-link-and-frame-traffic

Figure 1. Three checkpoints for RMII troubleshooting. The shared external reference is one possible clock arrangement.

Confirm PHY Power, Reset, and Management Access

Read the fitted PHY marking and match it to the board schematic and its own datasheet. Verify its supply rails and I/O voltage at the device. Capture hardware reset and the relevant strap levels during the interval specified for that PHY. Check the address the firmware actually uses against the sampled strap or configured address. A logic level measured long after startup can miss the state the PHY latched.

Use the firmware or bench diagnostic to request the identifier registers at the expected address. If the read fails, check for MDC at the PHY and for activity on MDIO during the request and response. Compare the waveforms at the MCU and PHY ends where the board provides access. A timeout, all ones, or all zeros is a symptom. Use the known PHY identifier, reset state, address, and electrical observations to tell a missing response from an incorrect read.

Separate a Down Physical Link From Failed Frame Delivery

Once you can read the PHY reliably, check its link status using the register procedure for that part. With the board in its intended operating mode, try the known-good cable and partner. Check whether the advertised or forced speed and duplex settings match what the partner supports. With power removed, inspect the connector, magnetics, solder joints, and continuity against the schematic. A PHY that answers management reads can still have a fault on its cable-facing path.

Use an LED only after confirming what the board routes to it. For example, the Microchip PIC32 Ethernet Starter Kit user guide describes an RMII connection to a DP83848 PHY and labels D8 as a speed indicator. Read the LED assignment on your own schematic and confirm the PHY status register before deciding whether the link is down.

ESP32-Ethernet-board-with-a-LAN8720A-PHY-and-a-cabled-RJ45-jack

Figure 2. An ESP32-based RMII example board with a LAN8720A PHY and an RJ45 jack. It illustrates the PHY and cable side of the interface.

Check the PIC32 Configuration and Reference Clock

Check the device configuration that was actually programmed, including DEVCFG3. Microchip's PIC32MX family datasheet DS60001156K gives the RMII signal sets in Tables 25-2 and 25-4, the bit definitions on page 345, and the electrical timing in Table 32-35. Match FMIIEN and FETHIO to the board routing before interpreting the data waveforms.

Scroll sideways to see the whole table

Item

Expected Point on This Device

What to Compare

FMIIEN

0 selects RMII mode. 1 selects MII mode.

Actual programmed value and the interface on the board schematic

FETHIO

1 selects default Ethernet I/O. 0 selects alternate Ethernet I/O.

Programmed value, data pin group, and physical routing

RMII reference clock

EREFCLK and AEREFCLK both appear on RG9, pin 14 in the 100-pin TQFP table for this device.

Measure at the MCU end and compare with the source and timing limits.

Example of a data pin that differs

ERXD0 is on RB12, pin 41. AERXD0 is on RE8, pin 18, in that same table.

Verify the selected receive and transmit pins against the actual PCB.

Trace the 50 MHz RMII reference clock on the PIC32MX795F512L board back to its source. Measure it at the routed MCU endpoint and check the frequency, duty cycle, and signal levels with a suitable probe on the low-voltage logic side. Compare a startup capture with steady operation. A clock visible at its source can still be missing, distorted, or late at the destination.

Some boards use a shared 50 MHz oscillator. The LAN8720A/LAN8720Ai datasheet describes a PHY-specific output mode that can derive 50 MHz from a 25 MHz crystal. Microchip calls for MAC-to-PHY timing analysis before using that output as the board's RMII reference. Use it only to interpret a board with the applicable PHY and configuration. Finding a 25 MHz crystal does not establish what reaches the PIC32.

Follow Receive and Transmit Traffic When Link Is Up

Generate ordinary test traffic from the known-good partner. Look for receive data and CRS_DV at the PHY and at the pins the MCU is configured to use. To check transmission separately, have the board send a test frame and observe TX_EN and the transmit data lines. Avoid drawing a conclusion from an idle trace. If activity reaches the expected pins, check that the MAC is enabled and that its speed and duplex match the PHY's link settings. Then review receive filtering and DMA descriptors. The PIC32MX Ethernet controller reference manual describes these controller blocks.

Keep the Evidence That Supports the Repair

Repeat the failing check with the same firmware, board revision, and link partner, using a known-good board of the same revision when available. Record which stage passed, where the expected behavior stopped, and what still needs checking. If a sample evaluation is needed, describe the test conditions and pass criteria in a component inspection request. Keep an offered part separate from the repair decision until its complete ordering code and application approval match the approved-alternative record.

Frequently Asked Questions

Does reading the expected PHY ID prove the 50 MHz RMII clock reaches the MCU?

A correct ID verifies the observed management transaction. Measure the RMII reference clock independently at the MCU endpoint. Management can work while the frame interface still has a clock or configuration problem.

Can the link register show a past drop after the cable is reconnected?

Yes, if the particular PHY implements a latched-low link bit. For example, the LAN8720A documents its Basic Status Register link bit as latched low. Follow that PHY's read procedure and distinguish a remembered drop from the current state.

Why can changing FETHIO leave the clock trace looking the same?

On the 100-pin PIC32MX795F512L, both reference clock functions share RG9. Other data functions can change physical pins. Check at least one affected signal against the board routing and the programmed selection.

What if the link is up but ping still fails?

Verify the board receives and transmits Ethernet frames before diagnosing IP settings. A failed ping can reflect an address configuration or host response problem even when a frame path works.

Should I copy the starter kit reset timing to a replacement PHY?

Use the reset, clock, and strap requirements for the exact fitted PHY and board. The starter kit documents one implementation. Record startup signals against the requirements that apply to the replacement.

Related guides

Keep reading

All guides →