TS-4900 USB Host: Difference between revisions

From embeddedTS Manuals
No edit summary
No edit summary
Line 3: Line 3:
Many of our off the shelf baseboards provide a GPIO to toggle power to USB devices.  This can be used to save power, or to reset USB devices that get stuck in a bad state.
Many of our off the shelf baseboards provide a GPIO to toggle power to USB devices.  This can be used to save power, or to reset USB devices that get stuck in a bad state.
<source lang=bash>
<source lang=bash>
echo 54 > /sys/class/gpio/export
# Power disabled
# Power disabled
echo low > /sys/class/gpio/gpio54/direction
echo 1 > /sys/class/leds/en-usb-5v/brightness
sleep 2 # let any devices reset
sleep 2 # let any devices reset
# Enable power
# Enable power
echo high > /sys/class/gpio/gpio54/direction
echo 0 > /sys/class/leds/en-usb-5v/brightness
</source>
</source>


{{Note|The USB OTG which can act as a host does not always use the same controllable 5V supply.  Refer to the schematic's EN_USB_5V/USB_5V for more information on this control.}}
{{Note|The USB OTG which can act as a host does not always use the same controllable 5V supply.  Refer to the schematic's EN_USB_5V/USB_5V for more information on this control.}}

Revision as of 17:54, 1 October 2014

The TS-4900 provides a standard USB 2.0 host supporting 480Mb/s. Typically this is interfaced with by using standard Linux drivers, but low level USB communication is possible using libusb.

Many of our off the shelf baseboards provide a GPIO to toggle power to USB devices. This can be used to save power, or to reset USB devices that get stuck in a bad state.

# Power disabled
echo 1 > /sys/class/leds/en-usb-5v/brightness
sleep 2 # let any devices reset
# Enable power
echo 0 > /sys/class/leds/en-usb-5v/brightness
Note: The USB OTG which can act as a host does not always use the same controllable 5V supply. Refer to the schematic's EN_USB_5V/USB_5V for more information on this control.