<?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: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs? in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593887#M6027</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manfred,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I deepened the lwip problem.&lt;/P&gt;&lt;P&gt;Now I have downloaded the KSDK 2.0 and I use the LWIP with freertos. &lt;/P&gt;&lt;P&gt;I have imported the lwip_tcpecho_freertos_frdmk64f but the lwip problem is still present!&lt;/P&gt;&lt;P&gt;Also I have changed the PBUF_POOL_BUFSIZE to 1518 and PBUF_POOL_SIZE to 50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By sending consecutive 512 bytes echo requests on TCP port 7 and simultaneously (to stimulate the problem) &lt;/P&gt;&lt;P&gt;requesting a dummy UDP echo to the FRDM-K64F IP address,&lt;/P&gt;&lt;P&gt;after little time the lwip_tcpecho_freertos_frdmk64f application goes to the assert function as indicated above. &lt;/P&gt;&lt;P&gt;It seems there are performance problems to handle memory allocation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Allowing that the FRDM-K64F can lose Ethernet packets with high IP traffic, &lt;/P&gt;&lt;P&gt;how can I avoid that the program stops on the assert and it runs without losing TCP echo functionality ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tanks a lot!&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Nicola&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jul 2016 07:58:44 GMT</pubDate>
    <dc:creator>nicolabongiovan</dc:creator>
    <dc:date>2016-07-26T07:58:44Z</dc:date>
    <item>
      <title>FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593883#M6023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to use the tcp echo demo project with rtos &lt;STRONG&gt;MQX&lt;/STRONG&gt; supplied with &lt;STRONG&gt;KSDK_1.3.0&lt;/STRONG&gt;, but I found some problems:&lt;/P&gt;&lt;P&gt;when I have tested the tcp_echo application using a PC Tool that performs echo request on TCP port 7, the &lt;STRONG&gt;FRDM-K64F&lt;/STRONG&gt; responds for a little time but after the application stops in the assert function "void sys_assert( const char *msg )" file sys_arch.c.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have captured the two msg below:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name : msg&lt;/P&gt;&lt;P&gt;&amp;nbsp; Details:0x1def8 "tcpip_thread: invalid message"&lt;/P&gt;&lt;P&gt;&amp;nbsp; Default:0x1def8 "tcpip_thread: invalid message"&lt;/P&gt;&lt;P&gt;&amp;nbsp; Decimal:122616&lt;/P&gt;&lt;P&gt;&amp;nbsp; Hex:0x1def8&lt;/P&gt;&lt;P&gt;&amp;nbsp; Binary:11101111011111000&lt;/P&gt;&lt;P&gt;&amp;nbsp; Octal:0357370&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Name : msg&lt;/P&gt;&lt;P&gt;&amp;nbsp; Details:0x1ca80 "pbuf_free: p-&amp;gt;ref &amp;gt; 0"&lt;/P&gt;&lt;P&gt;&amp;nbsp; Default:0x1ca80 "pbuf_free: p-&amp;gt;ref &amp;gt; 0"&lt;/P&gt;&lt;P&gt;&amp;nbsp; Decimal:117376&lt;/P&gt;&lt;P&gt;&amp;nbsp; Hex:0x1ca80&lt;/P&gt;&lt;P&gt;&amp;nbsp; Binary:11100101010000000&lt;/P&gt;&lt;P&gt;&amp;nbsp; Octal:0345200&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No changes I made to the project "&lt;STRONG&gt;lwip_tcpecho_demo_mqx_frdmk64f&lt;/STRONG&gt;" from KSDK_1.3.0.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;There are some bugs on the LWIP stack or there are some errata configuration parameters?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank for any help!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nicola&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 11:29:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593883#M6023</guid>
      <dc:creator>nicolabongiovan</dc:creator>
      <dc:date>2016-07-21T11:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593884#M6024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perhaps it is the same problem as in KSDK2.0 focused in Thread "FreeRTOS LwIP SDK v2.0.0 tpcipecho demo Crash".&lt;/P&gt;&lt;P&gt;You should have a sharp look at&amp;nbsp; ethernetif_input().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manfred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 14:31:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593884#M6024</guid>
      <dc:creator>manfredschnell</dc:creator>
      <dc:date>2016-07-21T14:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593885#M6025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the fast support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked the value of &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;PBUF_POOL_BUFSIZE in lwipopts.h file: the value is correct (1518). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I have changed also the PBUF_POOL_SIZE and other paramters but nothing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;In my network the TCP frames are fragmented (total data len 65500 ) every 20/50 msec. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;My network traffic is enough important.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;After &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;a little time the &lt;SPAN style="font-weight: bold; font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;FRDM-K64F &lt;/SPAN&gt;goes to assert function above descripted.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there some patch for lwip stack?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this tutorial §&lt;STRONG&gt;Possible Problems&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;A href="https://mcuoneclipse.com/2015/10/28/tutorial-lwip-with-the-freertos-and-the-freescale-frdm-k64f-board/" title="https://mcuoneclipse.com/2015/10/28/tutorial-lwip-with-the-freertos-and-the-freescale-frdm-k64f-board/"&gt;https://mcuoneclipse.com/2015/10/28/tutorial-lwip-with-the-freertos-and-the-freescale-frdm-k64f-board/&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I have found this sentence:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;The problem is if the received frames are handled in an interrupt context and passed up the lwip stack. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;This causes problems with reentrance and can cause an assertion."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;The toturial suggests to &lt;/SPAN&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;change the define &lt;/SPAN&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;ENET_RECEIVE_ALL_INTERRUPT with &lt;/SPAN&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define ENET_RECEIVE_ALL_INTERRUPT&amp;nbsp; 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;Has &lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;NXP &lt;/SPAN&gt;identified a solution/patch?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Nicola&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 09:20:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593885#M6025</guid>
      <dc:creator>nicolabongiovan</dc:creator>
      <dc:date>2016-07-22T09:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593886#M6026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you're welcome.&lt;/P&gt;&lt;P&gt;My K64 project is setup with FreeRTOS and KSDK2.0.&lt;/P&gt;&lt;P&gt;I changed the ethernet_callback() to notify a low priority task about the new packet. The handling is done in this task.&lt;/P&gt;&lt;P&gt;With MQX you can do something equivalent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can have a look on my source.&lt;/P&gt;&lt;P&gt;The callback with IRQ context.&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14691840534724741 jive_text_macro" data-renderedposition="242_8_899_464" jivemacro_uid="_14691840534724741"&gt;&lt;P&gt;void ethernet_callback(ENET_Type *base, enet_handle_t *handle, enet_event_t event, void *param)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;#if !NO_SYS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; portBASE_TYPE xWake = pdFALSE;&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (event)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case kENET_RxEvent:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // post info from IRQ context to task&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // instead of handling ist direct!!!! &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // by MS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // A RTOS is being used.&amp;nbsp; Signal the Ethernet interrupt task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Notify the task that the transmission is complete. */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vTaskNotifyGiveFromISR( xTaskToNotifyETH, &amp;amp;xWake );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // don't call this in IRQ context (long working time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ethernetif_input(handle, param);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Potentially task switch as a result of the above notify write.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; portEND_SWITCHING_ISR(xWake);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The simple, low priority Task. &lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14691841616069450 jive_text_macro" data-renderedposition="758_8_899_288" jivemacro_uid="_14691841616069450" modifiedtitle="true"&gt;&lt;P&gt;static portTASK_FUNCTION( lwIPInterruptTask, pvParameters )
{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* The parameters are not used. */
&amp;nbsp;&amp;nbsp;&amp;nbsp; ( void ) pvParameters;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Loop forever.
&amp;nbsp;&amp;nbsp;&amp;nbsp; //
&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)
&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; // Wait until the notify has been signalled.
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // xTaskToNotifyETH
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ulTaskNotifyTake( pdTRUE, portMAX_DELAY );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ethernetif_input(&amp;amp;g_handle, &amp;amp;fsl_netif0);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice weekend.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manfred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 10:47:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593886#M6026</guid>
      <dc:creator>manfredschnell</dc:creator>
      <dc:date>2016-07-22T10:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593887#M6027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manfred,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I deepened the lwip problem.&lt;/P&gt;&lt;P&gt;Now I have downloaded the KSDK 2.0 and I use the LWIP with freertos. &lt;/P&gt;&lt;P&gt;I have imported the lwip_tcpecho_freertos_frdmk64f but the lwip problem is still present!&lt;/P&gt;&lt;P&gt;Also I have changed the PBUF_POOL_BUFSIZE to 1518 and PBUF_POOL_SIZE to 50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By sending consecutive 512 bytes echo requests on TCP port 7 and simultaneously (to stimulate the problem) &lt;/P&gt;&lt;P&gt;requesting a dummy UDP echo to the FRDM-K64F IP address,&lt;/P&gt;&lt;P&gt;after little time the lwip_tcpecho_freertos_frdmk64f application goes to the assert function as indicated above. &lt;/P&gt;&lt;P&gt;It seems there are performance problems to handle memory allocation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Allowing that the FRDM-K64F can lose Ethernet packets with high IP traffic, &lt;/P&gt;&lt;P&gt;how can I avoid that the program stops on the assert and it runs without losing TCP echo functionality ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tanks a lot!&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Nicola&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 07:58:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593887#M6027</guid>
      <dc:creator>nicolabongiovan</dc:creator>
      <dc:date>2016-07-26T07:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593888#M6028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you see the call-stack of your system in debugger, when sys_assert() is called?&lt;/P&gt;&lt;P&gt;Perhaps there is a hint to the root cause...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can have a look at &lt;A href="https://community.nxp.com/thread/395104"&gt;FreeRTOS LwIP SDK v2.0.0 tpcipecho demo crash&lt;/A&gt; again.&lt;/P&gt;&lt;P&gt;I posted my reviewed ethernetif_input() function.&lt;/P&gt;&lt;P&gt;The updated LWIP statistics can give you a deeper view of the communication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manfred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 11:46:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593888#M6028</guid>
      <dc:creator>manfredschnell</dc:creator>
      <dc:date>2016-07-26T11:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593889#M6029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manfred,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the solution that you have suggested but the lwip problem is still present!&lt;/P&gt;&lt;P&gt;Infact the patch analyses the packet lenght (PBUF_POOL_BUFSIZE issue) but my issue is different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ethernetif driver is not robust at Ethernet packets storm from the network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a lot of packets came from Ethernet, the ethernetif_input function allocate a lot of pbuf buffer &lt;/P&gt;&lt;P&gt;that come back free only when the upper Ethernet stack handles them.&lt;/P&gt;&lt;P&gt;It' is correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;So, how can I avoid memory assert when packets storm appears?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your support!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS&lt;/P&gt;&lt;P&gt;From the Debugger I see that the assert function is called from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; - tcpip_thread(void *arg) in tcpip.c when "tcpip_thread: invalid message:" happens. The msg-&amp;gt;type is a random number.&lt;/P&gt;&lt;P&gt;&amp;nbsp; - pbuf_alloc function in pbuf.c&lt;/P&gt;&lt;P&gt;There seems to be a memory fragmentation problem due to the use of malloc and memory availability issue during a ethernet packets storm.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 15:21:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593889#M6029</guid>
      <dc:creator>nicolabongiovan</dc:creator>
      <dc:date>2016-07-26T15:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593890#M6030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested my target with a flood of ethernet packets. ( port 7, size 1k, every 10ms).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the message:&lt;/P&gt;&lt;P&gt;p != NULL&lt;/P&gt;&lt;P&gt;Fail to allocate new memory space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;out of ethernetif_input().&lt;/P&gt;&lt;P&gt;And then my target is no longer available...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That seems to be an other effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; I have to look deeper on it. But that will be after my days off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll be back, when I have news.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manfred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 11:22:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593890#M6030</guid>
      <dc:creator>manfredschnell</dc:creator>
      <dc:date>2016-07-28T11:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593891#M6031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manfred,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot for your test!&lt;/P&gt;&lt;P&gt;Also to me results the error that you have indicated more the assert messages (of the first message)! &lt;/P&gt;&lt;P&gt;The problems are on memory allocation and memory alligment!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested also the RTCS TCP/IP stack for MQX RTOS available only for KSDK up to the version 1.3.0.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With this RTCS TCPIP stack seems that there are not problems.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The application (rtcs example httpsrv + my tcpecho implementation) doesn't crash!&lt;/P&gt;&lt;P&gt;Now I will try to use this with my application and I'll let you know the results of my depth tests! &lt;/P&gt;&lt;P&gt;Still await the output of your analysis to know if there is anyway a solution to LWIP bugs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Nicola&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 12:04:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593891#M6031</guid>
      <dc:creator>nicolabongiovan</dc:creator>
      <dc:date>2016-07-28T12:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593892#M6032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nicola and Manfred, I have the same problem in KSDK 2.0 and KDS 3.0 in one multithread server tcp program.&lt;/P&gt;&lt;P&gt;I try all tips in this post and others but the program continue bug in a few minutes so i try this:&lt;/P&gt;&lt;P&gt;-change de FreeRTOS 8.2.3 that comes to default in KSDK 2.0 and lastest to FreeRTOS 9.0 (downloadable in oficial page).&lt;/P&gt;&lt;P&gt;-The real fix is when you change :&lt;/P&gt;&lt;P&gt;#ifndef PBUF_DEBUG&lt;/P&gt;&lt;P&gt;#define PBUF_DEBUG&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LWIP_DBG_OFF&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;P&gt;#ifndef PBUF_DEBUG&lt;/P&gt;&lt;P&gt;#define PBUF_DEBUG&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LWIP_DBG_ON&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;In my case this makes the program run correctly with 5 client connected simultaneously sending every 0.6 sec for more than an hour. I dont sure what is the real problem but this works. :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 19:53:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593892#M6032</guid>
      <dc:creator>andresmartinez</dc:creator>
      <dc:date>2016-07-28T19:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593893#M6033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;I noticed that the linker script is really only using the lower SRAM block which is 0x10000.&amp;nbsp; The upper SRAM block has 0x30000 mostly free.&amp;nbsp; So for this example the heap is mostly used (&amp;gt;90%).&lt;/P&gt;&lt;P&gt;So I have moved the ucHeap to the second block and now it is &amp;lt;12% used.&lt;/P&gt;&lt;P&gt;The ZIP attached has text file with edit locations and also the source files if you want to try having more available heap.&lt;/P&gt;&lt;P&gt;Let us know if this helps or not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 21:13:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593893#M6033</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-07-28T21:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593894#M6034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my application uses the big heap. So I think, there is no heap problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manfred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 12:24:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593894#M6034</guid>
      <dc:creator>manfredschnell</dc:creator>
      <dc:date>2016-08-23T12:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K64F KSDK 1.3.0 tcp_echo demo bugs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593895#M6035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the processing of incomming packets is in tcpip_thread(). And there also happens the freeing of buffers.&lt;/P&gt;&lt;P&gt;In my application the lwIPInterruptTask() and the tcpip_thread() had the same priority. (in my case: 1)&lt;/P&gt;&lt;P&gt;So lwIPInterruptTask() gets fed with packets from the ethernet_callback(). In a message storm condition the&amp;nbsp; tcpip_thread() isn't active anymore because of equal priority.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did following changes:&lt;/P&gt;&lt;P&gt;in file "lwipopts.h"&lt;/P&gt;&lt;P&gt;#define TCPIP_THREAD_PRIO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in file "lwiplib_MS.c"&lt;/P&gt;&lt;P&gt;#define eth0LWIP_PRIORITY&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; (TCPIP_THREAD_PRIO-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this change I give tcpip_thread() a higher priority than lwIPInterruptTask(). So the processing of incomming packets works regardless of the incomming packets. --&amp;gt; the packet flood (with: port 7, size 1k, every 10ms) is no problem anymore.&lt;/P&gt;&lt;P&gt;The stack stays responsive.&lt;/P&gt;&lt;P&gt;Please let me know, if you can confirm this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manfred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 13:56:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K64F-KSDK-1-3-0-tcp-echo-demo-bugs/m-p/593895#M6035</guid>
      <dc:creator>manfredschnell</dc:creator>
      <dc:date>2016-08-23T13:56:39Z</dc:date>
    </item>
  </channel>
</rss>

