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