Author Topic: Ethernet LED Support  (Read 8262 times)

Offline danh

  • Newbie
  • *
  • Posts: 28
    • View Profile
Ethernet LED Support
« on: June 05, 2008, 01:46:54 AM »
I recently started paying closer attention to the ethernet LEDs that are driven by the PORTLD pins on the M5223x. (On our target, only the Link and Activity LEDs are connected.) I noticed that, when LAN_REPORT_ACTIVITY is undefined (the starting state of the uTasker project), the LEDs are handled directly by the microcontroller. That is, there is no application code controlling them, and in fact they are updated even if I stop the debugger and the application code is no longer running. There is some odd behavior in this mode, which is that if you pull the cable while the activity LED is lit, that LED stays lit even though the link LED turns off. (It's not hard to do this because the activity LED also seems to stay on a bit long when there is activity.)

If I define LAN_REPORT_ACTIVITY, then the LEDs are updated by the Network Indicator task instead, and the activity LED doesn't stay on so long (although still plenty long to see the activity), and pulling the cable while the activity LED is lit (such as during a file transfer) the LED goes off as it should. And now of course the LEDs stop getting updated if I stop the debugger.

Just curious if anyone else notices this behavior with the built-in LED support...

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Ethernet LED Support
« Reply #1 on: June 05, 2008, 11:53:59 PM »
Hi

Yes, this is normal behaviour. You can adjust the way the LEDs are controlled (longer or shorter blinking) since it is under SW control - see the following for more details: http://www.utasker.com/forum/index.php?topic=258.0

I have also seen that the way the LEDs blink under PHY control sometimes becomes inverted (M5223X). Since it is controlled by the PHY it continues working when the CPU is stopped - this is also the case for other devices with extrenal PHY.

Regards

Mark