lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] ERR_MEM when sending large data, LWIP stats show no err


From: Adrian Figueroa
Subject: Re: [lwip-users] ERR_MEM when sending large data, LWIP stats show no error
Date: Thu, 14 Sep 2017 14:01:00 +0000

I think so. At least I receive all my data intact after a few retransmissions. 
Also, some block transfers complete without any retransmissions (32kByte size 
per block).

Also, the DMA error was fixed by disabling the CPU caches (I- and D-cache). 
Some registers are not set instantly, it seems. I read about flushing caches at 
some point.

However, I still get dropped packets. So, this error is unrelated to the DMA 
failing (or rather waiting).

I made a strange observation.

Scenario 1:
STM32 connected to Wifi router, Laptop connects via Wifi to router:
High transfer rate with few packet losses

Scenario 2:
STM32 connected directly to Laptop via Ethernet cable:
Packet losses after each 10-15 packets

I have no idea why I have no packet loss with TCP_WND and TCP_SND_BUF set to 
2xTCP_MSS. Instead, I get rare ZeroWindow errors from my PC.

Best regards,
Adrian

-----Ursprüngliche Nachricht-----
Von: lwip-users [mailto:address@hidden Im Auftrag von Nathan Hartman
Gesendet: Thursday, September 14, 2017 2:10 PM
An: Mailing list for lwIP users <address@hidden>
Betreff: Re: [lwip-users] ERR_MEM when sending large data, LWIP stats show no 
error

On Sep 14, 2017, at 5:09 AM, Adrian Figueroa <address@hidden> wrote:
> 
> I did some more testing and it does not seem to be systematic. As lwIP is not 
> showing errors in any of the stats, it is likely not its fault.
> 
> Do you have any suggestions on how to find the reason for dropped packets? 
> Maybe someone has experience with the HAL drivers of the STM32F7.
> 
> I can see some errors in low_level_output() in ethernetif.c.
> 
> This fails:
> 
>      if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
>      {
>        errval = ERR_USE;
>        goto error;
>      }
> 
> When DmaTxDesc->Status  equals 818937856. What does this mean? Is the DMA 
> used by something else?

I am not familiar with this part but one potential pitfall with many micro 
controllers is that not all of memory is accessible to the DMA. Is the entire 
message in an area of memory accessible to the DMA?
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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