Ethernet not linking on some devices?

Resch2061
Posts: 40
Joined: Mon May 01, 2017 1:56 pm

Ethernet not linking on some devices?

Postby Resch2061 » Mon Oct 23, 2017 2:05 pm

Hello,

On some devices (15 out of 70 or so), we have the issue that Ethernet doesn't want to link with the router.

This is our code to initialize Ethernet on a lan8720:

Code: Select all

eth_config_t conf = DEFAULT_ETHERNET_PHY_CONFIG;
conf.phy_addr = 0;
conf.gpio_config = config_rmii;
conf.tcpip_input = tcpip_adapter_eth_input;
esp_eth_init(&conf);
esp_eth_enable();
As you can see, it's rather basic. What I find odd however, is that the hardware and software on all these devices is the same, yet of all the devices, these fifteen do not even get a link with the router. The link light on the RJ45 remains off.

This is the register of a device with this issue:

Code: Select all

D (777) lan8720: LAN8720 Registers:
D (780) lan8720: BCR    0x3100
D (783) lan8720: BSR    0x7819
D (787) lan8720: PHY1   0x0007
D (790) lan8720: PHY2   0xc0f1
D (793) lan8720: ANAR   0x0de1
D (796) lan8720: ANLPAR 0x4de1
D (799) lan8720: ANER   0x0003
D (802) lan8720: MCSR   0x0000
D (805) lan8720: SM     0xffff
D (808) lan8720: SECR   0x0001
D (812) lan8720: CSIR   0xffff
D (815) lan8720: ISR    0xffff
D (818) lan8720: IMR    0x0040
D (821) lan8720: PSCSR  0x0002
This is the register of a device without the issue:

Code: Select all

D (1074) lan8720: LAN8720 Registers:
D (1077) lan8720: BCR    0x3100
D (1080) lan8720: BSR    0x782d
D (1084) lan8720: PHY1   0x0007
D (1087) lan8720: PHY2   0xc0f1
D (1090) lan8720: ANAR   0x0de1
D (1093) lan8720: ANLPAR 0xcde1
D (1096) lan8720: ANER   0x0009
D (1100) lan8720: MCSR   0x0000
D (1103) lan8720: SM     0xffff
D (1106) lan8720: SECR   0x0009
D (1109) lan8720: CSIR   0xffff
D (1113) lan8720: ISR    0xffff
D (1116) lan8720: IMR    0x0040
D (1119) lan8720: PSCSR  0x0002
Thank you and kind regards.

Who is online

Users browsing this forum: No registered users and 186 guests