2025-07-06 5:14 AM - edited 2025-07-06 5:15 AM
Hello everyone,
I'm working on a custom board that uses the STM32H723ZGT6 together with the LAN8742A-CZ-TR Ethernet PHY.
During the call to HAL_ETH_Init() in the stm32h7xx_hal_eth.c file, the initialization fails and gets stuck in this loop:
/* Wait for software reset */
while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U)
{
if ((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT)
{
/* Set Error Code */
heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT;
/* Set State as Error */
heth->gState = HAL_ETH_STATE_ERROR;
/* Return Error */
return HAL_ERROR;
}
}
I suspect the issue may be related to the NRST pin.
On my PCB, I have connected the NRST pin of the LAN8742A to both
the MCU's NRST and the ST-Link NRST pin — similar to what is shown
in the STM32H7 Nucleo-144 (MB1364) reference design.
However, when I checked the LAN8742A datasheet,
it suggests that this pin should be driven in a specific way
Could this NRST wiring be the reason for the reset timeout?
If yes, how does the MB1364 board manage to work with this configuration?
I’ve also checked my GPIO and Ethernet settings — everything seems correct,
but the issue persists.
Does anyone have an idea what could be causing this problem?
Any suggestions are highly appreciated.
Thank you in advance!