Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


FreeRTOS TCP upgrade issues

Posted by sblancodiez on October 6, 2016

Hello there,

I have a project using FreeRTOS TCP 160112 and it works really well. Today I tried upgrading it to 160919 and to my surprise it mostly is not working.

I have been trying all morning to pinpoint exactly where is the issue for me but it is really difficult as, when I use breakpoints to find issues it tends to work. For example, I put for trace using SEGGER RTT message on input and output to get some kind of net trace and if I just let it run, a lot of packets are not even sent. If I put a breakpoint, voila, it stops and once I hit play they are sent.

Before going crazy, are there any documented issues or changes I should do to NetworkInterface.c or to the config that I missed? Using the new version would be great for DHCP callback.

Best regards,

FreeRTOS TCP upgrade issues

Posted by rtel on October 6, 2016

There is a history file in the download that you can refer to.

I would suggest starting with as basic a system as possible to get a simple system working first. For example, turn off DHCP and the name services and just a static IP address to check if pings to the static IP address are reliable, then work up from there.

FreeRTOS TCP upgrade issues

Posted by sblancodiez on October 6, 2016


It seems creating a socket too soon after the network is up is causing problems. Pinging the target for example works perfectly. If I use DHCP, it takes some seconds to get the DHCP lease and then it works. If I use a static address and try to do anything just after the network is up it fails. Is there any reason for this to happen? The taks that first connects to a server (DNS first, then TCP socket) waits until the network is up.

Best regards,

FreeRTOS TCP upgrade issues

Posted by rtel on October 6, 2016

Do you have the IP task at the highest priority?

FreeRTOS TCP upgrade issues

Posted by sblancodiez on October 6, 2016

The maximum priority is for the deferred receive task, and the second maximum for the IP task.

Maybe the problem is opening the socket before the first ARP frames come in? I am not too TCP/IP savyy so maybe that is just stupid.

Before, I just waited until the TCP/IP stack reported the network is up to create the task that attempted to connect to the server. Now I wait an additional 5 seconds before creating that task and it works well.

If you need any more details please tell me.

Best regards,

FreeRTOS TCP upgrade issues

Posted by heinbali01 on October 6, 2016


What hardware / platform are you using?

Each release has been tested on several platforms but we didn't see a similar issue. These tests were done both with and without the use of DHCP.

Some defines have changed (for aesthetic reasons), but the compiler will warn in case you're still using earlier macro's, e.g. :

#error ipconfigTCP_RX_BUF_LEN is now called ipconfigTCP_RX_BUFFER_LENGTH

FreeRTOS TCP upgrade issues

Posted by sblancodiez on October 8, 2016

Custom board with Infineon XMC4500.

Yeah, I already checked those. Also, I tried removing the TCP window but just putting the macro to 0 gives me some errors as it seems there is some code trying to access a field that is removed without TCP window.

In my project for now it seems solved, but if there is something you want to try to pinpoint it I can do that.

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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists