PHY/LAN8710 fault identification
Posted: Thu Jul 09, 2020 4:27 pm
I have an issue when occasionally on power up the board will not connect to the Ethernet.
esp_restart() does not recover. esp_eth_stop()/esp_eth_start() do not recover. I have not tried recreating the MAC/PHY yet.
Board/ESP_EN (which also acts as LAN reset) resolves as does PSU off/on (unless unlucky!). I am able to trigger Board/ESP_EN using my watchdog.
No doubt this may well be a hardware transient but I wanted to see if I could find a short term software sticking plaster.
I use a LAN8710A-EZC in RMII mode. The site installation may or may not have Ethernet available. I need to find a clear fault symptom (other than lack of messages) as I cannot just reboot as there may not be Ethernet on site.
When the fault happens I can both read and write to the PHY. There do seem to be some interesting values in the PHY however:
FAIL: [1] = 0x7809, [6] = 0x0001, [17] = 0x0000
OK & CONNECTED: [1] = 0x782d, [6] = 0x000b, [17] = 0x0002
As I read the above the fail scenario is telling me that I have no energy ([17] = 0x0000) but Link Partner can auto negotiate ([6] = 0x0001).
It would seem acceptable to reboot in this scenario as I cannot have a link partner if there is no power?
So the question is for all the LAN8710 experts out there! Are there other ways in which I might legitimately get this 'fail' pattern or do you think that the pattern above represents a good fault indicator and provides just cause to reboot?
esp_restart() does not recover. esp_eth_stop()/esp_eth_start() do not recover. I have not tried recreating the MAC/PHY yet.
Board/ESP_EN (which also acts as LAN reset) resolves as does PSU off/on (unless unlucky!). I am able to trigger Board/ESP_EN using my watchdog.
No doubt this may well be a hardware transient but I wanted to see if I could find a short term software sticking plaster.
I use a LAN8710A-EZC in RMII mode. The site installation may or may not have Ethernet available. I need to find a clear fault symptom (other than lack of messages) as I cannot just reboot as there may not be Ethernet on site.
When the fault happens I can both read and write to the PHY. There do seem to be some interesting values in the PHY however:
FAIL: [1] = 0x7809, [6] = 0x0001, [17] = 0x0000
OK & CONNECTED: [1] = 0x782d, [6] = 0x000b, [17] = 0x0002
As I read the above the fail scenario is telling me that I have no energy ([17] = 0x0000) but Link Partner can auto negotiate ([6] = 0x0001).
It would seem acceptable to reboot in this scenario as I cannot have a link partner if there is no power?
So the question is for all the LAN8710 experts out there! Are there other ways in which I might legitimately get this 'fail' pattern or do you think that the pattern above represents a good fault indicator and provides just cause to reboot?