The ID foot storm in OTG's explanation

Source: Internet
Author: User

1. OverviewOTG devices use the plug in the ID pin to differentiate A/b DeviceID Groundbe called as A-device, acting as a USB Host, A-device always provides power to the bus, ID dangling is known as b-device, which acts as a USB Device, the device's USB HOST/USB device role can be HNP (Host Exchange protocol)Switch. The OTG device cannot cross the USB hub when connected and loses the HNP function if it crosses the USB hub. A-device/b-device and USB Host/device does not have the necessary relationship, after the host switch is complete a-device into a USB slave device, but still for the bus power.

2.USB-OTG Slot Type

As Host only: Provides standard a socket, normal USB Host with TPL (list of supported devices)

As Device only: can only be used as a peripheral b-device (divided into plug-in and plug-in cable separation)

OTG Dual: With micro AB sockets, you can switch host/device at run time. OTG Dual opens Vbus when the plug is plugged in, turns off Vbus if no device is connected, and turns on ADP detection, while EAS Host only does not shut down again Vbus

3. Protocol SRP (Session request Protocol) Dialog request protocol:The SRP protocol allows the adevice to save power consumption by cutting vbus when the bus is being used, and any class of adevice should be able to respond to SRP requests, and any bdevice should also be able to initiate SRP requests, ADP (Attach Detection Protocol):Provides detection of the insertion of a peer device and supports any OTG device HNP (host negotiation Protocol) hosts Exchange protocol:The OTG device switches the Host/device role through HNP, and A device determines whether the HNP protocol is supported by querying the OTG performance descriptor of device B to determine if B device is a dual-use OTG device, and if B device supports the HNP protocol, b Device will return a valid OTG performance descriptor, and a device generates a setfeature command informing B device that you can work as a host when the bus hangs, and a device suspends the bus after sending the setfeature command. The host returns to a device after the session ends. 4. Device FrameworkOTG descriptor at device enumeration, A-device requests the OTG descriptor through Getdeor to the B device. The OTG descriptor should also be returned as part of GetConfiguration (). The bmattributes indicates whether B-device supports ADP/HNP/SRP standard device features, which are set through the Setfeature (). b_hnp_enable: Set this attribute to show that B-device is allowed to hnp,a the device must suspend the bus within T (HOST_REQ_SUSP) time, which is cleared at the end of the session. A_hnp_support:Earlier versions of OTG compatibility feature, set this feature to indicate the B-device-to-end a-device support HNP. A_alt_hnp_support: The flag has been discarded 5. Connection mode (Host, Device)As host only with the B-device (with a plug type) only as the peripheral detected a plug insertion, stop ADP, open Vbus, because b-device a plug and equipment as a whole, at this time B-device must be connected with a plug, Host detects the peripheral connection and begins the enumeration.
As host only with B-device only as peripheral (a plug for cable connection) The Host segment detects a plug insertion, stops ADP, opens Vbus, and if the B-device is connected to a plug, the entire connection process is the same as When the b-device may not have plugged in, the device connection times out, Vbus again, waits for the next ADP change (the cable connection is complete), opens the Vbus again, and starts the normal bus enumeration. OTG Device and OTG Devicehost end detect plug insertion, then turn on Vbus, if no peripheral detected, turn off Vbus, turn on ADP probing,device to detect Plug insertion, open SRP, if cable is not plugged in, SRP timeout, The device end begins the ADP probing, when the cable is connected, the device side detects an ADP change, sends the SRP request host Open Vbus,host responds to the SRP and opens the Vbus to complete the equipment connection. 6. Case study:Have customer feedback their prototype OTG Mcrio AB socket does not recognize the USB flash drive, the last reason is the customer prototype of the USB ID pin is not grounded, the prototype does not switch to the USB host mode.

The ID foot storm in OTG's explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.