-
Notifications
You must be signed in to change notification settings - Fork 39
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
How to disable USB dev power from M480 #46
Comments
Please first confirm whether your board's VBUS_EN pin is connected to the power switch IC. This pin is used by the Host Controller to control the power switch IC, toggling the power supply to VBUS. Typically, this pin's pin function is set for USB Host control, meaning it is automatically managed by the USB Host Controller hardware. If you want to forcibly turn off VBUS power, you can switch this pin's pin function to GPIO output mode and set it to output low, which will disable the power supply. |
Thanks.
In the case of a powered hub is used, should I also disable power on the hub by calling clear port feature on the concerned ports ?
My problem is that I need to re-enumate some devices, I found that calling the function usbh_reset_device() works but some devices no longer work after they are re-enumerated, sounds like they need a hardware reset.
I see they are correctly enumerated again after a software disconnect but they no longer exchange data from device to host (opposite direction from host to device works)
Any idea ?
Thanks again
|
A self-powered hub cannot cut off VBUS to disconnect the device through USBH. If your goal is to re-enumerate the device, you can use the function:
This is applicable to devices that have already been successfully enumerated. Using usbh_reset_device(UDEV_T *) will reset the device and trigger re-enumeration. |
Thanks |
What type of device is it? |
It is a USB midi device, bus powered. |
What kind of device? |
I developed my own USB-MIDI driver, starting from your USB audio driver and adapting to Bulk endpoints. |
The condition for completing a bulk in transfer is either receiving the expected amount of data or receiving a zero-length packet. Before this, no interrupt notification will occur. |
My issue was a memory alloc failing. |
Hi There
In my app using a M482, I need to power down all connected devices to the USB host port of the M480.
There could be a hub, or a single device directly connected to the USB Host port.
How can I disable power supply of the USB connector, as well as the hub if connected ?
I guess I can check if a hub is connected and call clear_port_feature :
for (i = 1; i <= hub->bNbrPorts; i++)
{
ret = clear_port_feature(hub, FS_PORT_POWER, i);
}
}
But what about if no hub present ?
How to control SYS_GPB_MFPH_PB15MFP_HSUSB_VBUS_EN ?
Tahnks
The text was updated successfully, but these errors were encountered: