09-30-2024, 01:11 PM
Hello, i have a KC868-A8 Board connected with ethernet cable but the port suddenly stopped working.
# define ETH_ADDR 0
#define ETH_POWER_PIN -1
#define ETH_MDC_PIN 23
#define ETH_MDIO_PIN 18
#define ETH_TYPE ETH_PHY_LAN8720
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
IPAddress local_ip(192, 168, 0, 144);
IPAddress gateway(192, 168, 0, 254);
IPAddress subnet(255, 255, 255, 0);
ETH.begin(ETH_TYPE, ETH_ADDR, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_POWER_PIN, ETH_CLK_MODE);
if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {
Serial.println("EtherNet failed.");
}else{Serial.println("EtherNet Success.");}
Serial.println("Connected");
Serial.print("IP Address:");
Serial.println(ETH.localIP());
delay(500);
# define ETH_ADDR 0
#define ETH_POWER_PIN -1
#define ETH_MDC_PIN 23
#define ETH_MDIO_PIN 18
#define ETH_TYPE ETH_PHY_LAN8720
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
IPAddress local_ip(192, 168, 0, 144);
IPAddress gateway(192, 168, 0, 254);
IPAddress subnet(255, 255, 255, 0);
ETH.begin(ETH_TYPE, ETH_ADDR, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_POWER_PIN, ETH_CLK_MODE);
if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {
Serial.println("EtherNet failed.");
}else{Serial.println("EtherNet Success.");}
Serial.println("Connected");
Serial.print("IP Address:");
Serial.println(ETH.localIP());
delay(500);