2020-08-05 04:00 AM
My Ethernet driver is not wrapping as I expect.
Section "61.10.1 Descriptor Overview" in RM0399 states that descriptors up to N-1 is owned by the DMA and the DMA continues to process descriptors until the Current Descriptor Pointer == Tail Pointer.
In order to exit suspend state, the tail pointer must be updated so that the Current Descriptor Pointer < Tail Pointer.
Using the example in Figure 841, the tail pointer points to entry 10 (which is not a valid entry since only 0 to 9 are valid). I can see that the DMA runs until the current descriptor points to 10, but it does not wrap back to zero. If the tail pointer must be larger than the current pointer, what should it be? Should it point to entry 11??
When will the DMA wrap, and start operating on buffer 0 again?
Solved! Go to Solution.
2022-04-04 03:41 AM
Hello @Pavel A. ,
Sorry for the delayed answer.
We confirm this issue was present in the legacy ETH HAL driver (alignment on 512 bytes).
But this problem was fixed in the new ETH HAL and now Rx Buffers are allocated from LwIP stack memory heap, then passed to ETH HAL driver (__ALIGNED(32)).
Kind Regards,
2022-04-04 09:07 AM
Dear Chekib, thank you for the update. Good to know.
2022-04-04 06:45 PM
> We confirm this issue was present in the legacy ETH HAL driver (alignment on 512 bytes).
Just to be sure... What was the exact reason for this issue? Just a short hint and/or Github link that shows the respective code with the issue would be nice.
2022-04-05 02:15 AM
Hi @Piranha ,
The problem is not located in a specific code section, it is a structural problem due to passing the descriptor to the DMA before it is freed by the application.
I hope it helps ?
Kind Regards,
2022-04-16 05:37 PM
I know that problem (flawed API by design because of absolute incompetence...), but I don't see how it relates to some specific buffer alignment.