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: [email protected] 
[mailto:[email protected]] On Behalf Of 
Krzysztof Weso?owski
Sent: 2012年5月11日 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.wrss.eaie.agh.edu.pl/>
http://www.integra.agh.edu.pl<http://www.integra.agh.edu.pl/>
http://www.rainlabs.pl<http://www.rainlabs.pl/>
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to