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

Fix TOGGLE error handling #5

Closed
wants to merge 1 commit into from
Closed

Fix TOGGLE error handling #5

wants to merge 1 commit into from

Conversation

tmk
Copy link
Owner

@tmk tmk commented Dec 27, 2020

On TOGGLE error you should do nothing on data toggle bit and received data should be ignored.

#2
tmk/tmk_keyboard#657
felis#438

If the IN data was error-free but there was a data toggle mismatch (the
DATA0 or DATA1 PID send by the peripheral did not match the endpoint
toggle value), the SIE sends the ACK handshake, but it does not
complement the data toggle or assert the RCVDAVIRQ. The SIE sets HRSL =
0110 (Toggle Error) for this condition. This situation would happen if
the peripheral received a corrupted ACK handshake from the previous IN
transfer. In this case the host ignores the data in the RCVDATA FIFO,
because it represents data that the peripheral mistakenly resent when it
missed the last ACK handshake. By ACK-ing the transfer and not updating
its own toggle bit, the SIE causes the peripheral to complement its
toggle bit, thus forcing the data toggle mechanism back into sync.

MAX3421 Programming Guide p.13

On the error data should be ignored and do nothing on
data toggle bit.

felis#438

----
If the IN data was error-free but there was a data toggle mismatch (the
DATA0 or DATA1 PID send by the peripheral did not match the endpoint
toggle value), the SIE sends the ACK handshake, but it does not
complement the data toggle or assert the RCVDAVIRQ. The SIE sets HRSL =
0110 (Toggle Error) for this condition. This situation would happen if
the peripheral received a corrupted ACK handshake from the previous IN
transfer. In this case the host ignores the data in the RCVDATA FIFO,
because it represents data that the peripheral mistakenly resent when it
missed the last ACK handshake. By ACK-ing the transfer and not updating
its own toggle bit, the SIE causes the peripheral to complement its
toggle bit, thus forcing the data toggle mechanism back into sync.
----
MAX3421 Programming Guide p.13
@tmk
Copy link
Owner Author

tmk commented Dec 27, 2020

This is a test for pull request and should not be merged.

@tmk tmk closed this Jun 27, 2021
@tmk tmk deleted the branch upstream June 27, 2021 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant