In active mode speed 100Mbps it consume about 110ma, include all the LAN parts: 2 led, transformer.
My application does not require full speed of LAN8720A, 10Mbps is enough for it. So I try to reduce speed in order to reduce power power consumption
My hardware design now:
- PHYAD0 = 1
MODE[2:0] = 111
REGOFF = 0 = enable 1.2V internal regulator
nINTSEL = 1 = external clock
I use ESP IDF sample here: https://github.com/espressif/esp-idf/tr ... rnet/basic
And use below code to change to 10Mbps:
Code: Select all
bool autoneg_off = false; // disable auto-negotiation
eth_speed_t speed_10m = ETH_SPEED_10M;
// -------------------------------------------------
// Disable auto-negotiation and force 10 Mbps here
// -------------------------------------------------
ESP_LOGI(TAG, "Disabling auto-negotiation and forcing 10Mbps...");
// 1) Disable Auto-Negotiation
ESP_ERROR_CHECK(esp_eth_ioctl(eth_handle, ETH_CMD_S_AUTONEGO, &autoneg_off));
// 2) Force 10 Mbps
ESP_ERROR_CHECK(esp_eth_ioctl(eth_handle, ETH_CMD_S_SPEED, &speed_10m));
ESP_ERROR_CHECK(esp_eth_start(eth_handle));
