Hi all,
I designed a small board where I wanted to use an ESP32 with ethernet. The ESP32 supports and has example schematics with the RTL8201F.
The ESP32 should first configure the RTL8201F via MDIO and later use RMII to speak ethernet.
Though my problem is with the MDIO. For some reason the PHY chip only responds to about every second message. I have written a test program, which requests and outputs the register 2 of the PHY chip, which should be a constant 0x1c. Though when executing it 25 times, I get the following output:
I (356) eth_phy_802_3: PHY ID1: 0x0000001c
I (366) eth_phy_802_3: PHY ID1: 0x0000001c
I (376) eth_phy_802_3: PHY ID1: 0x0000ffff
I (386) eth_phy_802_3: PHY ID1: 0x0000ffff
I (396) eth_phy_802_3: PHY ID1: 0x0000001c
I (406) eth_phy_802_3: PHY ID1: 0x0000001c
I (416) eth_phy_802_3: PHY ID1: 0x0000ffff
I (426) eth_phy_802_3: PHY ID1: 0x0000ffff
I (436) eth_phy_802_3: PHY ID1: 0x0000001c
I (446) eth_phy_802_3: PHY ID1: 0x0000001c
I (456) eth_phy_802_3: PHY ID1: 0x0000ffff
I (466) eth_phy_802_3: PHY ID1: 0x0000ffff
I (476) eth_phy_802_3: PHY ID1: 0x0000001c
I (486) eth_phy_802_3: PHY ID1: 0x0000001c
I (496) eth_phy_802_3: PHY ID1: 0x0000ffff
I (506) eth_phy_802_3: PHY ID1: 0x0000ffff
I (516) eth_phy_802_3: PHY ID1: 0x0000001c
I (526) eth_phy_802_3: PHY ID1: 0x0000001c
I (536) eth_phy_802_3: PHY ID1: 0x0000ffff
I (546) eth_phy_802_3: PHY ID1: 0x0000ffff
I (556) eth_phy_802_3: PHY ID1: 0x0000001c
I (566) eth_phy_802_3: PHY ID1: 0x0000001c
I (576) eth_phy_802_3: PHY ID1: 0x0000ffff
I (586) eth_phy_802_3: PHY ID1: 0x0000001c
I (596) eth_phy_802_3: PHY ID1: 0x0000001c
I also attatched a logic analyzer to MDIO and MDC and as expected, the PHY chip didn't respond so the MDIO line is high, as it's pulled high. MDC is at 2MHz.
I am using an external clock which I measured to be 50MHz, so working like it should.
Any suggestions, what the issue might be, would be very helpful.
I also should add, I am pretty new to pcb designing and had to hand solder the RTL8201F. I double checked every connection to the chip.
Thanks.