MACB PHY interrupt on EVK1100

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the PHY interrupt in the MACB driver used for? I cannot find any specific processing in the vPHY_ISR(void) handler in the MACB driver code, except for the reading of the PHY status register.

I know the interrupt setup can be disabled by changing this constant in conf_eth.h like this:

ETHERNET_CONF_USE_PHY_IT 0

So what will (not) happen if i disable it? If it is no problem it also saves an IO pin. The same pin can then be used as PHY poweroff instead since it default to that function on the PHY.

I am programming stand alone, not using RTOS

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I have used the EVK1105 but not EVK1100 but I assume they are equivalent.

Since the PHY is connected in RMII mode it is important to know what speed the PHY is set to (eg. when auto-negotiating) so that the MACB can be set to the same. If this is not done and the speeds are not matched the Ethernet interface will not work properly (eg. if the MACB is set to 100M and the PHY negotiates to 10M all is well, but if the PHY auto-negotiates to 10M there will be a mismatch and no communication is possible. In this case the mode of the MACB must be synchronised).

By using the PHY interrupt (after configuring to interrupt on link state changes) the MACB setting can be synchronised accordingly:
MACB_NCFGR |= SPD; // set 100M operation

or
MACB_NCFGR &= ~SPD; // set 10M operation

Regards

Mark

uTasker.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your suggestions.

I see the clue about updating the MACB about the status of the PHY, ie when the user move the network cable to another machine or router running at another speed.

But i found no handler code in the framework i am using v 1.2.0 (for the old UC3A ES). Perhaps the framework you are using supports it better?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

The code being used is from the uTasker project (free for non-commercial work and fully supported - the project will be officially released in the next few days and then all code will be available [including an AVR32 simulator allowing full application code to be tested in real-time - including Ethernet, USARTs etc.]).

You can see it on-line at http:/demo.uTasker.com where it also display the present image in the LCD and allows posting images to it - see also the following thread: https://www.avrfreaks.net/index.p...

Regards

Mark