-
Notifications
You must be signed in to change notification settings - Fork 780
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 some bugs #438
Open
gyojir
wants to merge
3
commits into
felis:master
Choose a base branch
from
gyojir:bugfix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix some bugs #438
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@felis since this is part of the code it would be good if you could verify this? |
tmk
added a commit
to tmk/USB_Host_Shield_2.0
that referenced
this pull request
Oct 31, 2020
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
added a commit
to tmk/USB_Host_Shield_2.0
that referenced
this pull request
Oct 31, 2020
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
This seems to solve the problem I mention in YuuichiAkagawa/USBH_MIDI#73 that prevented MIDI data and MIDI clock from working on the Arturia Beatstep! |
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1 . Do not reset Global Items rptSize and rptCount on Main Items
In Report Descriptor parsing, Global Item will remain after the Main Item.
2 . Do not flip toggle value on Toggle Error
In MAX3421E Programming Guide p13
In short, there is no need to flip on a toggle error.
With this fix my Logitech Gamepad F310 is now working.
3 . Fix reading of data with offset
Reading of multiple bytes of data probably got bugged, so I fixed it.