[En-Nut-Discussion] PHY set up, cable plugging, re-plugging
Dave Warren
dwarren at luescher.com
Fri Apr 27 13:25:02 CEST 2007
I just got my own SAM7X based board to work with a different PHY.(National
DP83848i). It got me thinking about the link negotiation.At the moment
Ethernut will stall in EmacReset() if the network cable is unplugged.
However once configured you can unplug/plug the cable several times and the
PHY automatically sets up with correct modes. In EmacReset the code finishes
with configuring the EMAC for the PHY mode.
How about if we split the EmacReset() code so that it resets and programs
the PHY then checks once to see if link is OK. If link OK it can program the
EMAC mode and return, if link is bad it just returns anyway. Then in the
idle thread we can check the PHY status, if it changes, say link is
established we can program the EMAC mode.
I think this would avoid the stall if Ethernut starts up unplugged and may
deal with the case of plugging a running Ethernut into a different hub
perhaps with different abilities Speed or Full/Half duplex ect.
Best regards
Dave Warren
More information about the En-Nut-Discussion
mailing list