I'm trying to run the ethernet example with my esp32, using a custom breakout board based on the schematic for the Waveshare LAN8720 ETH board : https://www.waveshare.com/LAN8720-ETH-Board.htm.
so if i use Waveshare LAN8720 ETH board with esp32 kit its works fine all time but when i use my custom board its work for around 3 month without reboot.
when i reboot board sometimes PHY LAN cant connect to the network and get the ip adress
output log when its work fine :
I (1165) esp_eth.netif.glue: ethernet attached to netif
I (1177) eth_example: Ethernet Started
I (5177) eth_example: Ethernet Link Up
I (5177) eth_example: Ethernet HW Addr 7c:9e:bd:e1:39:23
I (6104) esp_netif_handlers: eth ip: 192.168.0.168, mask: 255.255.255.0, gw: 192.168.0.254
I (6105) eth_example: Ethernet Got IP Address
I (6108) eth_example: ~~~~~~~~~~~
I (6112) eth_example: ETHIP:192.168.0.168
I (6116) eth_example: ETHMASK:255.255.255.0
I (6121) eth_example: ETHGW:192.168.0.254
I (6126) eth_example: ~~~~~~~~~~~
I (6130) eth_example: exturn derived_ip_addr_string from Ethernet = 192.168.0.168
output log when LAN cant connect correctly :
I (1129) system_api: Base MAC address is not set
I (1129) system_api: read default base MAC address from EFUSE
I (1151) esp_eth.netif.glue: 24:62f3:20:73
I (1151) esp_eth.netif.glue: ethernet attached to netif
I (1163) eth_example: Ethernet Started
I'm trying to run the ethernet example with my esp32, using a custom breakout board based on the schematic for the Waveshare LAN8720 ETH board : https://www.waveshare.com/LAN8720-ETH-Board.htm.
so if i use Waveshare LAN8720 ETH board with esp32 kit its works fine all time but when i use my custom board its work for around 3 month without reboot.
when i reboot board sometimes PHY LAN cant connect to the network and get the ip adress
output log when its work fine :
I (1165) esp_eth.netif.glue: ethernet attached to netif
I (1177) eth_example: Ethernet Started
I (5177) eth_example: Ethernet Link Up
I (5177) eth_example: Ethernet HW Addr 7c:9e:bd:e1:39:23
I (6104) esp_netif_handlers: eth ip: 192.168.0.168, mask: 255.255.255.0, gw: 192.168.0.254
I (6105) eth_example: Ethernet Got IP Address
I (6108) eth_example: ~~~~~~~~~~~
I (6112) eth_example: ETHIP:192.168.0.168
I (6116) eth_example: ETHMASK:255.255.255.0
I (6121) eth_example: ETHGW:192.168.0.254
I (6126) eth_example: ~~~~~~~~~~~
I (6130) eth_example: exturn derived_ip_addr_string from Ethernet = 192.168.0.168
output log when LAN cant connect correctly :
I (1129) system_api: Base MAC address is not set
I (1129) system_api: read default base MAC address from EFUSE
I (1151) esp_eth.netif.glue: 24:62f3:20:73
I (1151) esp_eth.netif.glue: ethernet attached to netif
I (1163) eth_example: Ethernet Started
LAN8720A not stable for industrial
LAN8720A not stable for industrial
- Attachments
-
- LAN.PNG (130.53 KiB) Viewed 7109 times
-
- Posts: 4
- Joined: Fri Nov 26, 2021 12:50 pm
Re: LAN8720A not stable for industrial
I have had my fair share of trouble with the LAN8720.
The layout of your boards looks okay, but why is the clock so far away?
What I would recommend is to try:
- analyse your clock and check for noise
- get the clock from the ESP32
- try adding hardware reset (not sure if you have it on the board). The driver will reset the LAN when hardware reset is present if not it will use software reset. I had a couple of boards that got fixed by adding hardware reset.
The layout of your boards looks okay, but why is the clock so far away?
What I would recommend is to try:
- analyse your clock and check for noise
- get the clock from the ESP32
- try adding hardware reset (not sure if you have it on the board). The driver will reset the LAN when hardware reset is present if not it will use software reset. I had a couple of boards that got fixed by adding hardware reset.
Re: LAN8720A not stable for industrial
hi, thanks for ur reply,
-as u can see R23 drive clk from oscillator to lan8720a XTAL1 with length 48 mm and R24 drive it from oscillator to esp32 and in esp32 board i have piste length of 45 mm. that why i use zigzag to route this piste.
- i use hadrware rest i connect nRST pin to GPIO (low for 100us)
-i dont know how to choose termination/ adaptation resistors for now i use 10 ohms for RMII ligne and 33R for clk
-as u can see R23 drive clk from oscillator to lan8720a XTAL1 with length 48 mm and R24 drive it from oscillator to esp32 and in esp32 board i have piste length of 45 mm. that why i use zigzag to route this piste.
- i use hadrware rest i connect nRST pin to GPIO (low for 100us)
-i dont know how to choose termination/ adaptation resistors for now i use 10 ohms for RMII ligne and 33R for clk
- Attachments
-
- board esp32.PNG (123.19 KiB) Viewed 6995 times
Re: LAN8720A not stable for industrial
i think its warm reboot , bcs simply pulling nRST pin (PHY LAN8720A) high permanently will not work ....
https://www.eevblog.com/forum/microcont ... -wroom/25/
https://www.eevblog.com/forum/microcont ... -wroom/25/
Who is online
Users browsing this forum: No registered users and 82 guests