Permanent damage to Ethernet interface after repeated system reboot and initialization of Ethernet interface with no cable plugged in


We have a system built around NUCLEO_F767ZI. When ethernet cable is unplugged, if we repeatedly reboot system and then run the following ethernet initialization code:

    //int ret = eth.disconnect();
    if(ethernetSettings.enabled == 0) {
        char ipStr[17] = {0}, nmStr[17] = {0}, ngStr[17] = {0};
        sprintf(ipStr, "%d.%d.%d.%d", ethernetSettings.ip[0], ethernetSettings.ip[1], ethernetSettings.ip[2], ethernetSettings.ip[3]);
        sprintf(nmStr, "%d.%d.%d.%d", ethernetSettings.mask[0], ethernetSettings.mask[1], ethernetSettings.mask[2], ethernetSettings.mask[3]);
        sprintf(ngStr, "%d.%d.%d.%d", ethernetSettings.gateway[0], ethernetSettings.gateway[1], ethernetSettings.gateway[2], ethernetSettings.gateway[3]);
        eth.set_network(ipStr, nmStr, ngStr);

    int ret = eth.connect();

The interval between each reboot starts at 3 minutes then doubles every time system reboots, 6, 12, 24, 48, 96 minutes then stays at 96 minutes. After a few hours, two of our test units in a row can no longer connect to our ethernet router when ethernet cable is plugged back in. Even after a power cycle.

In theory the damage can be caused by ESD when ethernet cable is plugged back in. But this never happened when we briefly unplug and plug the cable back in. So I tend to think there might be something in the code that caused the damage.

Mbed OS version is 5.15.

Can anyone offer some pointers?

For starters, can you replicate anything like this if you use the Ethernet code from STM32Cube IDE? It would be good to establish if the problem is specific to Mbed OS or not.

And yeah, I don’t see anything here that should be able to cause damage to anything…

1 Like

We are running a simplified test code on NUCLEO board, will see if this happens to NUCLEO board as well. The complicating factor is, we have PoE on our board, while PoE is not on NUCELO board, so not strictly apple to apple comparison.

To identify the root cause is board issue, specific driver issue or Mbed OS core issue. You could verify this simple code on other popular board for reference, such like as K64F.
In fact, our customer also applied OS v5.15 on ethernet hub product with big shipments in 2020, OS core seems robust,