I have an issue regarding ethernet with an ESP32. I have designed a hardware with an ESP32 and DP83848 phy for ethernet connection.
The problem is I don't get link up from phy.
I am running the ESP32 example code PHY reset pin is 32. This is the log output from the board. It just stops at Ethernet started:
> V (2958) tcpip_adapter: check: local, if=2 fn=0x400e24d8
[0m
V (2958) tcpip_adapter: call api in lwip: ret=0x0, give sem[0m
V (2958) tcpip_adapter: check: remote, if=2 fn=0x400e24d8
[0m
D (2968) event: running post ETH_EVENT:0 with handler 0x400d3a84 on loop 0x3ffb4f7c[0m
[0;32mI (2978) eth_example: Ethernet Started[0m
I checked the communication between phy and ESP32, this looks good. I tried to read the phy register and below was output. I had used cyclone TCP example code for this. The conclusion is that the phy and the ESP32 are communicating:
Initializing DP83848...
PHY reg: 00: 0x3100
PHY reg: 01: 0x7849
PHY reg: 02: 0x2000
PHY reg: 03: 0x5C90 (this is phy address)
PHY reg: 04: 0x01E1
PHY reg: 05: 0x0000
PHY reg: 06: 0x0004
PHY reg: 07: 0x2001
PHY reg: 08: 0x0000
PHY reg: 09: 0x0000
PHY reg: 10: 0x0000
PHY reg: 11: 0x0000
PHY reg: 12: 0x0000
PHY reg: 13: 0x0000
PHY reg: 14: 0x0000
PHY reg: 15: 0x0000
PHY reg: 16: 0x0000
PHY reg: 17: 0x0000
PHY reg: 18: 0x0000
PHY reg: 19: 0x0000
PHY reg: 20: 0x0000
PHY reg: 21: 0x0000
PHY reg: 22: 0x0100
PHY reg: 23: 0x0021
PHY reg: 24: 0x0000
PHY reg: 25: 0x8021
PHY reg: 26: 0x0904
PHY reg: 27: 0x0000
PHY reg: 28: 0x0000
PHY reg: 29: 0x6011
PHY reg: 30: 0x003F
PHY reg: 31: 0x0000
Now I have to check between RJ45 jack and PHY. I actually don't understand what the issue is, but I am sure it is between the phy and the RJ45 jack.
I have tried the connection with router and PC directly. I also tried using a different LAN cable, but it didn't work
This is the datasheet of the RJ45 jack.
Here's the schematic diagram: