FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [November 2009 Threads] performance ethernet data-rate Posted by Bernd Schuster on November 27, 2009 Hi,
I `ve one question about the performance from freeRTOS.
At the moment I`m running a little bit in trouble because the processor is not able to get all received ethernet pkts in time (without freeRTOS everything is working fine). The whole time is only one task running, because for simplicity I don`t use any kind of delays etc.
If only 5MB/s (round about 400 pkts/sec) will be received using the dma from the processor everything is working fine; but if I increase the data-rate to 20MB/s (round about 2200 pkts/s) - I get a lot of (buffer-not-available) errors, which means that the application is not able to give the buffers back to the dma in time...
Unfortunately, the whole application (task) is very short. I only take a look if new pkts are available and give the buffers back to the dma - that`s all. There`s no delay or anything else...
Only the vPortPreemptiveTick function etc. is running every 1milliseconds - maybe this function is too slowly... and all buffers will be used... this is the only explanation for me at the moment...
for(;;) {
j=0;
while( ( Emac_RxBufDesc[ j ].address & EMAC_RXBUF_SW_OWNED ) )
{
/* Ignoring this buffer. Mark it as free again. */
Emac_RxBufDesc[ j ].address &= ~( EMAC_RXBUF_SW_OWNED);
j++; if(j>= BUF_MAX) j=0;
}
Maybe someone can give me some hints to get higher data-rates working.
best regards Bernd
Emac_RxBufDesc[ j ].address &= ~( EMAC_RXBUF_SW_OWNED );
}
RE: performance ethernet data-rate Posted by MEdwards on November 27, 2009 I think it would help if you said which port you were using, if it is an official port or one you wrote yourself, which TCP/IP stack you are using and what you have your interrupt priorities set to.
RE: performance ethernet data-rate Posted by Richard on November 27, 2009 I presume this is interrupt driven? If so, what are the interrupt priorities? Is this a Luminary Micro part?
RE: performance ethernet data-rate Posted by Bernd Schuster on November 27, 2009 I`m using the AT91SAM9263 controller from Atmel running at 200 MHz (external memory interface 100MHz). I do not use any kind of TCP/IP stack at the moment. The whole task is that one below. I only search for new pkts (software owned) and give them back to the dma controller - no stack function or anything else.
I`ve interrupts installed to get noticed if a error happens... but I poll the EmacRxBufDesc[] the whole time... It sounds a little bit strange, but that`s it.
RE: performance ethernet data-rate Posted by Bernd Schuster on November 30, 2009 I made some further tests - the interupt is fast enough to handle all the received pkts but the function looking for these pkts is too slow... If the interrupt occured 39x the function will be executed 21x.... This task has also the highest priority. Any further ideas?
I use the bsp example from freeRTOS (SAM7X_Keil_RVDS_lwIP_1.3_MM) with the semaphore to signal the task that there are new pkts received. I only search for these pkts and erase them (give them back to the dma controller), so that the dma controller is able to store some new pkts.
best regards Bernd
RE: performance ethernet data-rate Posted by Bernd Schuster on November 30, 2009 maybe the function xSemaphoreGiveFromISR within the isr is not the best solution (as well as it is too slow...?) for telling a task that there`s a new pkt?
RE: performance ethernet data-rate Posted by Bernd Schuster on December 1, 2009 has anyone an idea? Using the polling-method, I didn`t get an buffer-not-available error (but that`s of course not what I want)...
It would be also possible to send someone this small project.
best regards Bernd
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|