mdio_write(GPIOB, 0, 0x0100); // 10MBs full duplex
Also be sure the mii link is correct!! phy_id does a check if return data is not 0, but forgets to check if data == 0xFFFF
For me this solved a lot of problems.
int32_t phy_id(void)
{
...... All settings in miim.c
printf("PHY_ID = %d , STATUS = %x\r",i,data); //Should be someting like: 0x7869
if(data != 0 && data != 0xFFFF) return i; // !!!! Check if data isn't all 1's!
}
printf("[PHY]:ID detect error!!\r\n");
}
return 0;
}