AnsweredAssumed Answered

Problem with lwip and FreeRTOS on FRDM-K64F board

Question asked by Gaute Nilsson on Dec 14, 2015
Latest reply on Aug 3, 2017 by Adrian Dumitru Nicolau

Hello, I have followed Erich Stygers tutorial: lwip with FreeRTOS and the Freescale FRDM-K64F Board

This works OK, until I load the network interface down.


I added some code to run an iperf server on the board.

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:


#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )


    configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );




The stacktrace:

Thread #1 <main> (Suspended : Signal : SIGINT:Interrupt)

    xQueueGenericReceive() at queue.c:1,376 0x10042

    OSA_MutexLock() at fsl_os_abstraction_free_rtos.c:226 0xb9e4

    sys_mutex_lock() at sys_arch.c:323 0xa77a

    mem_malloc() at mem.c:521 0x43c4

    pbuf_alloc() at pbuf.c:308 0x4afc

    tcp_output_alloc_header() at tcp_out.c:98 0x830c

    tcp_send_empty_ack() at tcp_out.c:854 0x8e46

    tcp_output() at tcp_out.c:931 0x8f28

    tcp_input() at tcp_in.c:383 0x6dec

    ip_input() at ip.c:574 0x1cf8

    ethernet_input() at etharp.c:1,363 0x1488

    ethernetif_input() at ethernetif.c:633 0xa582

    ENET_DRV_ReceiveData() at fsl_enet_driver.c:1,516 0xed4e

    ENET_DRV_RxIRQHandler() at fsl_enet_driver.c:1,927 0xefea

    ENET_Receive_IRQHandler() at lwip_fsl_irq.c:70 0xa61e

    <signal handler called>() at 0xfffffffd

    vPortStartFirstTask() at port.c:965 0xfa8e

    xPortStartScheduler() at port.c:812 0xf9ca



Does anyone know what the problem can be?


I'm using:

  • KSDK 1.3.0
  • KDS 3.0.0
  • ARM Toolchain 4.9.3 20150529 (release)