LAN8720A not stable for industrial

mohasrj
Posts: 33
Joined: Mon Jan 20, 2020 9:38 am

LAN8720A not stable for industrial

Postby mohasrj » Mon Dec 06, 2021 6:13 pm

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:62:ab:f3: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:62:ab:f3:20:73
I (1151) esp_eth.netif.glue: ethernet attached to netif
I (1163) eth_example: Ethernet Started
Attachments
LAN.PNG
LAN.PNG (130.53 KiB) Viewed 7214 times

silardgal_dotlab
Posts: 4
Joined: Fri Nov 26, 2021 12:50 pm

Re: LAN8720A not stable for industrial

Postby silardgal_dotlab » Tue Dec 07, 2021 8:58 am

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.

mohasrj
Posts: 33
Joined: Mon Jan 20, 2020 9:38 am

Re: LAN8720A not stable for industrial

Postby mohasrj » Tue Dec 07, 2021 2:28 pm

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
Attachments
board esp32.PNG
board esp32.PNG (123.19 KiB) Viewed 7100 times

mohasrj
Posts: 33
Joined: Mon Jan 20, 2020 9:38 am

Re: LAN8720A not stable for industrial

Postby mohasrj » Wed Dec 08, 2021 8:27 am

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/

Who is online

Users browsing this forum: Google [Bot] and 94 guests