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 host rp2040 with low speed device #862

Merged
merged 5 commits into from
Jun 1, 2021
Merged

Fix host rp2040 with low speed device #862

merged 5 commits into from
Jun 1, 2021

Conversation

hathach
Copy link
Owner

@hathach hathach commented May 30, 2021

Describe the PR
Fix host rp2040 when mounting low speed device (e.g keyboard) with max packet size = 8

  • Correct Data Toggle by number of packet: e.g 64 bytes = 8 x 8 bytes --> Data Toggle should not be flipped in the next buffer.
  • Improve RP2040-E4 (host buf sel) fix to prevent panic with already available.

Fix #709, also replace raspberrypi/tinyusb#7 as the fix

Copy link
Collaborator

@kilograham kilograham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure i you meant to leave all the extra logging stuff in there?

src/portable/raspberrypi/rp2040/rp2040_usb.c Show resolved Hide resolved
@kilograham
Copy link
Collaborator

note i'd like to pull this into the pico-0.10.0 branch anyway which we'll ship SDK1.2.0 with most likely

@hathach
Copy link
Owner Author

hathach commented Jun 1, 2021

note i'd like to pull this into the pico-0.10.0 branch anyway which we'll ship SDK1.2.0 with most likely

no problem, I could release this as 0.10.1 , there is also issue when using pico reading msc thumbdrive as well. I will try to look at when I got time.

Copy link
Collaborator

@liamfraser liamfraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me assuming @kilograham agrees the Low Speed DATA PID conversation is resolved.

@hathach
Copy link
Owner Author

hathach commented Jun 1, 2021

Looks good to me assuming @kilograham agrees the Low Speed DATA PID conversation is resolved.

The PID is toggled by hardware as captured in analyzer. without the fix, it will trigger the incorrect PID USB_INTS_ERROR_DATA_SEQ_BITS error. Thank for the review, I will merge this since I have another PR pending since yesterday.

@hathach hathach merged commit a6b5e20 into master Jun 1, 2021
@hathach hathach deleted the host-rp2040 branch June 1, 2021 16:59
Copy link
Collaborator

@kilograham kilograham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, ok; "the code may be wrong, but fixes the problem at hand" :-) I'm cool with it for now!

src/portable/raspberrypi/rp2040/rp2040_usb.c Show resolved Hide resolved
@hathach
Copy link
Owner Author

hathach commented Jun 2, 2021

ah, ok; "the code may be wrong, but fixes the problem at hand" :-) I'm cool with it for now!

The code is spot on afaik. Please provide example or hands on test case if you are still in doubt.

PS: you guys could check this with hw ip team. I could only test its behavior from the sw point of view

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.

RP2040 Host Stack fails with HID devices
3 participants