Quality RTOS & Embedded Software

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


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 ]    [ 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