esp-idf/components/esp_eth/test_apps
Bogdan Kolendovskyy 224ba396f1 esp_eth: add loopback test, change chip drivers to reflect chip specific behaviour
In esp_eth_test_apps.c:
Add test of loopback functionality. Change speed/duplex/autonegotiation test - remove need to enable loopback (required
for it to work on some phys supported by ESP-IDF)

In Kconfig.projbuild:
Add parameters to select which configuration is used - standard or custom.
Add for custom configuration parameters to select MDC and MDIO pins (required to work with WESP-32 and other boards that
use non-standard pin assignments).

In esp_eth_test_common.c:
Add code to support changes made in Kconfig

In sdkconfig.ci.default_rtl8201:
Change config which is used. Now custom is used and MDC is gpio 16, MDIO is gpio 17. Reuqired to work with WESP-32

In esp_eth_phy_802_3.h:
Make 802.3 API public.

In esp_eth_phy_802_3.c:
Add loopback check in eth_phy_802_3_set_duplex(). Now ESP_ERR_INVALID_STATE is invoked on attempt to set duplex to half
when loopback is enabled.
Remove static property from esp_eth_phy_802_3_autonego_ctrl and esp_eth_phy_802_3_loopback.

In esp_eth_phy_dm9051.c:
Add dm9051_loopback() because DM9051 requires setting additional bit to enable auto-negotiation loopback for data to be
received. Add dm9051_set_speed() which invokes ESP_ERR_INVALID_STATE on attempt to set speed to 10 Mbps when loopback is
enabled because such speed configuration is unsupported.

In esp_eth_phy_ksz80xx.c:
Add ksz80xx_set_speed() which invokes ESP_ERR_INVALID_STATE on attempt to set speed to 10 Mbps when loopback is enabled
because such speed configuration is unsupported.

In esp_eth_phy_ksz8851snl.c:
Change phy_ksz8851_set_duplex() to invoke ESP_ERR_INVALID_STATE on attempt to set duplex to half when loopback is enabled.

In  esp_eth_phy_dp83848.c, esp_eth_phy_rtl8201.c:
Add autonego_ctrl implementation which prevents enabling autonegotiation when loopback is enabled.
Add loopback implementation which disables autonegotiation prior to enabling loopback.

In esp_eth_phy_lan87xx.c:
Add autonego_ctrl implementation which prevents enabling autonegotiation when loopback is enabled.
Add loopback implementation which disables autonegotiation prior to enabling loopback.
Fix link indicating being down when loopback is enabled by force setting link up.
2023-08-03 13:18:44 +02:00
..
main esp_eth: add loopback test, change chip drivers to reflect chip specific behaviour 2023-08-03 13:18:44 +02:00
.gitignore esp_eth: new test_app: emac layer tests 2021-09-08 20:00:14 +08:00
CMakeLists.txt Ethernet related tests improvements 2022-11-28 11:34:34 +00:00
pytest_esp_eth.py esp_eth pytest: increased robustness of the L2 test 2023-04-13 08:26:45 +02:00
README.md Ethernet related tests improvements 2022-11-28 11:34:34 +00:00
sdkconfig.ci.default_dm9051 Ethernet related tests improvements 2022-11-28 11:34:34 +00:00
sdkconfig.ci.default_dp83848 Ethernet related tests improvements 2022-11-28 11:34:34 +00:00
sdkconfig.ci.default_ip101 TWDT: Use the new TWDT Kconfig options in the examples and tests 2023-02-17 11:22:25 +08:00
sdkconfig.ci.default_ksz80xx Ethernet related tests improvements 2022-11-28 11:34:34 +00:00
sdkconfig.ci.default_ksz8851snl Ethernet related tests improvements 2022-11-28 11:34:34 +00:00
sdkconfig.ci.default_lan8720 TWDT: Use the new TWDT Kconfig options in the examples and tests 2023-02-17 11:22:25 +08:00
sdkconfig.ci.default_rtl8201 esp_eth: add loopback test, change chip drivers to reflect chip specific behaviour 2023-08-03 13:18:44 +02:00
sdkconfig.ci.default_w5500 Ethernet related tests improvements 2022-11-28 11:34:34 +00:00
sdkconfig.ci.release_ip101 Ethernet related tests improvements 2022-11-28 11:34:34 +00:00
sdkconfig.ci.single_core_ip101 ci: remove redundent ci configs for chip support and network components 2023-04-26 09:54:29 +08:00

EMAC Test

Supported Targets ESP32

This test app is used to test Ethernet MAC behavior with different chips.

Prerequisites

Install third part Python packages:

pip install scapy