[Top][All Lists]

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

Re: [lwip-users] Randomly delayed frame (STM32070 package including LwIP

From: Bastien Allibert
Subject: Re: [lwip-users] Randomly delayed frame (STM32070 package including LwIP v1.4.1)
Date: Mon, 31 Dec 2018 17:19:36 +0100

Hi there,

Not sure if it will be of any help, but i remember i could observe a similar issue because of the Ethernet DMA RX underrun. I unfortunately don't have access to the code right now, but i guess the driver uses a DMA descriptors chained list. If, at some point, it gets full, the DMA will stop and you will then potentially observe latency : typically if the ethernet driver uses interrupts. In such case :
  1. the driver is waken up every time a descriptor gets used (new RX packet).
  2. the driver checks the whole descriptor list (or at least until the next descriptor in the list is owned by DMA and NOT cpu).
  3. the driver finally clears ethernet interrupt.
If such scenario happens and a packet is received between (2) and (3), your DMA gets stalled and your CPU doesn't get RX interrupt anymore... until the CPU does a voluntary descriptor check and realize there are actual packets to be handled in the list.
This can explain both packet latency and, in worst cases, packet loss.

Hope it will help, and sorry for the imprecise description (this is already several years old).

Good luck

Le lun. 31 déc. 2018 à 16:21, goldsimon <address@hidden> a écrit :

stevestrong wrote:
>Hi again,
>The whole system seems very dependent on the debug outputs.
>I placed debug prints on different places and I always get different
>results, with partially strange behavior, including sending ACK for not
>received frames.
>So I think this is a dead end, because no developer would probably
>assist me
>to have this issue solved.

Sorry, but I think that would need some time I currently don't have...

>That is why I decided to upgrade to v2.1.2, downloaded form here:

Very good idea!

>And here comes the very first problem: the compiler throws the error:
>lwip/arch.h:48:10: fatal error: arch/cc.h: No such file or directory
> #include "arch/cc.h"
>Do I make something wrong or is this header really missing from the

It is of course missing. The zip contains the lwip library but not the adaption to your compiler, OS and network adapter.

However, you should be able to use those adaption from your old lwip version.

>I searched for any report regarding this error message in the mailing
>archives, but could not find any.
>Did anyone tested this version at all?

Oh please, just because you don't get it you assume there is a bug in lwip and no one has tested it??

>Where can I find a really working no-sys webserver example using

Use the example port for Windows or Linux in the contrib zip.


lwip-users mailing list

reply via email to

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