>
> 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
http://www.rainlabs.pl
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to