From 08aacb02f77e92f6aab47563f2d3bf796b2e838a Mon Sep 17 00:00:00 2001 From: Frank Sautter Date: Mon, 1 Nov 2021 22:03:30 +0100 Subject: [PATCH] Increased LAN8720 ETH-PHY reset assertion time (IDFGH-6018) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increase reset assertion time from 100µs (as specified minimum in the datasheet) to 150µs. Some specimen of the LAN8720 need the reset signal asserted longer than 100µs to initialise properly. Otherwise they are in a zombie state where they are establishing and loosing an Ethernet link once in a seconds interval. --- components/esp_eth/src/esp_eth_phy_lan8720.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp_eth/src/esp_eth_phy_lan8720.c b/components/esp_eth/src/esp_eth_phy_lan8720.c index d0dc378a56..34dc87a71f 100644 --- a/components/esp_eth/src/esp_eth_phy_lan8720.c +++ b/components/esp_eth/src/esp_eth_phy_lan8720.c @@ -280,7 +280,8 @@ static esp_err_t lan8720_reset_hw(esp_eth_phy_t *phy) esp_rom_gpio_pad_select_gpio(lan8720->reset_gpio_num); gpio_set_direction(lan8720->reset_gpio_num, GPIO_MODE_OUTPUT); gpio_set_level(lan8720->reset_gpio_num, 0); - esp_rom_delay_us(100); // insert min input assert time + /* assert nRST signal on LAN8720 a little longer than the minimum specified in datasheet */ + esp_rom_delay_us(150); gpio_set_level(lan8720->reset_gpio_num, 1); } return ESP_OK;