Tool/software:
I'm testing the DP83822I on a modular custom board: microcontroller in one board, connected in shield-like style to the custom board were the phy is. On the MAC side, the microcontroller (STM32H723) and its code work as expected. It had already been tested with another phy (microchip LAN8742A).
On the PHY side, the straps are set to operate in RMII Master mode, XI = 25MHz, it correctly generates a 50MHz output. Only Straps to achieve that configuration are set (RX_DV and CRS_DV), the rest are keep on default.
The problem is that after correct link and autonegotiation (100mbps, full duplex), it only receives packets from link partner but does not transmit them correctly. Wireshark shows a packet transmitted with the correct frame length, but wrong data. Other way round it works fine as packets received on microcontroller are the same read by wireshark.
What I've verified:
- Strap pin configuration is correct according to registers 0x467 and 0x468
- Link is up and autonegotiation completes 100mbps, full duplex in normal operation
- Reverse loopback test passes. The PHY correctly echoes the packets send by link partner
- Analog, Digital, Input and Output loopback tests pass when using the packet generator. If I connect the cable to computer in digital test, the internally generated packets show on wireshark.
- RMII signals remain the same along the whole trace from microcontroller to PHY in the second board
- Signals measured on the oscilloscope are near PHY side, so I would say physical connection is not the problem
in MII loopback mode. I have verified the following
- Autonegotiation is succesful at 100mbps, full duplex
- The microcontroller sends data to the PHY, and I can see the transmitted signals on the TX0 and TX1 lines.
- TX_EN works fine
- TX0 and TX1 waveforms match the bytes send by the microcontroller, and are the same when tested with LAN8742A
- The PHY apparently loops back the data, since I can see signals on RX0, RX1, and RX_DV using an oscilloscope.
- However, the RX callback in my microcontroller is not triggered.
- The same code works when receiving packets from a computer over Ethernet, so the MAC and callback mechanism seem to function correctly in normal operation.
Similarly, in the other near-end loopback modes with MAC generated packets:
- Autonegotiation and AutoMDIX disabled and forced to 100Mbps full-duplex
- TX_EN, TX0 and TX1 waveforms seen in oscilloscope
- The PHY apparently loops back the data, signals on RX0, RX1, and RX_DV seen in oscilloscope.
- Rx callback is not called, despite same code works with link partner packets.
I suspect the issue might be related to clock or MAC configuration or how it handles packets. What should I check to ensure the MAC correctly processes data on TX pins?
Any insights would be greatly appreciated.
Thanks!