<?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 LCP54606 SDK Ethernet interrupt issue in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LCP54606-SDK-Ethernet-interrupt-issue/m-p/1062712#M41023</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using LPC54606 MCU and am trying to get the `lwip_udpecho_bm` sample program (from the SDK) to work using&amp;nbsp;Ethernet RX_DMA interrupts. It works without any modifications to the code, using polling. I am also able to get the `lpcxpresso54608_enet_txrx_transfer_rxinterrupt` sample program&amp;nbsp;to work (it uses interrupts), without any problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I enable RX DMA interrupt in the `&lt;SPAN&gt;lwip_udpecho_bm` program using `&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;ENET_EnableInterrupts(ethernetif-&amp;gt;&lt;SPAN class=""&gt;base&lt;/SPAN&gt;, &lt;SPAN class=""&gt;&lt;EM&gt;kENET_DmaTx&lt;/EM&gt;&lt;/SPAN&gt; | &lt;SPAN class=""&gt;&lt;EM&gt;kENET_DmaRx&lt;/EM&gt;&lt;/SPAN&gt;);&amp;nbsp;[file:&amp;nbsp;enet_ethernetif_lpc.c, line: 326]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class=""&gt;and invokes the following function from the callback&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;...&lt;BR /&gt;else if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt; (event ==&amp;nbsp;&lt;/SPAN&gt;kENET_RxIntEvent&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;{&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ethernetif_input(netif);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[file:&amp;nbsp;enet_ethernetif_lpc.c, code from line: 140]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class=""&gt;the RX DMA stops working after `ENET_RXBD_NUM` number of interrupts (tried changing the value from 5 but&amp;nbsp;without any success).&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I tried looking&amp;nbsp;for the place where the descriptors are updated after&amp;nbsp;each&amp;nbsp;DMA. However, it seems that the descriptor buffer is wrapped to form pbuff which is passed to the lwip stack. I am not able to find where this is being released and the ownership of the descriptor is&amp;nbsp;assigned back to the DMA (bit 31 in RDES3). Is this intentional?&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I&amp;nbsp;also&amp;nbsp;tried updating the descriptors to release the buffers, but that did not help. Is there a fix for this?&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;Additionally, it seems&amp;nbsp;the driver funcitons used to&amp;nbsp;read are different between `&lt;SPAN&gt;lpcxpresso54608_enet_txrx_transfer_rxinterrupt` (using&amp;nbsp;&lt;/SPAN&gt;ENET_ReadFrame()&amp;nbsp;&lt;SPAN&gt;) and `lwip_udpecho_bm` (using&amp;nbsp;&lt;/SPAN&gt;ethernetif_read_frame() )&lt;SPAN&gt;. Any reason for this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jul 2020 15:18:55 GMT</pubDate>
    <dc:creator>manu1</dc:creator>
    <dc:date>2020-07-17T15:18:55Z</dc:date>
    <item>
      <title>LCP54606 SDK Ethernet interrupt issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LCP54606-SDK-Ethernet-interrupt-issue/m-p/1062712#M41023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using LPC54606 MCU and am trying to get the `lwip_udpecho_bm` sample program (from the SDK) to work using&amp;nbsp;Ethernet RX_DMA interrupts. It works without any modifications to the code, using polling. I am also able to get the `lpcxpresso54608_enet_txrx_transfer_rxinterrupt` sample program&amp;nbsp;to work (it uses interrupts), without any problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I enable RX DMA interrupt in the `&lt;SPAN&gt;lwip_udpecho_bm` program using `&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;ENET_EnableInterrupts(ethernetif-&amp;gt;&lt;SPAN class=""&gt;base&lt;/SPAN&gt;, &lt;SPAN class=""&gt;&lt;EM&gt;kENET_DmaTx&lt;/EM&gt;&lt;/SPAN&gt; | &lt;SPAN class=""&gt;&lt;EM&gt;kENET_DmaRx&lt;/EM&gt;&lt;/SPAN&gt;);&amp;nbsp;[file:&amp;nbsp;enet_ethernetif_lpc.c, line: 326]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class=""&gt;and invokes the following function from the callback&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;...&lt;BR /&gt;else if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt; (event ==&amp;nbsp;&lt;/SPAN&gt;kENET_RxIntEvent&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;{&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ethernetif_input(netif);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[file:&amp;nbsp;enet_ethernetif_lpc.c, code from line: 140]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class=""&gt;the RX DMA stops working after `ENET_RXBD_NUM` number of interrupts (tried changing the value from 5 but&amp;nbsp;without any success).&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I tried looking&amp;nbsp;for the place where the descriptors are updated after&amp;nbsp;each&amp;nbsp;DMA. However, it seems that the descriptor buffer is wrapped to form pbuff which is passed to the lwip stack. I am not able to find where this is being released and the ownership of the descriptor is&amp;nbsp;assigned back to the DMA (bit 31 in RDES3). Is this intentional?&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I&amp;nbsp;also&amp;nbsp;tried updating the descriptors to release the buffers, but that did not help. Is there a fix for this?&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;Additionally, it seems&amp;nbsp;the driver funcitons used to&amp;nbsp;read are different between `&lt;SPAN&gt;lpcxpresso54608_enet_txrx_transfer_rxinterrupt` (using&amp;nbsp;&lt;/SPAN&gt;ENET_ReadFrame()&amp;nbsp;&lt;SPAN&gt;) and `lwip_udpecho_bm` (using&amp;nbsp;&lt;/SPAN&gt;ethernetif_read_frame() )&lt;SPAN&gt;. Any reason for this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2020 15:18:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LCP54606-SDK-Ethernet-interrupt-issue/m-p/1062712#M41023</guid>
      <dc:creator>manu1</dc:creator>
      <dc:date>2020-07-17T15:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: LCP54606 SDK Ethernet interrupt issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LCP54606-SDK-Ethernet-interrupt-issue/m-p/1062713#M41024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fixed the issue by&amp;nbsp;modifying the code as recommended in lwIP's documentation "Mainloop mode ("NO_SYS")" - &lt;A class="link-titled" href="https://www.nongnu.org/lwip/2_0_x/group__lwip__nosys.html" title="https://www.nongnu.org/lwip/2_0_x/group__lwip__nosys.html"&gt;lwIP: Mainloop mode ("NO_SYS")&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 00:30:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LCP54606-SDK-Ethernet-interrupt-issue/m-p/1062713#M41024</guid>
      <dc:creator>manu1</dc:creator>
      <dc:date>2020-07-23T00:30:25Z</dc:date>
    </item>
  </channel>
</rss>

