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: Sat, 16 Sep 2017 07:31:16 +0000

Thanks for your comments!

I decided to try ChibiOS HAL drivers or even the whole RT package. It seems like these are well written and can make use of the STM32 resources efficiently.

I will report if this is more successful.

Adrian


Von: address@hidden
Gesendet: 15.09.2017 20:35
An: Mailing list for lwIP users
Betreff: Re: [lwip-users] ERR_MEM when sending large data, LWIP stats show no error

Adrian Figueroa wrote:
> There is a list of chained DMA transmit descriptors, as they seem to be called. There is always four of them, this is hard coded.

My version of the STM32F4xx HAL driver leaves this as a define to the
application... But you're limited by DMA-capable RAM, of course.

> For sending, HAL_ETH_TransmitFrame(...) comes next. It checks, how many DMA TX buffers were used for the packet to be sent. This seems stupid, as low_level_output(...) knows how many of them it allocated. It could just pass this number on to HAL_ETH_TransmitFrame(...) but it does not.

Well,

> There is a check, if a DMA descriptor is already in use or not before writing to it. So, I assume that it does not happen that a descriptor is overwritten. However, a DMA descriptor is marked as "in use" only in the HAL_ETH_TransmitFrame(...) function. So, if low_level_output(...) makes use of more than four DMA descriptors, some WILL be overwritten.

If every DMA buffer has room for 1514 bytes and you have netif->mtu set
to 1500 (I hope), than low_level_output() will never fill more than one
DMA descriptor!

> I am not sure where to look next.

Me neither, sorry. I can confirm the HAL driver of my F4 fails as well,
but I haven't yet found the time or the motivation to debug it. Using it
with this driver is a toy project for me, so there hasn't been a strong
need for it...

Simon

_______________________________________________
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]