mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
fix(esp_eth): ip101-specific reset_hw to match reset timings from datasheet
IP101 requires 10ms reset assertion time and 10ms post-reset delay to properly initialize.
This commit is contained in:
@@ -26,6 +26,9 @@
|
|||||||
|
|
||||||
static const char *TAG = "ip101";
|
static const char *TAG = "ip101";
|
||||||
|
|
||||||
|
#define IP101_PHY_RESET_ASSERTION_TIME_MS 10
|
||||||
|
#define IP101_PHY_POST_RESET_INIT_TIME_MS 10
|
||||||
|
|
||||||
/***************Vendor Specific Register***************/
|
/***************Vendor Specific Register***************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -224,8 +227,9 @@ static esp_err_t ip101_reset_hw(esp_eth_phy_t *phy)
|
|||||||
esp_rom_gpio_pad_select_gpio(ip101->reset_gpio_num);
|
esp_rom_gpio_pad_select_gpio(ip101->reset_gpio_num);
|
||||||
gpio_set_direction(ip101->reset_gpio_num, GPIO_MODE_OUTPUT);
|
gpio_set_direction(ip101->reset_gpio_num, GPIO_MODE_OUTPUT);
|
||||||
gpio_set_level(ip101->reset_gpio_num, 0);
|
gpio_set_level(ip101->reset_gpio_num, 0);
|
||||||
esp_rom_delay_us(100); // insert min input assert time
|
vTaskDelay(pdMS_TO_TICKS(IP101_PHY_RESET_ASSERTION_TIME_MS));
|
||||||
gpio_set_level(ip101->reset_gpio_num, 1);
|
gpio_set_level(ip101->reset_gpio_num, 1);
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(IP101_PHY_POST_RESET_INIT_TIME_MS));
|
||||||
}
|
}
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user