2018-08-01 12:36 AM
Hi everyone, im using stm32f746zgt with lan8742a phy. i manage settings on cubemx. when i set speed and duplex with manually like a 100mbps full duplex my system works well. but when i change it to auto negotiation it returns with timeout. It crashes on below lines that are in stm32f7xx_hal_eth.c
/* Wait until the auto-negotiation will be completed */
do
{
HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg);
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_AUTONEGO_COMPLETED)
{
/* In case of write timeout */
err = ETH_ERROR;
/* Config MAC and DMA */
ETH_MACDMAConfig(heth, err);
heth->State= HAL_ETH_STATE_READY;
/* Process Unlocked */
__HAL_UNLOCK(heth);
return HAL_TIMEOUT;
}
} while (((phyreg & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE));
i increased ETH_TIMEOUT_AUTONEGO_COMPLETED time but nothing changed. my switch and computer eth settings are auto. What should i check ?
2018-08-09 11:19 PM
"It crashes" care to refine that a little?
If you stop the debugger where exactly is it stuck?
Is it generating an interrupt you're not catching?
Is it stuck in a loop waiting for a tick?
Checked clocks to PHY?
SysTick has sufficient priority?
2024-03-18 10:54 PM
HI,
HAVE YOU GOT SOLUTION FOE YOUR ISSUE..? I AM FAING SAME ISSUE .. IF YOU SUGGEST THAT WILL BE HELPFUL