lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwip performance goes down if running with FreeRTOS


From: vincent cui
Subject: Re: [lwip-users] lwip performance goes down if running with FreeRTOS
Date: Fri, 11 May 2012 06:46:43 +0000

 

HI :

 

You use MTU SIZE as RX buffer,  in ST code, it define RX buffer like uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE];

 

So, you only set ETH_RXBUFNB to 1 ?

 

 

From: lwip-users-bounces+address@hidden [mailto:lwip-users-bounces+address@hidden On Behalf Of Krzysztof Weso?owski
Sent: 2012
511 14:34
To: Mailing list for lwIP users
Subject: Re: [lwip-users] lwip performance goes down if running with FreeRTOS

 

I found root cause now , it is ST CORTEX M3 DMA problem when receive a large of file..

I trace the code, after lwIP performance is down, the Rx Buffer unavailable flag is always set. It means that DMA is in unknown status..

 

It should be enthernet driver problem ..anyone know how to fix  ? thank you

 

I was working with STM32 Eth driver in last month, using manufacturer code as a starting point. Most performance issues was easy to track with LwIP debug configured on warning level - information about all pool and heap running low are really useful.

 

Also in code:

  /* Set Own bit in Rx descriptors: gives the buffers back to DMA */
  for (i=0; i<DMA_RX_FRAME_infos->Seg_Count; i++)
  { 
    DMARxNextDesc->Status = ETH_DMARxDesc_OWN;
    DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr);
  }

Lines in for should be in different order - changing descriptor after you released it to dma might cause extra problems.

 

When in despeir i put ASSERTS in IRQ code to check all status bits and detet any problem.

 

My driver used MTU sized RX buffers so i did not have to take care of linked descriptors with single frame.

Regards,
Krzysztof Weso
łowski,
tel. +48 721 337 238

http://www.wrss.eaie.agh.edu.pl
http://www.integra.agh.edu.pl


reply via email to

[Prev in Thread] Current Thread [Next in Thread]