esp-rs / esp-idf-svc

Type-Safe Rust Wrappers for various ESP-IDF services (WiFi, Network, Httpd, Logging, etc.)
https://docs.esp-rs.org/esp-idf-svc/
Apache License 2.0
309 stars 175 forks source link

eth_phy_802_3: esp_eth_phy_802_3_reset(140): reset timeout #493

Open Graceful-Massana opened 5 days ago

Graceful-Massana commented 5 days ago

I'm trying to connect an ESP32-PoE-ISO-WROVER using ethernet with a fixed IP following the examples.

I'm getting this error:

E (624) eth_phy_802_3: esp_eth_phy_802_3_reset(140): reset timeout
E (624) eth_phy_802_3: esp_eth_phy_802_3_basic_phy_init(435): reset failed
E (624) lan87xx: lan87xx_init(341): failed to init PHY
E (624) esp_eth: esp_eth_driver_install(229): init phy failed

Esp-idf version: v5.1-beta1-378-gea5e0ff298-dirt

esp-idf-svc = { version = "0.49", default-features = false } sdkconfig:

# Ethernet
#
CONFIG_ETH_ENABLED=y
CONFIG_ETH_USE_ESP32_EMAC=y
CONFIG_ETH_PHY_INTERFACE_RMII=y
# CONFIG_ETH_RMII_CLK_INPUT is not set
CONFIG_ETH_RMII_CLK_OUTPUT=y
# CONFIG_ETH_RMII_CLK_OUTPUT_GPIO0 is not set
CONFIG_ETH_RMII_CLK_OUT_GPIO=17
CONFIG_ETH_DMA_BUFFER_SIZE=512
CONFIG_ETH_DMA_RX_BUFFER_NUM=10
CONFIG_ETH_DMA_TX_BUFFER_NUM=10
CONFIG_ETH_USE_SPI_ETHERNET=y
# CONFIG_ETH_SPI_ETHERNET_DM9051 is not set
CONFIG_ETH_SPI_ETHERNET_W5500=y
# CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set
# CONFIG_ETH_USE_OPENETH is not set
# end of Ethernet
ivmarkov commented 5 days ago

Can't say much without also looking at your program. Some things to check is whether you are providing the correct pins. Those which are hard-coded you cannot get wrong, but for example rmii_mdio and rst are NOT hard-coded. Are you configuring those correctly, according to this schematics?

ivmarkov commented 5 days ago

Copy-paste from here as to what you need to use.