Hello Pietro,
There is an API from PHY that can be used instead. The API: PHY_DRV_GetLinkStatus is used to get the link status and for newer KSDK versions, it is used to wait until cable is connected:
while ((count < ENET_PHY_TIMEOUT) && (!link))
{
PHY_GetLinkStatus(ENET, phyAddr, &link);
if (link)
{
PHY_GetLinkSpeedDuplex(ENET, phyAddr, &speed, &duplex);
config.miiSpeed = (enet_mii_speed_t)speed;
config.miiDuplex = (enet_mii_duplex_t)duplex;
config.interrupt = kENET_RxFrameInterrupt;
}
count++;
}
if (count == ENET_PHY_TIMEOUT)
{
LWIP_ASSERT("\r\nPHY Link down, please check the cable connection.\r\n", 0);
}
You can try to use the same method for your phy and check if this can solve the cable connection event.
I hope this can help you!
Regards,
Isaac