<?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>topic Re: LwIP sample program failure in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521211#M4062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Fri Jun 22 01:02:15 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks. I have downloaded "dram_uart_example.hex". I will start a test right away.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:47:07 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:47:07Z</dc:date>
    <item>
      <title>LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521192#M4043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Mon Jun 11 10:59:57 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have downloaded the port of lwIP for LPC17xx and encountered a program failure after some time the controller (LPC1788) handes bus events&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(I ran the TCP echo sample, but I suspect that any will do to demonstrate this):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; /* all pbufs in a chain are referenced at least once */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; LWIP_ASSERT("pbuf_free: p-&amp;gt;ref &amp;gt; 0", p-&amp;gt;ref &amp;gt; 0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which can be found at pbuf.c, Line 627 of version 1.4.0 (the function "pbuf_free"). The failure occurrs both with dynamic and staticaly allocated heap after at most several minutes of running, being pinged or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can this happen? Did you encounter this too? What can be done about it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:46:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521192#M4043</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521193#M4044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wellsk on Mon Jun 11 11:56:11 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ran flood ping tests with tcpecho for a while (easily more than 2 minutes). but didn't see this issue. But I have seen this trap get hit before in specific cases (all of which shouldn't be present except for possible one...). larsjep (another developer) recently discovered an issue with the way chained pbufs are de-allocated in the 18xx/43xx port that may be contributing to this issue. (It's an 18xx/43xx patch, but the same logic should apply to the 17xx port).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The patch is here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fbugtrackerissue%2Flwiplpc-lpc18xx43xx-driver-pbuf-leak-during-transmit" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/bugtrackerissue/lwiplpc-lpc18xx43xx-driver-pbuf-leak-during-transmit&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've noticed problems with the reference counters getting messed up when under load with an RTOS when SYS_LIGHTWEIGHT_PROT is not enabled (SYS_LIGHTWEIGHT_PROT = 0 and NO_SYS = 0). Are you currently using one of the examples without any changes? If you are using a FreeRTOS based example (NO_SYS = 0), can you verify that the SYS_LIGHTWEIGHT_PROT option is set to 1?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have a stack trace available, or know if the issue occurred from the TX or RX handler side?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:46:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521193#M4044</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521194#M4045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Mon Jun 11 12:19:28 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for your reply. I will try to patch my sample/project tomorrow morning!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, indeed, I have been using the sample without my change (after not understanding why my official project fails...).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not have stack trace available yet, but I am quite sure the failure occurs while processing a received message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will report more details tomorrow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:46:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521194#M4045</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521195#M4046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Tue Jun 12 00:20:41 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have merged this change into the my project and it seems to have been working fine for a while now (pinged for about 30 minutes plus).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for sharing this patch.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:46:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521195#M4046</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521196#M4047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Tue Jun 12 02:17:48 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;A small update: I did see my program fail again after about an hour of operation. I cannot provide more details as my debugger was not connected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:46:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521196#M4047</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521197#M4048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wellsk on Tue Jun 12 09:00:33 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Do what you can to identify the area of the problem and we'll try to repeat the issue here. Some type of case where the issue occurs would be very helpful (ie, the stack trace when the error occurs to help trace the failure path). The patch fixes a potential issue with TX pbufs only, but may or may not help at all. Are you using a standalone configuration or with an RTOS?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:46:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521197#M4048</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521198#M4049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Tue Jun 12 23:50:01 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to reproduce the problem, all you need to do is use the embedded artists LPC1788 evaluation board and program it with this sample program:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"nxpcommon\examples\lpc177x_8x\ea1788\ea1788_tcpecho_freertos"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and let it run being pinged or not. After some time, even with the patch posted&amp;nbsp; above, it will hang at the same place indicated above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am going to start another test with a debugger - will provide a stack trace once failure occurs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:46:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521198#M4049</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521199#M4050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Wed Jun 13 00:05:20 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Without the patch above, the failure seems to occur much faster, producing this stack trace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_free (called by ip.c, line 433)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ip_input (called by etharp.c, line 1282)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ethernet_input (called by lpc17_emac.c, line 468)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc_enetif_input (called by lpc17_emac.c, line 787)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vPacketReceive_Task&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this appiles to version 1.4.0 of lwIP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will now attempt to reproduce the failure with the patch.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521199#M4050</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521200#M4051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Wed Jun 13 01:06:40 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I managed to fail the program with the patch - here is the stack trace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_free (called by lpc17_emac.c, line 477)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc_enetif_input (called by lpc17_emac.c, line 787)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vPacketReceiveTask&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It took me something like 45 minutes of continuous pinging (I stopped and resumed shortly before the failure) to cause this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521200#M4051</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521201#M4052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wellsk on Wed Jun 13 08:17:43 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like you are using FreeRTOS and the failure occurred on the input path. I'd keep the TX pbuf patch in, but it looks like I might have another problem with the example code itself using the wrong input path for an RTOS. (Sorry :()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When used with FreeRTOS, the 'ethernet_input' function should be replaced with the 'tcpip_input' function. This is correct for the LPC18xx/43xx examples, but it seems I got a little to comfortable with cut-and-paste.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the example code, can you make the change indicated below and give it a try?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* Add netif interface for lpc17xx_8x */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; memset(lpc_netif, 0, sizeof(lpc_netif));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//&amp;nbsp; if (!netif_add(&amp;amp;lpc_netif, &amp;amp;ipaddr, &amp;amp;netmask, &amp;amp;gw, NULL, lpc_enetif_init, ethernet_input))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (!netif_add(&amp;amp;lpc_netif, &amp;amp;ipaddr, &amp;amp;netmask, &amp;amp;gw, NULL, lpc_enetif_init, tcpip_input))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LWIP_ASSERT("Net interface failed to initialize\r\n", 0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521201#M4052</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521202#M4053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wellsk on Wed Jun 13 09:11:51 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I've entered a bug tracker issue for this case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fbugtrackerissue%2Flwip-17xx-freertos-examples-use-wrong-input-function" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/bugtrackerissue/lwip-17xx-freertos-examples-use-wrong-input-function&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521202#M4053</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521203#M4054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Thu Jun 14 00:46:05 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try this fix ASAP but I must deal with some bush fires first...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the efforts, I will report the results once I have something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521203#M4054</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521204#M4055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by SeleneSW on Tue Jun 19 02:54:43 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same problem with the "ea1788_http_freertos" demo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried with the patches described above but with no success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any news about this thread?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521204#M4055</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521205#M4056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wellsk on Wed Jun 20 14:35:48 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have uploaded the LPC17xx and LCP43xx ports with larsjep's updates and several other fixes for both the 17xx and 43xx platforms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;You can pull the changes from the GIT repo at: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fsw.lpcware.com%2F%3Fp%3Dlwip_lpc.git%26a%3Dsummary" rel="nofollow" target="_blank"&gt;http://sw.lpcware.com/?p=lwip_lpc.git&amp;amp;a=summary&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521205#M4056</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521206#M4057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Thu Jun 21 03:58:50 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the effort. I have downloaded the corrected program and just started what I hope will be a very long test. I will report back.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521206#M4057</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521207#M4058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Thu Jun 21 04:58:13 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Test failed (ping reply no longer generated). I did not have a debugger connected to the target.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521207#M4058</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521208#M4059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Thu Jun 21 05:29:32 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am conducting an additional test to make sure what I have seen is indeed a legitimate failure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521208#M4059</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521209#M4060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Thu Jun 21 06:10:44 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Test failed again. I did not have a debugger connected to the target but it is easy to reproduce - just let any of the test programs run pings (or not) just like above.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521209#M4060</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521210#M4061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wellsk on Thu Jun 21 11:19:32 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;Test failed again. I did not have a debugger connected&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wasn't able to repeat the failure here with the current FLASH variant of the ea1788_tcpecho_freertos project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I opened multiple (3+) flood ping sessions to the EA1788 board and ran them for an hour - the board never lost ping response, although it did occasionally lose some packets or get increased latency times due to loading. (This is with only 3 TX and RX descriptors being used for the driver, so it's to be expected).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FLASH example is very memory limited with the following configuration:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;From lwipopts.h...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define PBUF_POOL_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MEM_SIZE(12*1024)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;From lpc_emac_config.h...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define LPC_NUM_BUFF_RXDESCS 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define LPC_NUM_BUFF_TXDESCS 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It -is- very possible to get LWIP into a state where it's internally 'out of memory' and no more pbufs can be allocated for the receive descriptor queue. If this happens, the code will continue to run, but the MAC controller will accept no more packets as no more descriptors are queued due to no buffers being allocatable! Packet fragmentation will definitely do this (ping -f -s 5000 &amp;lt;IP address&amp;gt;). When LWIP allocates space for copied packet fragments, it uses the same memory for normal buffers - and the pbuf allocation will eventually fail. Only adding more memory will fix this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FLASH variant example uses the internal RAM only. Ethernet buffers and descriptors can only be located in peripheral RAM on the 17xx, which is only 32K. This isn't a lot for LWIP. A DRAM variant is also available that uses DRAM for buffer/pbuf/descriptor allocation from a huge memory pool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the DRAM variant settings, this also boots from FLASH...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define PBUF_POOL_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 256&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MEM_SIZE(4096*1024)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define LPC_NUM_BUFF_RXDESCS 128&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define LPC_NUM_BUFF_TXDESCS 128&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've attached both versions (FLASH/IRAM and FLASH/DRAM) of the example here for the EA1788 board. I've also attached a debug version of the DRAM version here that should output messages to the UART port similar to the following. If LWIP fails, you should see an error message you can re-post here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc_low_level_input: Packet received: a0027110, size 102 (index=109)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_alloc(length=1536)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_alloc(length=1536) == a0026af4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc_rxqueue_pbuf: pbuf packet queued: a0026af4 (free desc=0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_header: old a0027120 new a002712e (-14)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_free(a0027110)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_free: deallocating a0027110&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc_low_level_input: Packet received: a002772c, size 102 (index=110)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_alloc(length=1536)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_alloc(length=1536) == a0027110&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc_rxqueue_pbuf: pbuf packet queued: a0027110 (free desc=0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_header: old a002773c new a002774a (-14)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_free(a002772c)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pbuf_free: deallocating a002772c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc_low_level_input: Packet received: a0027d48, size 102 (index=111)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521210#M4061</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: LwIP sample program failure</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521211#M4062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tamirmichael on Fri Jun 22 01:02:15 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks. I have downloaded "dram_uart_example.hex". I will start a test right away.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:47:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LwIP-sample-program-failure/m-p/521211#M4062</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:47:07Z</dc:date>
    </item>
  </channel>
</rss>

