We need to control the 5V USB voltage on/off during operation (we are switching a remote device in and out of “USB mode”). We have an external switch connected to DRV_BUS with the 5V fed back to V_BUS.
Here are the options we are considering – please let me know which is best and if any are invalid:
-
Programmatically via Linux, power-up in DEVICE mode set through USB_ID (does this require a pull-up?). Then, once powered, switch to HOST mode. Will DRV_BUS then automatically switch an external power switch from OFF to ON and apply 5V to the USB connector? We would then turn it off by switching back to DEVICE mode. The assumption here is that the USB_ID pin can be overridden by software.
-
Opposite of above: Programmatically via Linux, power-up in HOST mode. When we need to remove power from the external device, we would switch it to DEVICE mode
By the way, we do not know how to switch programmatically between DEVICE and HOST using the TI Linux build software. Any information you can provide in this area is appreciated.