2018-11-05 01:07 PM
I'm new to embedded systems development and am trying to create a simple TCP client on my F769NI-DISCO board. I am depending on CubeMX to do most of the low level hardware initialization as my background is in higher level software engineering. I am trying to create a simple project using FreeRTOS and LwIP; however, I cannot get the ethernet peripheral to initialize.
After some debugging, the problem seems to be coming from the HAL_ETH_Init function. A check is done on the return value of this function and if it is equal to HAL_OK, the NETIF_FLAG_LINK_UP is set on netif->flags. Problem is, this function is returning HAL_TIMEOUT, so the link is never "brought up." Inside HAL_ETH_Init, this is the block of code that seems to be responsible for returning this HAL_TIMEOUT status to me:
/* Wait for software reset */
while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET)
{
/* Check for the Timeout */
if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_SWRESET)
{
heth->State= HAL_ETH_STATE_TIMEOUT;
/* Process Unlocked */
__HAL_UNLOCK(heth);
/* Note: The SWR is not performed if the ETH_RX_CLK or the ETH_TX_CLK are
not available, please check your external PHY or the IO configuration */
return HAL_TIMEOUT;
}
}
What does this exactly mean and how can I fix it?
2018-12-23 04:17 AM