2026-01-14 6:06 AM
I have designed a custom board based on the STM32F767ZI MCU. To enable Ethernet connectivity, I integrated the KSZ8081RND PHY, along with the necessary magnetics and an RJ45 connector. You can find the full schematics in the attached PDF.
On the hardware side, everything appears to be functional. I can confirm the presence of the 50MHz clock signal feeding both the PHY and the MAC. I have trace-matched the signals to this clock, and the MDI signals also look correct (including route matching). I can observe the TX_EN line going high (3.3V) during activity, as well as movement on the other lines. Just to clarify, I am using the RMII interface.
The MDIO and MDC signals seem fine, as I am able to successfully read the PHY registers. For instance, reading register 0x02 on the KSZ8081RND correctly returns the ID 0x0022. I also see activity blinking on the RJ45 LED.
During debugging, it seems I can receive ping requests on the board; I can inspect the memory and see my Host's MAC address and the incoming packet. I have traced the execution flow: it enters the tcpip_thread, calls tcpip_thread_handle_msg, and eventually reaches low_level_output, where TxConfig is configured with the Txbuffer. The HAL_ETH_Transmit_IT function executes correctly, returning ERR_OK. I hope I’m explaining this clearly, but I can provide more details if needed.
Following the discussion in this thread (https://community.st.com/t5/stm32-mcus-embedded-software/stm32h745-not-works-with-ksz8081rna/td-p/95815), I modified lan8742.h as suggested by user "Piranha". However, I am unsure if significant additional code changes are required for the MCU to properly drive this specific PHY.
I have also double-checked for common configuration errors in both the Ethernet and LwIP settings, adjusting values (Rx and Tx descriptors and lwip heap) to match a known working configuration I used on a Nucleo-F767ZI (running an application with micro-ROS, which is my ultimate goal here).
When the RJ45 cable is connected, I can verify that PHYLinkState is detected as 100Mbps Full Duplex, as shown in the figure below.
Despite all these efforts, I definitely cannot see the ping reply in Wireshark, and nmap is unable to discover the board.
TxConfig after the ping from the host, right before the HAL_ETH_Transmit_IT(&heth, &TxConfig) function in
static err_t low_level_output(struct netif *netif, struct pbuf *p).