Stm32f7 ad Marvell switch over mii
Hi all,
We need to interface a stm32f7xx with marvel switch over mii connection to port 0. If you have any example of interfacing such switch please share.
Normal stm32 network example show only assigning ip address to phy. How do we handle switch? In our case we initialised the mii interface and rest the switch using a gpio pin. But hal_ethernet_init is stuck in waiting for soft reset.
this code is failing in HAL_Eth_Init() :
/* Wait for software reset */
while (READ_BIT(heth->Instance->DMABMR, ETH_DMABMR_SR) > 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;
}
}
