<?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: UART changes Ethernet behaviour</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/UART-changes-Ethernet-behaviour/m-p/880302#M35172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the problem. It's in LWIP_DEBUGF macro in lpc_low_level_output(). In my application, when a pbuf chain is passed to the function, the while loop prepare the descriptor of each fragment and &lt;STRONG&gt;increment the TxProduceIndex&lt;/STRONG&gt;. When LWIP_DEBUGF is enabled and takes some time to finish (as in my case), it is possible that the first fragment&amp;nbsp;is transmitted &lt;STRONG&gt;before the second descriptor is&amp;nbsp;configured&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because the first fragment is configured without&amp;nbsp;ENET_TCTRL_LAST flag, I think the DMA starts transmitting a second corrupted fragment.&lt;/P&gt;&lt;P&gt;I solved increasing TxProduceIndex &lt;STRONG&gt;after&lt;/STRONG&gt; the while loop, so the descriptor are all correctly configured.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Apr 2019 12:57:07 GMT</pubDate>
    <dc:creator>giusloq</dc:creator>
    <dc:date>2019-04-05T12:57:07Z</dc:date>
    <item>
      <title>UART changes Ethernet behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/UART-changes-Ethernet-behaviour/m-p/880301#M35171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a project that runs on a custom LPC1768 board. The project uses Ethernet (with lwip in NO_SYS=1 mode) and UART for debug.&lt;/P&gt;&lt;P&gt;It works well many times. However I noticed a strange relation between UART and Ethernet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally I can communicate with a server (MQTT over TLS). I can see frames/packets out and in and the communication is ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I add some debug output in LPC Ethernet driver (for example in low_level_output() in lpc17xx_40xx_emac.c), Ethernet works differently. It seems some incoming frames that are normally received, aren't received now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know it's a very big question, however what could be the relation between UART and Ethernet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2019 11:22:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/UART-changes-Ethernet-behaviour/m-p/880301#M35171</guid>
      <dc:creator>giusloq</dc:creator>
      <dc:date>2019-04-04T11:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: UART changes Ethernet behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/UART-changes-Ethernet-behaviour/m-p/880302#M35172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the problem. It's in LWIP_DEBUGF macro in lpc_low_level_output(). In my application, when a pbuf chain is passed to the function, the while loop prepare the descriptor of each fragment and &lt;STRONG&gt;increment the TxProduceIndex&lt;/STRONG&gt;. When LWIP_DEBUGF is enabled and takes some time to finish (as in my case), it is possible that the first fragment&amp;nbsp;is transmitted &lt;STRONG&gt;before the second descriptor is&amp;nbsp;configured&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because the first fragment is configured without&amp;nbsp;ENET_TCTRL_LAST flag, I think the DMA starts transmitting a second corrupted fragment.&lt;/P&gt;&lt;P&gt;I solved increasing TxProduceIndex &lt;STRONG&gt;after&lt;/STRONG&gt; the while loop, so the descriptor are all correctly configured.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 12:57:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/UART-changes-Ethernet-behaviour/m-p/880302#M35172</guid>
      <dc:creator>giusloq</dc:creator>
      <dc:date>2019-04-05T12:57:07Z</dc:date>
    </item>
  </channel>
</rss>

