forked from felis/USB_Host_Shield_2.0
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improve busprobe() #9
Labels
Comments
tmk
added a commit
that referenced
this issue
Jul 24, 2021
CONDETIRQ can't catch all changes on bus in time, we have to check bus status regularly also. #9
tmk
added a commit
that referenced
this issue
Jul 25, 2021
MAX3421E CONDETIRQ fails to detect device plugging sometimes, we have to check bus lines regularly during bus state is SE0 to know device insertion. #9
The problem and the fix were confirmed with this sketch. You will see it fails and stays in usb_state: In case a device is recognized and goes to usb_state RUNNING(90).
In case it fails
test sketchtest.ino:
|
tmk
added a commit
that referenced
this issue
Jul 25, 2021
MAX3421E CONDETIRQ fails to detect device plugging sometimes, we have to check bus lines regularly during bus state is SE0 to know device insertion. #9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The library can miss plugin event and fails to
enumeraterecognize and initialize a device occasionally.Seems like MAX3421e
CONDETIRQ
(Connect/Disconnect Interrupt) interrupt doesn't arise for all plugin events and we have to check bus state regularly.I tried to catch INT pin change using
ISR()
with minimum code but it still failed to detect device insertion event occasionally. I believe that we cannot rely solely on theCONDETIRQ
for plugin detection.Meanwhile, I never seen the chip failed in detection of unpluging.
Branch for this topic:
https://github.com/tmk/USB_Host_Shield_2.0/tree/upstream_fix_busprobe
This fix seems like promising.
The text was updated successfully, but these errors were encountered: