WIZnet Developer Forum

Link-down/Link-up interrupt

Hello :wink:. 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.

What about using LinkLED pin as a source for generating interrupt?

Thanks. I think this is a possible way. Have you ever tried it?

No :frowning:
Probably you will want some delay circuit so that only linkdowns which last for let’s say 500 ms or more cause interrupt.

[quote=“Eugeny”]No :frowning:
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.

This method works well.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.