<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>ColdFire/68K Microcontrollers and Processors中的主题 Re: mcf52259 FEC RXF ISR stops sometimes</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377605#M12384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Compare your interrupt handling code with that here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://lxr.free-electrons.com/source/drivers/net/ethernet/freescale/fec_main.c#L1535" title="http://lxr.free-electrons.com/source/drivers/net/ethernet/freescale/fec_main.c#L1535"&gt;http://lxr.free-electrons.com/source/drivers/net/ethernet/freescale/fec_main.c#L1535&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;int_events = readl(fep-&amp;gt;hwp + FEC_IEVENT);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;writel(int_events, fep-&amp;gt;hwp + FEC_IEVENT);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;fec_enet_collect_events(fep, int_events);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be reading the FEC_IER register, writing the exact read value back into FEC_IER, and THEN checking the event bits in that register to see what you should be doing (like scanning through the Receive BDs). That's the safest and most efficient way to handle the events without losing any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure you're not taking the interrupt, scanning the (one or more ready) received buffer descriptors and THEN clearing the interrupt? That's guaranteed to lose them. You can also get multiple receives and only one interrupt, so you have to read "all that are there" and not just one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Mar 2015 02:35:54 GMT</pubDate>
    <dc:creator>TomE</dc:creator>
    <dc:date>2015-03-12T02:35:54Z</dc:date>
    <item>
      <title>mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377604#M12383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a project where after some unknown event happens, the FEC stops triggering the RXF interrupt.&amp;nbsp; It could be minutes, could be days before the event happens.&amp;nbsp; Wiresharking hasn't shown anything suspicious. Tx is still working, in fact, our clue that there is a problem is that the device is refreshing its ARP table on its 20 minute boundary but doesn't listen to the response.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Things I've checked when this occurs:&lt;/P&gt;&lt;P&gt;EBERR is 0&lt;/P&gt;&lt;P&gt;RXF is 0&lt;/P&gt;&lt;P&gt;RXB is usually 1, but that mask is not set&lt;/P&gt;&lt;P&gt;ETHR_EN is 1&lt;/P&gt;&lt;P&gt;RDAR is 1&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, not every device seems to do this.&amp;nbsp; Out of 100 devices probably 5-10 exhibit this behavior.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help in how to trouble shoot this would be great.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 15:38:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377604#M12383</guid>
      <dc:creator>alager</dc:creator>
      <dc:date>2015-03-11T15:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377605#M12384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Compare your interrupt handling code with that here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://lxr.free-electrons.com/source/drivers/net/ethernet/freescale/fec_main.c#L1535" title="http://lxr.free-electrons.com/source/drivers/net/ethernet/freescale/fec_main.c#L1535"&gt;http://lxr.free-electrons.com/source/drivers/net/ethernet/freescale/fec_main.c#L1535&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;int_events = readl(fep-&amp;gt;hwp + FEC_IEVENT);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;writel(int_events, fep-&amp;gt;hwp + FEC_IEVENT);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;fec_enet_collect_events(fep, int_events);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be reading the FEC_IER register, writing the exact read value back into FEC_IER, and THEN checking the event bits in that register to see what you should be doing (like scanning through the Receive BDs). That's the safest and most efficient way to handle the events without losing any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure you're not taking the interrupt, scanning the (one or more ready) received buffer descriptors and THEN clearing the interrupt? That's guaranteed to lose them. You can also get multiple receives and only one interrupt, so you have to read "all that are there" and not just one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2015 02:35:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377605#M12384</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2015-03-12T02:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377606#M12385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; Our receive interrupt is "stand alone".&amp;nbsp; Each interrupt has its own vector, so we don't need to figure out why we are in the interrupt.&amp;nbsp; So (as can be seen in the code snippet below) we immediately clear the EIR bit for this interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;__declspec(interrupt) static void fecISR_RXF ( void )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; devCtrl-&amp;gt;eir = 0x02000000; // clear the bit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; // stuff a message to send to the handler task&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Attached is a screen shot showing the FEC registers and the buffer descriptors.&amp;nbsp; From what I can understand they buffers are pretty much all free.&amp;nbsp; No dropped frames etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a side note, we are sending frames just fine.&amp;nbsp; The device is sending an ARP request for the gateway repeatedly, which is responding each time.&amp;nbsp; But we don't see the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 18:43:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377606#M12385</guid>
      <dc:creator>alager</dc:creator>
      <dc:date>2015-03-17T18:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377607#M12386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Out of 100 devices probably 5-10 exhibit this behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under identical test conditions in your shop or at 100 different customer locations (receiving different data patterns)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The usual then. Check all the voltages. Check for noise. Add lots more bypass caps to a failing unit. Check for crystal/oscillator stability. Check for undershoots/overshoots on the external pins (between the CPU and the PHY). Run hot and cold. Run at low and high supply voltages. Change the clock speed (if you can). Play with the Arbiter settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hit it with "sudo ping -f -l 20 -s 100" from a Linux box with small and large packet sizes and see if you can get it to fail more often.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; From what I can understand they buffers are pretty much all free.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll analyse that next, but the only thing that should stop the receive interrupts, is either there's no data arriving (something went wrong with the PHY or the pin programming) or the receiver is "stuck" on a full descriptor and is waiting for you to read it. The latter can happen if the ring is full, or if it is just out of sync.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I want to check the EMRBR and RCR[MAX_FL] against the programmed buffer sizes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EMRBR = 000005F0 - Buffer Size is 05FF or 1535&lt;/P&gt;&lt;P&gt;RCR = 05EE0004 - Buffer Size is 05EE or 1518&lt;/P&gt;&lt;P&gt;ERDSR = 10040000&lt;/P&gt;&lt;P&gt;10040000 = 80000040 10040100 - &lt;/P&gt;&lt;P&gt;10040008 = 80000040 10040740 - 740 - 100 = 640 = 1600 bytes per buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's all fine. You're using 8 Receive Descriptors, all are empty and the last one has the "Wrap" bit set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What about RDAR? It is 0x01000000, so the FEC thinks it has free descriptors.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I still think your PHY has locked up or you've got a hardware problem external to the chip. Are you monitoring for Link Status through the MII? Do you have a Link LED connected to the PHY?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You've got MSCR set to 0x0000000A which means MSCR[MII_SPEED] is "5". That's the recommended value for a System Clock of 25MHz. Is that what you're running at? If you're running at 66 or 80MHz you should change that divider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you found a way to recover from this? Does disabling and enabling the FEC fix it (ECR[ETHER_EN])? How about resetting and reprogramming (ECR[RESET])? Do you have a reset control to the PHY? I see you have a "foo" variable in the code that looks like you're using it to force reset and reprogramming. What have you found using that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try and test it with Internal Loopback? Can you switch it to Loopback when it has failed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 00:00:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377607#M12386</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2015-03-18T00:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377608#M12387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See answers inline:&lt;/P&gt;&lt;P&gt;&amp;gt;Under identical test conditions in your shop or at 100 different customer locations (receiving different data patterns)?&lt;/P&gt;&lt;P&gt;A: I only have one in the shop that will do this "consistently" sometimes every 20 minutes, sometimes not for a week.&amp;nbsp; Most are out in the wild at customer locations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;Check all the voltages. Check for noise. Add lots more bypass caps to a failing unit. Check for crystal/oscillator stability.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;A: I did check the supply, 3.3v with a dmm.&amp;nbsp; but you make me think I should scope it, could be sag/spike related.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;Check for undershoots/overshoots on the external pins (between the CPU and the PHY).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;A: I did put a scope on the fec_RXDV pin on the MII interface, to see if the PHY was stopped.&amp;nbsp; The pulses look good on that one, and they never stopped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;Run hot and cold.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;A: did this, couldn't find a correlation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;Run at low and high supply voltages.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;A: this would be a challenge, I'll look into it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;Change the clock speed (if you can).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;A: I'll look to see what our PLL is set to, the xtal is 25Mhz, the cpu runs at 50Mhz.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;Play with the Arbiter settings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;A: I'll look into this, not sure what/where it is.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;but the only thing that should stop the receive interrupts, is either there's no data arriving (something went wrong with the PHY or the pin programming) or the receiver is "stuck" on a full descriptor and is waiting for you to read it. The latter can happen if the ring is full, or if it is just out of sync.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: I don't think it's the PHY due to the fec_RXDV pin continually sending pulses. And as you verified, the BD are all marked as empty.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;I still think your PHY has locked up or you've got a hardware problem external to the chip.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: The PHY isn't completely locked up, since the system is sending ARP requests, and we are getting fec_RXDV pulses for new frames.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;Are you monitoring for Link Status through the MII?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: no&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;Do you have a Link LED connected to the PHY?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: yes link is on, and the activity LED blinks with every TX frame the device sends.&amp;nbsp; It is not designed to blink with RX packets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;You've got MSCR set to 0x0000000A which means MSCR[MII_SPEED] is "5". &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;That's the recommended value for a System Clock of 25MHz. Is that what you're running at? If you're running at 66 or 80MHz you should change that divider.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: The cpu runs at 50Mhz.&amp;nbsp; I'll look at the MSCR setting to see what is more appropriate.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;Have you found a way to recover from this?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: No.&amp;nbsp; it requires a chip reset (restarting the debugger works too), which does a hard reset on the PHY.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;Does disabling and enabling the FEC fix it (ECR[ETHER_EN])? How about resetting and reprogramming (ECR[RESET])?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;I see you have a "foo" variable in the code that looks like you're using it to force reset and reprogramming. What have you found using that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: nope, and nope. yeah, the foo variable is to force the re-init of the fec and phy, but to no avail.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;Do you have a reset control to the PHY? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;A: yes, thanks for making me look. :smileyhappy:&lt;/SPAN&gt;&amp;nbsp; I'll try playing with this in addition to the above re-initing the fec and phy.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;Can you try and test it with Internal Loopback? Can you switch it to Loopback when it has failed?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: I hadn't thought of this, I'll try and see what happens.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;I have some homework to do.&amp;nbsp; It'll probably be a day or so to check all this out.&amp;nbsp; However, if you see anything in my current answers that points to something, please let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;Aaron&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 17:31:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377608#M12387</guid>
      <dc:creator>alager</dc:creator>
      <dc:date>2015-03-18T17:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377609#M12388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;You've got MSCR set to 0x0000000A which means MSCR[MII_SPEED] is "5".&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt;That's the recommended value for a System Clock of 25MHz. Is that what you're running at? If you're running at 66 or 80MHz you should change that divider.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;So as I said the CPU runs at 50Mhz, The driver code tried to write the value 0xa into the register, but since MII_SPEED is bit shifted by one, with respect to the &lt;SPAN style="color: #3d3d3d; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;MSCR &lt;/SPAN&gt;base address, the value of 5 was being written.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;5 would make the clock speed be 5Mhz, which is out of spec.&amp;nbsp; I've fixed the driver to write an actual 0xa into &lt;SPAN style="color: #3d3d3d; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;MII_SPEED, and am testing now.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;Aaron&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 18:09:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377609#M12388</guid>
      <dc:creator>alager</dc:creator>
      <dc:date>2015-03-18T18:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377610#M12389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well the MII_SPEED wasn't THE problem, but it was A problem.&amp;nbsp; Still messing up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 18:24:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377610#M12389</guid>
      <dc:creator>alager</dc:creator>
      <dc:date>2015-03-18T18:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377611#M12390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Loopback testing in the FEC seems to indicate that the issue isn't in the FEC.&lt;/P&gt;&lt;P&gt;1) when things are operating normal, I set the loop and prom bits, I then get an interrupt for each frame I send.&lt;/P&gt;&lt;P&gt;2) set the bits back to normal, and watch operation until the failure appears&lt;/P&gt;&lt;P&gt;3) again set the prom and loop bits and I get an interrupt for each frame I send.&lt;/P&gt;&lt;P&gt;4) turn loop off, leave prom on, still no RX interrupts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 21:05:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377611#M12390</guid>
      <dc:creator>alager</dc:creator>
      <dc:date>2015-03-18T21:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377612#M12391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;&amp;gt;Do you have a Link LED connected to the PHY?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;testing with code that blinks for both RX and TX shows that there is no discernible difference in the LED behavior from normal operation to abnormal operation.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;The link LED is steady on, and turns off when I unplug the cable.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 21:46:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377612#M12391</guid>
      <dc:creator>alager</dc:creator>
      <dc:date>2015-03-18T21:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377613#M12392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt; &lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;A: I don't think it's the PHY due to the fec_RXDV pin continually sending pulses.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;There are 16 FEC-related pins on the CPU. See if you can see a difference (in level, frequency, slope) between "working" and "not working".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;Do you have any code monitoring the LINK bit in the PHY over the MII? Just in case some of its internal bits flip when it goes wrong it might show something. You must have something monitoring the PHY (to get 10/100 MHz auto-negotiation information for matching the FEC to the PHY), but I noticed the MII interrupt wasn't enabled. Is it polling with a timer?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;We have some very simple code monitoring the link. In case this is useful for someone else looking to do this We periodically send this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // start a fresh read&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MCF_FEC_MMFR = MCF_FEC_MMFR_ST_01 | MCF_FEC_MMFR_OP_READ |&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MCF_FEC_MMFR_PA(phy_addr) | MCF_FEC_MMFR_RA(1)|MCF_FEC_MMFR_TA_10;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the MII ISR does this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;void fec_mii_isr( void )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MCF_FEC_EIR = MCF_FEC_EIR_MII;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fec_link_stat = ( MCF_FEC_MMFR &amp;amp; 0x04 ) != 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt; &amp;gt; &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px;"&gt;Have you found a way to recover from this?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&amp;gt; A: No.&amp;nbsp; it requires a chip reset (restarting the debugger works too), which does a hard reset on the PHY.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;So a reset of the FEC doesn't fix it. So what does a chip reset do that resetting the FEC doesn't? It reprograms the GPIO pins.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;You should check to see if any of the GPIO registers that control assignment of the 16 FEC pins have flipped. corrupted or gotten stomped by a rogue pointer somehow.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;"Table 2-1. Pin Functions by Primary and Alternate Purpose" shows the FEC pins are PTI and PTJ (selected by PTIPAR and PTJPAR) as well as being affected by PSRRH and PDSRH.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;You have a powerful tool there. In the screen snapshot you provided the debugger helpfully highlighted the I/O registers that had changed since the last time it sampled them. That removes the drudgery of manually comparing or decoding them all. That didn't show anything interesting with the FEC registers, so I suggest you see if any *OTHER* I/O registers changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;Does the register window only show changes in the ones showing in the window, in the ones where that part of the tree is "open" or does it sample and list ALL of them? It might show a change that is causing this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;You could also get the "foo" code to call the function that reprograms all the GPIO pins, and see if that fixes it.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;Tom&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 22:48:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377613#M12392</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2015-03-18T22:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377614#M12393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&amp;nbsp; It's nice to bounce ideas off of fresh minds.&amp;nbsp; I started probing the MII interface and it turns out that the RX_CLK was only 0.5vpp.&amp;nbsp; It was a bad solder joint.&amp;nbsp; Argh!&lt;/P&gt;&lt;P&gt;I think the fact that the problem would go away after a reset was leading me astray.&amp;nbsp; Your input definitely got me to thinking whole picture.&lt;/P&gt;&lt;P&gt;Now to figure out if we have a production issue with the rest of these things that don't keep talking Ethernet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 16:17:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377614#M12393</guid>
      <dc:creator>alager</dc:creator>
      <dc:date>2015-03-19T16:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377615#M12394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; It was a bad solder joint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assuming you found a genuine dry or cracked joint, verified it visually, verified by bending the board (or flexing the joint) and then fixed by resoldering. My suggestion of "heat it, cool it" might have found that. I didn't suggest "bend it" because you said you had lots of other units with the "same fault".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp; Argh!I think the fact that the problem would go&lt;/P&gt;&lt;P&gt;&amp;gt; away after a reset was leading me astray.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't see a how a Reset fixing a bad solder joint, unless you have a reset press-button on the board and you bent the board while resetting it. Or reset it by physically unplugging it and mechanically stressed the board while doing that. But you said "reset from the debugger" fixed it, so that's not the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bad joint doesn't explain all the other units. They must have different faults to the one with the bad joint. It would be a very strange hardware design or production problem that consistently creates one specific bad joint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might still be possible that you have some tracks shorted together. You might have some other pin on the CPU shorted to a FEC signal (maybe even RX_CLK), and when that pin is programmed as an output, there's a "fight" between the PHY pin and the CPU pin and the resulting signal exceeds the receiver threshold on some boards at some times and not on others. Throwing a bad joint into that mix would certainly show a bad signal level. Shorted tracks could be a design/production problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 02:27:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/377615#M12394</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2015-03-20T02:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/1334123#M14136</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/31508"&gt;@alager&lt;/a&gt;&amp;nbsp;were you able to solve the issue mentioned in subject? I am having similar issue too.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 12:24:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/1334123#M14136</guid>
      <dc:creator>EmbEng</dc:creator>
      <dc:date>2021-09-02T12:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: mcf52259 FEC RXF ISR stops sometimes</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/1337230#M14139</link>
      <description>&lt;P&gt;Alager last posted over 6 years ago. Who would still be working on developing products based on the same 12 year old (2009) chips 6 years later? I guess you for one, and me for two :-).&lt;/P&gt;&lt;P&gt;Please describe your system and your symptoms. Make a list of all of the suggestions that were investigated in this thread, check them on your system, and then list all of them in a post to this thread. Your best bet is to check all of those things. You'll probably solve it by doing that.&lt;/P&gt;&lt;P&gt;There's no "one cause" to these problems, no one single magic bullet.&lt;/P&gt;&lt;P&gt;There's the "Search" field at the upper right where you can look for other people with the same problem. That's probably how you found this thread. I did that back in 2017, so you might want to check all of these. It is worth checking Coldfire and i.MX solutions as they pretty much have the same Ethernet controller. There's one there that definitely found and fixed a (common) programming problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/457044" target="_blank"&gt;https://community.nxp.com/thread/457044&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Extra references to other i.MX problems:&lt;/P&gt;&lt;P&gt;i.MX6 FEC stops generating receive interrupts&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/322882" target="_blank"&gt;https://community.nxp.com/thread/322882&lt;/A&gt;&lt;/P&gt;&lt;P&gt;FEC on imx6q stops receiving packets&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/384970" target="_blank"&gt;https://community.nxp.com/thread/384970&lt;/A&gt;&lt;/P&gt;&lt;P&gt;imx6d fec buffer descriptor update incoherent&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/435323" target="_blank"&gt;https://community.nxp.com/thread/435323&lt;/A&gt;&lt;/P&gt;&lt;P&gt;FEC ethernet packetloss&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/316594" target="_blank"&gt;https://community.nxp.com/thread/316594&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/936589" target="_blank"&gt;https://community.nxp.com/message/936589&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But here's another thing that could be causing this. The Interrupt Priority Programming.. All of the MCF52xx chips have this problem (it was fixed in the MCF53xx ones). If you get this wrong you can LOSE interrupts when two happen at the same time.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Coldfire-V2-Kernel-ISR-invoked-even-while-it-s-masked/m-p/1195010#M14032" target="_blank"&gt;https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Coldfire-V2-Kernel-ISR-invoked-even-while-it-s-masked/m-p/1195010#M14032&lt;/A&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;There are three ways to make these bad things happen with interrupts:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;1 - Use IPL7. So just don't. Ever. Unless you really need a non-maskable interrupt to fire ONCE.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;2 - Interrupts with the same Level and Priority. You can't have duplicates as it confuses the interrupt controller.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;3 - Leaving CPU interrupts enabled when you change the interrupt enables in the interrupt controller or anywhere else. Make sure you force the CPU to IPL7 around all of these, and that explains why (1) above is a bad idea too.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Spurious-interrupt-with-declspec-interrupt/m-p/636235" target="_blank"&gt;https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Spurious-interrupt-with-declspec-interrupt/m-p/636235&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 00:08:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/mcf52259-FEC-RXF-ISR-stops-sometimes/m-p/1337230#M14139</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2021-09-09T00:08:48Z</dc:date>
    </item>
  </channel>
</rss>

