<?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 Stuck in netconn_write if calling task uses to low prio! in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Stuck-in-netconn-write-if-calling-task-uses-to-low-prio/m-p/518854#M2887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tjoAG on Tue Jan 15 03:53:01 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a LPC1788 running FreeRTOS and lwIP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When a task, using netconn_write function, has a to low FreeRTOS priority, then it can lockup sometimes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a function I use for sending Ethernet data via the netconn API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To protect the TX function I use a critical section so one task can complete the transmit before a new one can do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if I the calling task has a low FreeRTOS priority the task is stuck in the netconn_write(..) function??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems strange to me. It never returns from it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using higher priority, seems to solve the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the calling tasks has priority of at least 3, it seems to be fine. (I haven't tried higher)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The lwip recevie, transmit and tcp_ip task has the FreeRTOS priority at 3,3 and 4&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The NVIC priority are set accordingly to Cortex M3 and FreeRTOS guideline. (Higer is lower:-))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea why it does that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:36:21 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:36:21Z</dc:date>
    <item>
      <title>Stuck in netconn_write if calling task uses to low prio!</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Stuck-in-netconn-write-if-calling-task-uses-to-low-prio/m-p/518854#M2887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tjoAG on Tue Jan 15 03:53:01 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a LPC1788 running FreeRTOS and lwIP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When a task, using netconn_write function, has a to low FreeRTOS priority, then it can lockup sometimes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a function I use for sending Ethernet data via the netconn API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To protect the TX function I use a critical section so one task can complete the transmit before a new one can do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if I the calling task has a low FreeRTOS priority the task is stuck in the netconn_write(..) function??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems strange to me. It never returns from it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using higher priority, seems to solve the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the calling tasks has priority of at least 3, it seems to be fine. (I haven't tried higher)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The lwip recevie, transmit and tcp_ip task has the FreeRTOS priority at 3,3 and 4&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The NVIC priority are set accordingly to Cortex M3 and FreeRTOS guideline. (Higer is lower:-))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea why it does that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:36:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Stuck-in-netconn-write-if-calling-task-uses-to-low-prio/m-p/518854#M2887</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:36:21Z</dc:date>
    </item>
  </channel>
</rss>

