cancel
Showing results for 
Search instead for 
Did you mean: 

Example Ethernet loopback code for STM32H573 and LAN8742A.

rchilakalapudi
Associate II

Hi,

I'm currently working on a project involving the STM32H573 microcontroller and the LAN8742A Ethernet PHY. My goal is to implement a simple Ethernet loopback test to verify the basic functionality of the Ethernet interface. Could you please provide if you have anything?

 

Thanks,

Ravi.ch

2 REPLIES 2
STea
ST Employee

Hello @rchilakalapudi ,

My understanding is that you want to implement an example without any middleware to test Ethernet controller functionality my recommendation is to have a look at the following article:

How to create a bare metal HAL Ethernet applicatio... - STMicroelectronics Community

Also, you can check a basic implementation using Azure Netxduo :

STM32CubeH5/Projects/STM32H573I-DK/Applications/NetXDuo/Nx_TCP_Echo_Server at main · STMicroelectronics/STM32CubeH5

or an example using LWIP middleware :

stm32h5-classic-coremw-apps/Projects/NUCLEO-H563ZI/Applications/LwIP/LwIP_UDP_Echo_Server at main · STMicroelectronics/stm32h5-classic-coremw-apps
Regards

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Pavel A.
Evangelist III

The LAN8742A can do internal loopback (without any external connection or cable). See the data sheet, 3.8.10 Loopback operation.  This section also explains how to make a connector for external loopback.