<?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>LPC Microcontrollers中的主题 Re: Problem with LwIP and EMAC</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524884#M7520</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 Sep 11 15:15:28 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems to be a known issue with the LWIP port and has been submitted by a number of users. This part is scheduled to be re-designed, but you'll have to use a workaround to get around the issue for now - or you will need to increase your TX DMA buffer count to a higher value (at the expense of memory).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The best approach so far seems to be this one: (18xx/43xx, but same design also applies to the 17xx/40xx)&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%2Flpcware.com%2Fcontent%2Fbugtrackerissue%2Flpcopen-v103-lwip-driver-lpc18xx43xxemacc-lockup-problem" rel="nofollow" target="_blank"&gt;http://lpcware.com/content/bugtrackerissue/lpcopen-v103-lwip-driver-lpc18xx43xxemacc-lockup-problem&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note you need to be logged in to see and track bug tracker issues.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:10:29 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:10:29Z</dc:date>
    <item>
      <title>Problem with LwIP and EMAC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524881#M7517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jackandrews on Tue Sep 10 07:42:57 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been testing the TCP echo FreeRTOS demo and everything is working.&amp;nbsp; I'm now trying to connect a server and stream data out.&amp;nbsp; I've added the following task which is created with priority 2 after an IP address has been assigned:&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%2Fpastebin.com%2FBfbx54zJ" rel="nofollow" target="_blank"&gt;http://pastebin.com/Bfbx54zJ&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a python script listening on port 8000.&amp;nbsp; The above code successfully connects and I see the data in the python script, however after a few iterations it hangs.&amp;nbsp; I've noticed that if I place a breakpoint on netconn_write and allow it to slowly execute it works.&amp;nbsp; It also works by adding a 10 ms delay.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, without a delay it gets stuck waiting for free tx descriptors to become available (i.e. semaphore: xSemaphoreTake(lpc_enetif-&amp;gt;xtx_count_sem, 0) is never taken).&amp;nbsp; It would appear that the tx IRQ is never firing and/or the tx_cleanup task is not working properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on how to debug this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jack&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:10:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524881#M7517</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with LwIP and EMAC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524882#M7518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jackandrews on Tue Sep 10 08:49:21 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;OK, a bit more info: disabling the Nagle algorithm (tcp_nagle_disable (xNetConn-&amp;gt;pcb.tcp)) and reducing the test data length to 100 has got it working.&amp;nbsp; However, I'd still like to work out how to send larger packets (e.g. 1kB) to reduce overhead (and increase throughput).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jack&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524882#M7518</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with LwIP and EMAC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524883#M7519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jackandrews on Wed Sep 11 04:57:55 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;False alarm... still fails after a while.&amp;nbsp; Also, I think I've found a bug with the task priorities (I'm working from a clean version of LPCOpen 1.03)... specifically TCPIP_THREAD_PRIO is defined as 5, but configMAX_PRIORITIES is set to 5 which is beyond the maximum number of priorities (see &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freertos.org%2FRTOS-task-priority.html" rel="nofollow" target="_blank"&gt;http://www.freertos.org/RTOS-task-priority.html&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp; This was causing really weird behaviour with FreeRTOS (switching to tasks of lower priorities, etc.).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, attached a wireshark capture and EMAC debug output.&amp;nbsp; I added a stats_display() to lpc_rx_queue when it fails to allocate a pbuf.&amp;nbsp; It would seem I'm running out of memory, but why?&amp;nbsp; Any thoughts greatly appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jack&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:10:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524883#M7519</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with LwIP and EMAC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524884#M7520</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 Sep 11 15:15:28 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems to be a known issue with the LWIP port and has been submitted by a number of users. This part is scheduled to be re-designed, but you'll have to use a workaround to get around the issue for now - or you will need to increase your TX DMA buffer count to a higher value (at the expense of memory).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The best approach so far seems to be this one: (18xx/43xx, but same design also applies to the 17xx/40xx)&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%2Flpcware.com%2Fcontent%2Fbugtrackerissue%2Flpcopen-v103-lwip-driver-lpc18xx43xxemacc-lockup-problem" rel="nofollow" target="_blank"&gt;http://lpcware.com/content/bugtrackerissue/lpcopen-v103-lwip-driver-lpc18xx43xxemacc-lockup-problem&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note you need to be logged in to see and track bug tracker issues.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:10:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524884#M7520</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with LwIP and EMAC</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524885#M7521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was this issue ever resolved and if so is there a link to an update on this? The above link seems broken.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not resolved, any help towards resolving this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2018 21:46:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-LwIP-and-EMAC/m-p/524885#M7521</guid>
      <dc:creator>amorgan</dc:creator>
      <dc:date>2018-03-29T21:46:07Z</dc:date>
    </item>
  </channel>
</rss>

