cubemx lan8742a auto negotiation fail
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 ?
