Ethernet PHY manual control (HW reset)

martins
Posts: 51
Joined: Tue Aug 24, 2021 8:58 am

Ethernet PHY manual control (HW reset)

Postby martins » Thu Aug 31, 2023 9:07 am

Hi, I have eth2ap based app, everything seems to be working as expected, but I would like some clarification on following scenario:

I want to start/stop the ethernet PHY chip on demand. Using

Code: Select all

esp_eth_start()/esp_eth_stop()
does stop the ethernet processing as expected, but PHY remains online.

I can put PHY reset singal to reset state manually (via gpio_set_level()) which seemingly works correctly together with esp_eth_start/stop, but I'm not too sure about that. Main concern is to make sure the PHY registers are correctly initialized after the unreset.

So how can I correctly reinit the PHY after unreset (while using driver that was installed before the reset was activated)?

martins
Posts: 51
Joined: Tue Aug 24, 2021 8:58 am

Re: Ethernet PHY manual control (HW reset)

Postby martins » Tue Sep 05, 2023 10:41 am

Ok, so I guess I could better use:

Code: Select all

phy->pwrctl(phy, false);	// power off
phy->init(phy);		// init, including power on

Who is online

Users browsing this forum: Bing [Bot] and 99 guests