Page 1 of 1

How to switch Eth PHY power off and then on

Posted: Thu Nov 07, 2019 8:37 am
by andypandy
Hi there,

I'd like to simulate physical disconnection/connection of Ethernet cable. I am wondering what's the best way to do that on EPS32?
Switching power off followed by switching power on of Ethernet PHY is a reasonable solution.

From the documentation I can see only one way to do it, as follows:

esp_eth_deinit()
esp_eth_init()

But it doesn't look like a smart solution, furthermore doing this several times will cause some weird behavior.
Any ideas how to do it differently?

Thanks