Hello . I am using a W5500 chip (without an evaluation board). I would love to know what is the best way to know if an unplug/plug event occurs. I know polling the PHY status will do the job but it does not happen often so polling is a waste of my CPU resource.
Naturally, I think an interrupt should be issued for a link-down/up event, but I donât find any interrupt directly indicating an unpluging or pluging event(I guess the socket interrupt of timeout is the best way?).
I have multicast UDP(UPNP), broadcast UDP(DHCP) and TCP sockets and I have to reinitialize a lot of things such as resend the DHCP request and reconfigure the ip address when a repluging event happens.
[quote=âEugenyâ]No
Probably you will want some delay circuit so that only linkdowns which last for letâs say 500 ms or more cause interrupt.[/quote]
Well, thx. We have decided to poll the PHY state in the common register every second and once we see if the current state is up and the previous two states are down, we will restart the network.