Open Amomum opened 6 years ago
I don't use ethernet. Are anybody can to help in this issue?
@Amomum Can we close this issue?
I'm not sure. Auto and FIFO modes are still broken. Maybe put it in low-priority?
@Amomum I understood you
@Amomum Can you check the new commit https://github.com/eldarkg/emdr1986x-std-per-lib/commit/e5992182bbf28c9d1782f4aac6f74631b707c6f4 PS I reset your previous commits (use original library files). If you need to fix them add a new pull request. Thank you
The reason, as far as I can tell, is the following. Text in the specification says:
So first data word in the ethernet buffer should be data length (in bytes, as far as I can tell from working code example).
However,
ETH_SendFrame
does not put frame length as first word in ethernet buffer, it just copies the frame. So first byte of the frame is interpreted as it's length which is incorrect most of the time.It's more or less straight-forward to fix this for
ETH_BUFFER_MODE_LINEAR
andETH_BUFFER_MODE_AUTOMATIC_CHANGE_POINTERS
but I'm not sure how to do it forETH_BUFFER_MODE_FIFO
.