-
Notifications
You must be signed in to change notification settings - Fork 96
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
self-powered device #12
Comments
It has been used with self-powered devices. Is there something specific in your question? |
In the Microchip stack I see code to monitor an IO pin connected to USB VBUS (or some bits in the USB OTG status reg on some chips) and I didn't see this in the mstack code. I was under the impression that a self-powered device had to be able to detect when a host was attached and supplying power... something to do with enabling the pullups on the USB data line(s)? |
Did you determine what it does?
Have a look at the specification to be sure. The pullups indicate connection and speed to the host. |
From what I can tell this is used to enable/disable the D+ pullup until it senses that the host is providing power on VBUS. from usb2 spec section 7.1.5.1 Low-/Full-speed Device Speed Identification:
For a bus-powered device this isn't an issue since the pullup voltage is derived from VBUS, but for a self-powered device it's possible to init the USB peripheral and enable the pullup when there's no VBUS, violating the above. I've seen comments that this can cause enumeration issues on some systems. Do I have that right? |
I'm not sure about causing enumeration issues, but it's possible. I think you are correct. In this case, don't call usb_init() until you detect VBUS. There is not currently support to turn off USB in M-Stack. Patches are welcome for that. I don't have much time to look at it right this minute though, unfortunately. |
Does the stack have support for a self-powered device?
If not, what sort of changes would be required to support this?
The text was updated successfully, but these errors were encountered: