Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

LwIP hangs on FreeRTOS running on LM3s9B96

Posted by antoniobwb on October 8, 2013

Hello,

I have a LM3s9b96 running FreeRTOS and LwIP 1.3.2. The system is quite stable and works flawlessly on my internal network. However, when connected to a real network, the system was reported to stop responding after a few minutes (the webserver wouldn't respond and the browser would respond with the not found message). I have been trying to reproduce the problem here and after looking for some helpful tools, I managed to find and install a Network Emulator. When I set the error rate to 50% for both the upstream and the downstream, I manage to crash the system very easily after just a few minutes. I do this by simply trying to connect to the IP several times through the webbrowser (type the IP and press enter repetitively).

I believe that the LwIP stack should be capable of dealing with erratic packets and recover from those situations. However it gets stuck and stops responding under this conditions, even if I resume correct network operation on my network emulator (webserver doesn't respond).

I managed to enable the LwIP debug and I get the following messages when the system gets stuck:

tcplisteninput: ACK in LISTEN, sending reset

tcp_rst: seqno 14413 ackno 2663191756.

tcplisteninput: ACK in LISTEN, sending reset

tcp_rst: seqno 12029 ackno 1885481390.

tcplisteninput: ACK in LISTEN, sending reset

tcp_rst: seqno 14712 ackno 3923105658.

tcplisteninput: ACK in LISTEN, sending reset

tcp_rst: seqno 14712 ackno 3923105259.

tcplisteninput: ACK in LISTEN, sending reset

....

In other occasions I get these other messages. The "increment_magnitude <= p->len" message causes the sytem to crash and restart (somehow it results in a HW fault):

  1. Checksum (0x1000) failed, IP packet dropped.

  2. Checksum (0x40) failed, IP packet dropped.

Checksum (0x400) failed, IP packet dropped.

IP (len 16432) is longer than pbuf (len 52), IP packet dropped.

2013-10-05 13:09:06 Deadlock: semaphoreTake

  1. IP (len 4136) is longer than pbuf (len 50), IP packet dropped. Checksum (0x7fff) failed, IP packet dropped.

  2. IP (len 168) is longer than pbuf (len 50), IP packet dropped.

increment_magnitude <= p->len

@ C:localsvndspyNEWBWOStagsv1.4.4txstlsrcliblwipsrccorepbuf.c:437

I would appreciate any help in fixing this problem.

Regards,

Antonio


LwIP hangs on FreeRTOS running on LM3s9B96

Posted by richardbarry on October 8, 2013

Your question is very lwIP specific, so I recommend posting it to the lwIP mailing list which is active and helpful. I suspect the first reply will suggest you update to a later version of lwIP though.

Which Network Emulator are you using?

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner