<?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: Problem with lwip and FreeRTOS on FRDM-K64F board in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481043#M29429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the assert() indicates, either your scheduler has not been started yet or your ticksToWait are zero.&lt;/P&gt;&lt;P&gt;If you check your variables/state at that point, you should hopefully know which one.&lt;/P&gt;&lt;P&gt;Given the call stack, it seems your scheduler has not been started yet. Could it be that you have the ENET interrupts enabled before you have started the scheduler? Make sure you enable the ENET interrupt e.g. from a task, and not before the schedeler (and the RTOS) is running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Dec 2015 11:41:04 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2015-12-14T11:41:04Z</dc:date>
    <item>
      <title>Problem with lwip and FreeRTOS on FRDM-K64F board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481042#M29428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have followed Erich Stygers tutorial: &lt;A href="http://mcuoneclipse.com/2015/10/28/tutorial-lwip-with-the-freertos-and-the-freescale-frdm-k64f-board/"&gt;lwip with FreeRTOS and the Freescale FRDM-K64F Board&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;This works OK, until I load the network interface down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added some code to run an iperf server on the board.&lt;/P&gt;&lt;P&gt;After just a few seconds running iperf towards the FRDM-K64F board the code stops on a configASSERT on line 1376 in FreeRTOS queue.c:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) &amp;amp;&amp;amp; ( xTicksToWait != 0 ) ) );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The stacktrace:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Thread #1 &amp;lt;main&amp;gt; (Suspended : Signal : SIGINT:Interrupt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xQueueGenericReceive() at queue.c:1,376 0x10042&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OSA_MutexLock() at fsl_os_abstraction_free_rtos.c:226 0xb9e4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys_mutex_lock() at sys_arch.c:323 0xa77a&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mem_malloc() at mem.c:521 0x43c4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pbuf_alloc() at pbuf.c:308 0x4afc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp_output_alloc_header() at tcp_out.c:98 0x830c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp_send_empty_ack() at tcp_out.c:854 0x8e46&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp_output() at tcp_out.c:931 0x8f28&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcp_input() at tcp_in.c:383 0x6dec&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_input() at ip.c:574 0x1cf8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ethernet_input() at etharp.c:1,363 0x1488&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ethernetif_input() at ethernetif.c:633 0xa582&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENET_DRV_ReceiveData() at fsl_enet_driver.c:1,516 0xed4e&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENET_DRV_RxIRQHandler() at fsl_enet_driver.c:1,927 0xefea&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENET_Receive_IRQHandler() at lwip_fsl_irq.c:70 0xa61e&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;signal handler called&amp;gt;() at 0xfffffffd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vPortStartFirstTask() at port.c:965 0xfa8e&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xPortStartScheduler() at port.c:812 0xf9ca&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20001b8c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Does anyone know what the problem can be?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I'm using:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;KSDK 1.3.0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;KDS 3.0.0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;ARM Toolchain 4.9.3 20150529 (release)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 10:35:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481042#M29428</guid>
      <dc:creator>gaute_nilsson</dc:creator>
      <dc:date>2015-12-14T10:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lwip and FreeRTOS on FRDM-K64F board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481043#M29429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the assert() indicates, either your scheduler has not been started yet or your ticksToWait are zero.&lt;/P&gt;&lt;P&gt;If you check your variables/state at that point, you should hopefully know which one.&lt;/P&gt;&lt;P&gt;Given the call stack, it seems your scheduler has not been started yet. Could it be that you have the ENET interrupts enabled before you have started the scheduler? Make sure you enable the ENET interrupt e.g. from a task, and not before the schedeler (and the RTOS) is running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:41:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481043#M29429</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-12-14T11:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lwip and FreeRTOS on FRDM-K64F board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481044#M29430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The scheduler has definitely been started. I'm able to ping the lwip stack before applying more heavy network traffic. As soon as I start to do some more network intensive work, the code stops executing on this assertion.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;xTicksToWait&lt;/SPAN&gt; is &lt;SPAN style="font-family: 'courier new', courier;"&gt;0xffffffff&lt;/SPAN&gt; when this happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the complete main() function (comments removed):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;int main(void)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PE_low_level_init();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MPU_BWR_CESR_VLD(MPU, 0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xTaskCreate(LwipInitTask, "LwipInitTask", configMINIMAL_STACK_SIZE * 4, (void*)NULL, tskIDLE_PRIORITY, (xTaskHandle*)NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;#ifdef PEX_RTOS_START&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PEX_RTOS_START();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;) {}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rest is copy-paste from the tutorial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This topic &lt;A href="http://www.freertos.org/FreeRTOS_Support_Forum_Archive/April_2015/freertos_vTaskSuspendAll_is_causing_assert_in_queue.c_78e52fdfj.html"&gt;http://www.freertos.org/FreeRTOS_Support_Forum_Archive/April_2015/freertos_vTaskSuspendAll_is_causing_assert_in_queue.c_78e52fdfj.html&lt;/A&gt; is discussing a similar issue.&lt;/P&gt;&lt;P&gt;The problem seems to be with calling non-ISR safe code from an interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my call stack, it seems the lwip port is trying to do a malloc in the ENET receive interrupt, is this OK?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the problem seems to dissapear (masked?) when i change optimization level from -O0 to -O2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 12:31:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481044#M29430</guid>
      <dc:creator>gaute_nilsson</dc:creator>
      <dc:date>2015-12-14T12:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lwip and FreeRTOS on FRDM-K64F board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481045#M29431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does &lt;SPAN style="font-family: 'courier new', courier;"&gt;xTaskGetSchedulerState() return at the assertion point? I believe the scheduler might be supspended.&lt;/SPAN&gt;&lt;BR /&gt;The problem could be as well that the mutex is aquired from inside ISR, but not using the *FromISR() API call?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Erich&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 12:48:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481045#M29431</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-12-14T12:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lwip and FreeRTOS on FRDM-K64F board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481046#M29432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you are correct. &lt;SPAN style="color: #51626f; font-family: 'courier new', courier;"&gt;xTaskGetSchedulerState() &lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;returns 0, that is: &lt;SPAN style="font-family: 'courier new', courier;"&gt;taskSCHEDULER_SUSPENDED.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, sans-serif;"&gt;The lwip function &lt;SPAN style="font-family: 'courier new', courier;"&gt;mem_malloc()&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt; does &lt;SPAN style="font-family: 'courier new', courier;"&gt;sys_mutex_lock()&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt; to prevent the heap from concurrent access. The lwip function &lt;SPAN style="font-family: 'courier new', courier;"&gt;sys_mutex_loc()&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt; &lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;t&lt;/SPAN&gt;hen calls &lt;SPAN style="font-family: 'courier new', courier;"&gt;xSemaphoreTake()&lt;/SPAN&gt; which is not IRQ safe. &lt;/SPAN&gt;&lt;/SPAN&gt;I believe this is the problem.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, sans-serif;"&gt;The lwip port has it's own heap handling code (custom written &lt;SPAN style="font-family: 'courier new', courier;"&gt;mem_malloc()&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, sans-serif;"&gt;I have tried disabling this code and using FreeRTOS code directly by adding:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;#define MEM_LIBC_MALLOC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;#define mem_malloc pvPortMalloc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;#define mem_free vPortFree&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;to the &lt;SPAN style="font-family: 'courier new', courier;"&gt;lwipopts.h&lt;/SPAN&gt; configuration file, but this did not help, got the same results as before.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Is it generally ok to do a malloc in an interrupt?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 13:04:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481046#M29432</guid>
      <dc:creator>gaute_nilsson</dc:creator>
      <dc:date>2015-12-14T13:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lwip and FreeRTOS on FRDM-K64F board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481047#M29433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Have you found a solution to this problem yet? If so what did you do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We found a problem with the FSL examples that exhibited a similar problem you are reporting. I think the problem is that the FSL examples are setup to process the Ethernet interrupt all the way through in the interrupt. It looks like the way to get around this is to change the following in \KSDK\platform\drivers\inc\fsl_enet_driver.h to be zero:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#ifndef ENET_RECEIVE_ALL_INTERRUPT&lt;/P&gt;&lt;P&gt;#define ENET_RECEIVE_ALL_INTERRUPT&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way it is configured to operate with the value of "1" is process the handling of the packet receive and passing the received frame up the protocol stack, in your case TCP/IP, in an interrupt context. The 'assert' is just trying to make sure you didn't reach the function in interrupt space... which will eventually mess up memory since LWIP knows that some of the memory functions are not reentrant. It will work some of the time because the likely the RTOS is in an idle state "most" of the time but occasionally it isn't...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting this to "0" will change the behavior where the Ethernet interrupt code will just set an event and return. The FreeRTOS scheduler will see the event and pass control over to a Ethernet receiver thread which processes all outstanding Ethernet receives in non-interrupt mode avoiding any reentrant conditions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 21:31:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481047#M29433</guid>
      <dc:creator>dleach</dc:creator>
      <dc:date>2016-03-30T21:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lwip and FreeRTOS on FRDM-K64F board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481048#M29434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have&amp;nbsp;a similar stacktrace on KSDK 2.2.0, but I can't seem to find anything related to&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;ENET_RECEIVE_ALL_INTERRUPT. The fsl_enet_driver.h file is no longer present, I assume it's been replaced by fsl_enet.h.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Is there another define that controls this behavior, or has it been removed at all from&amp;nbsp;newer KSDKs?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 15:22:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481048#M29434</guid>
      <dc:creator>adrian_nicolau</dc:creator>
      <dc:date>2017-08-02T15:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with lwip and FreeRTOS on FRDM-K64F board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481049#M29435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved by changing the ingress packets callback function from ethernet_input to tcpip_input:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;OLD: netif_add(&amp;amp;netif0, &amp;amp;netif0_ipaddr, &amp;amp;netif0_netmask, &amp;amp;netif0_gw, NULL, ethernetif_init, ethernet_input);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;NEW: netif_add(&amp;amp;netif0, &amp;amp;netif0_ipaddr, &amp;amp;netif0_netmask, &amp;amp;netif0_gw, NULL, ethernetif_init, &lt;STRONG&gt;tcpip_input&lt;/STRONG&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On incoming packets, this new callback sends a message (by sys_mbox_trypost) that is to be handled by the LwIP task in tcpip_thread (by TCPIP_MBOX_FETCH).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 15:04:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-lwip-and-FreeRTOS-on-FRDM-K64F-board/m-p/481049#M29435</guid>
      <dc:creator>adrian_nicolau</dc:creator>
      <dc:date>2017-08-03T15:04:26Z</dc:date>
    </item>
  </channel>
</rss>

