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




Loading

UDP/IP FreeRTOS_sendto sends Packets 5 times

Posted by The Dude on March 25, 2013
I use a LPC1769 MCU with the FreeRTOS UDP/IP stack. I think I have ported the drivers correctly. I use the Standard Implementations (not the Zero Copy types).
Everytime I use the FreeRTOS_sendto() function, the packets are sent 5 times.
When I do a ping from a Linux machine, I get one normal answer-packet and 4 additional (DUP!)-Packets.

I have used the same code on the raspberry pi with the standard Linux-Berkeley-Sockets implementation and it works perfectly.

I will do some digging tonight, to localize the problem. But maybe somebody has experienced the same or a similar problem?

Thanks in advance for an answer!

The Dude.

RE: UDP/IP FreeRTOS_sendto sends Packets 5 times

Posted by Richard on March 25, 2013
I would concentrate your initial investigation in the driver layer - for example, is there a DMA which is sending the same packet multiple times because there is an error in the descriptor configuration (maybe the last packet is not marked as such in the descriptor)?

I would suggest counting how many times the xNetworkInterfaceOutput() function gets called compared to how many packets you see on the wire. That will allow us to narrow down where to look.

Regards.

RE: UDP/IP FreeRTOS_sendto sends Packets 5 times

Posted by The Dude on March 25, 2013
Thank you very much Mr. Barry,

I will do that right now and I will post the result.

RE: UDP/IP FreeRTOS_sendto sends Packets 5 times

Posted by The Dude on March 25, 2013
Dear Mr. Barry,

the Number of xNetworkInterfaceOutput() function-calls matches the number of my FreeRTOS_sendto calls and the ratio of the number of packets on the wire and the sendto calls is 5:1, so I think you were right, Sir. The problem should be within the driver layer.

Thank you very much for your help!

RE: UDP/IP FreeRTOS_sendto sends Packets 5 times

Posted by The Dude on March 25, 2013
Problem solved!

The SendData() function had no break condition in the for-loop in a successful case. netifMAX_TX_ATTEMPTS was set to 5, so the packet was sent 5 times.

Thanks again Mr. Barry!
And sorry for interrupting your talk to the guy from i-sysem on the Embedded World. I was that dude, who asked all the questions about the UDP-IP Stack. I hope I didn't have messed it up for you.

Best Regards,
The Dude.


[ 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