Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETH_SendFrame works incorrectly #41

Open
Amomum opened this issue Feb 27, 2018 · 5 comments
Open

ETH_SendFrame works incorrectly #41

Amomum opened this issue Feb 27, 2018 · 5 comments

Comments

@Amomum
Copy link
Contributor

Amomum commented Feb 27, 2018

The reason, as far as I can tell, is the following. Text in the specification says:

Передатчик начинает работать, прочитав ненулевое поле длины из буфера передатчика.
...
Прочитав слово управления, передатчик перемещает указатель head_X на первое слово пакета данных.

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 and ETH_BUFFER_MODE_AUTOMATIC_CHANGE_POINTERS but I'm not sure how to do it for ETH_BUFFER_MODE_FIFO.

@eldarkg
Copy link
Owner

eldarkg commented Feb 27, 2018

I don't use ethernet. Are anybody can to help in this issue?

Amomum added a commit to Amomum/emdr1986x-std-per-lib that referenced this issue Mar 6, 2018
Amomum added a commit to Amomum/emdr1986x-std-per-lib that referenced this issue Mar 20, 2018
…hundred packets, FIFO is still broken completely.

Suffering from code style was unbearable so I completely refactored it. Linear mode was tested (with different delimiter values) with LwIP and ping -f --- no packet loss.
refs eldarkg#41
Amomum added a commit to Amomum/emdr1986x-std-per-lib that referenced this issue Mar 20, 2018
… a several hundred packets, FIFO is still broken completely.

Suffering from code style was unbearable so I completely refactored it. Linear mode was tested (with different delimiter values) with LwIP and ping -f --- no packet loss.
refs eldarkg#41
@eldarkg eldarkg added the bug label Mar 22, 2018
@eldarkg
Copy link
Owner

eldarkg commented Mar 22, 2018

@Amomum Can we close this issue?

@Amomum
Copy link
Contributor Author

Amomum commented Mar 22, 2018

I'm not sure. Auto and FIFO modes are still broken. Maybe put it in low-priority?

@eldarkg eldarkg removed the question label Mar 23, 2018
@eldarkg
Copy link
Owner

eldarkg commented Mar 23, 2018

@Amomum I understood you

@eldarkg
Copy link
Owner

eldarkg commented Mar 2, 2019

@Amomum Can you check the new commit e599218
PS I reset your previous commits (use original library files). If you need to fix them add a new pull request. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants