-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Description
Hardware:
Board: ESP32 Dev Module- Node MCU
Core Installation/update date: 18/Oct/2017?
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: ?921600?
Description:
Im working with example code ETH_LAN8720, and i get the following error as mentioned below.
The circuit connections are as follows:-
GPIO | RMII Signal | ESP32 EMAC Function |
---|---|---|
0 | REF_CLK | EMAC_TX_CLK |
21 | TX_EN | EMAC_TX_EN |
19 | TX0 | EMAC_TXD0 |
22 | TX1 | EMAC_TXD1 |
25 | RX0 | EMAC_RXD0 |
26 | RX1 | EMAC_RXD1 |
27 | CRS_DV | EMAC_RX_DRV |
Default Example GPIO | RMII Signal |
---|---|
23 | MDC |
18 | MDIO |
Sketch:
//Change the code below by your sketch
/*
This sketch shows the Ethernet event usage
*/
#include <ETH.h>
static bool eth_connected = false;
void WiFiEvent(WiFiEvent_t event)
{
switch (event) {
case SYSTEM_EVENT_ETH_START:
Serial.println("ETH Started");
//set eth hostname here
ETH.setHostname("esp32-ethernet");
break;
case SYSTEM_EVENT_ETH_CONNECTED:
Serial.println("ETH Connected");
break;
case SYSTEM_EVENT_ETH_GOT_IP:
Serial.print("ETH MAC: ");
Serial.print(ETH.macAddress());
Serial.print(", IPv4: ");
Serial.print(ETH.localIP());
if (ETH.fullDuplex()) {
Serial.print(", FULL_DUPLEX");
}
Serial.print(", ");
Serial.print(ETH.linkSpeed());
Serial.println("Mbps");
eth_connected = true;
break;
case SYSTEM_EVENT_ETH_DISCONNECTED:
Serial.println("ETH Disconnected");
eth_connected = false;
break;
case SYSTEM_EVENT_ETH_STOP:
Serial.println("ETH Stopped");
eth_connected = false;
break;
default:
break;
}
}
void testClient(const char * host, uint16_t port)
{
Serial.print("\nconnecting to ");
Serial.println(host);
WiFiClient client;
if (!client.connect(host, port)) {
Serial.println("connection failed");
return;
}
client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
while (client.connected() && !client.available());
while (client.available()) {
Serial.write(client.read());
}
Serial.println("closing connection\n");
client.stop();
}
void setup()
{
Serial.begin(115200);
WiFi.onEvent(WiFiEvent);
ETH.begin();
}
void loop()
{
if (eth_connected) {
testClient("google.com", 80);
}
delay(10000);
}
Debug Messages:
E (27295) emac: Timed out waiting for PHY register 0x2 to have value 0x0007 (mask 0xffff). Current value 0x0000
E (28295) emac: Timed out waiting for PHY register 0x3 to have value 0xc0f0 (mask 0xfff0). Current value 0x0000
E (29295) emac: Timed out waiting for PHY register 0x2 to have value 0x0007 (mask 0xffff). Current value 0x0000
E (30295) emac: Timed out waiting for PHY register 0x3 to have value 0xc0f0 (mask 0xfff0). Current value 0x0000
E (31295) emac: Timed out waiting for PHY register 0x2 to have value 0x0007 (mask 0xffff). Current value 0x0000
E (32295) emac: Timed out waiting for PHY register 0x3 to have value 0xc0f0 (mask 0xfff0). Current value 0x0000
E (33295) emac: Timed out waiting for PHY register 0x2 to have value 0x0007 (mask 0xffff). Current value 0x0000
E (34295) emac: Timed out waiting for PHY register 0x3 to have value 0xc0f0 (mask 0xfff0). Current value 0x0000
E (35295) emac: Timed out waiting for PHY register 0x2 to have value 0x0007 (mask 0xffff). Current value 0x0000
E (36295) emac: Timed out waiting for PHY register 0x3 to have value 0xc0f0 (mask 0xfff0). Current value 0x0000
E (37295) emac: Timed out waiting for PHY register 0x2 to have value 0x0007 (mask 0xffff). Current value 0x0000
E (38295) emac: Timed out waiting for PHY register 0x3 to have value 0xc0f0 (mask 0xfff0). Current value 0x0000
Metadata
Metadata
Assignees
Labels
No labels