lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Randomly delayed frame (STM32070 package including LwIP v1.


From: stevestrong
Subject: [lwip-users] Randomly delayed frame (STM32070 package including LwIP v1.4.1)
Date: Fri, 28 Dec 2018 06:51:30 -0700 (MST)

Hi all,

I have implemented the standalone (NO_SYS =  1) webserver example from the 
STM32070 package
<https://www.st.com/en/embedded-software/stsw-stm32070.html>   on a
STM32F407VET6 chip.

I only have main loop accesses to raw LwIP stack functions, the ETH
interrupt is disabled.
Here are the source files:
https://github.com/stevstrong/ArchMax_Ethernet/tree/master/src

The main loop:
//-----------------------------------------------------------------------------
void ArchMax_Ethernet_Loop()
{
    /* check if any packet received */
    if (ETH_CheckFrameReceived())
    {
      /* process received ethernet packet */
      LwIP_Pkt_Handle();
    }
    /* handle periodic timers for LwIP */
        if ( LocalTime == millis() ) return;
        LocalTime = millis();
    LwIP_Periodic_Handle(LocalTime);
}
//----------------------------------------------------------------------------
The LwIP related functions are the standard ones in the mentioned package
from ST.
The periodic handle is called only once in a millisecond.

It works, in general, but sometimes the stack sends a very delayed TCP
frame. The delay varies between 280ms and 2.5 seconds.
I tried to increase (double) the Rx and Tx buffers, but without effect.
So I think there are no packets dropped, no re-transmitted packets, just
that the answer frame is delayed from some reason.

I uploaded a Wireshark capture file here:
https://drive.google.com/open?id=1i-UfnoiPLP6f_0x__Z9P6OCGVwNU8y9o
The PC (client) has the address with .24, the STM32 has .53.
The record contains 3 refreshed page accesses for the webserver (one refresh
downloads 4 items/files in total, one of them is not found), the first two
times everything is fine (no delayed frames), by the last refresh one of
file has a delayed last frame.

I would be very grateful if someone could advise me what can I do, what
should I look for, to solve this issue.

Thank you in advance.

P.S. I have to apologize for an eventuel duplicate, I edited this message
because the previous one did not appear in my previous nor pending posts, so
I thought something went wrong during composing.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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