Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Link down interrupt would not come if don't read MR1 in the Ehternet interrupt handler for LM3S9D92

$
0
0

Hello all,

 

    I enabled the link down interrupt for the Ethernet controller to detect the unplugging of cable. And found a strange thing. If it doesn't read MR1 in the interrupt handler the interrupt would not come again after a successful of link down interrupt. I found nowhere of the  datasheet describe the need to read the MR1 in the intterupt handler to successful detection of link donw interrupt . It seams MR1 has no relation to this. If I read MR1 within the handler I can detect every link down interrupt. If the Ethernet controller did really act like this?

We use revision 7243 of the Stellaris Firmware Development Package.

The snippet code to enable link down interrupt:

     EthernetPHYWrite(ETH_BASE, PHY_MR30, PHY_MR30_LDIM); 

    EthernetIntEnable(ETH_BASE, ETH_INT_PHY);

Interrupt handler:

    if(ulTemp & ETH_INT_PHY) {

       ulMR29 = EthernetPHYRead(ETH_BASE, PHY_MR29);

       if (ulMR29 & PHY_MR29_LDIS)  {

            ...;

       } 

    }

   EthernetPHYRead(ETH_BASE, PHY_MR1); // This clause must be here. Or the link down interrupt would not come again.


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>