Hi,
with reference to the function cpsw_MDIO_Init() in
am335x_sysbios_ind_sdk_1.1.0.3\sdk\os_drivers\src\CPSW\cpsw_miimdio.c
Why do we call MDIOInit() only once?
static unsigned int one_check = 0;
int cpsw_MDIO_Init(CPSW_PHY_....)
{
(....)
/*To make sure MDIOInit is only done once */
if(one_check == 0)
{
MDIOInit(PhyDev->miibase, MdioBusFreq, MdioClockFreq);
one_check = 1;
}
(....)
If the network interface is restarted (in example to change the configuration), we reset the MDIO interface with a call to _cpsw_MDIO_ResetPhy(). So without a new call to MDIOInit() the stack hangs.
At least using the NDK as tcp/ip stack.
But it all seems to work removing the "one_check condition". I have a test case, in case.
Best regards
Massimo