PORTS Forum
Ports and Interfaces => USB => Topic started by: jmag999 on April 21, 2015, 10:40:58 am
-
I would like to provide separate USB connectors (Type-A for host and Mini-B for device ). I am using an STM32 processor with OTG support (includes Attach Detect Protocol). I will use a USB-rated analog switch to ensure that neither is connected at the same time. My main concern is how to detect the presence of the USB device plugged into the host port. Presumably, I could use ADP, but unsure how this would work. Also trying to determine how I could wake up from sleep when a USB device is plugged into the host port. I realize that OTG is designed for this purpose, but I don't want our customers to need an adapter cable to plug in thumbdrives and other devices. Anyone have any experience with this?
-
You need to detect one of the data lines going high. This is usually a "connect" interrupt. You also have to leave Vbus on or the device won't know its connected to a host.
-
I had thought that Attach Detection Protocol could work without having the VBUS voltage present. I think the only problem with this is that it won't wake the processor. Does ADP work if not using OTG?
-
Non-OTG hosts can use ADP.