The ID foot storm in OTG's explanation

Source: Internet
Author: User

1. OverviewThe OTG device uses the ID pin in the plug to differentiate A/b device,id ground known as A-device, which acts as a USB host,a-device to always provide power to the bus, the ID dangling is called the B-device, and the USB device that acts as a USB The HOST/USB device role can be HNP( Host Exchange ProtocolSwitch OTG device cannot cross USB Hub when connected, the HNP function is lost if you cross the USB hub. A-device/b-device does not have the necessary relationship with USB Host/deviceafter the host switch is complete, a-device becomes the USB slave device, but the bus is still powered.

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, adevice by querying the Bdevice OTG performance descriptor to determine if the HNP protocol is supported to determine if Bdevice is a dual-use OTG device, and if Bdevice supports the HNP protocol, Bdevice will return a valid OTG performance descriptor, and then adevice generate a setfeature command to tell Bdevice: You can work as a host when the bus hangs, Adevice send this setfeature command and hang the bus. After this session, the host returned to Adevice hand. 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_supportEarlier 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 B-device only as peripheral (with a plug type)Host side detected a plug insertion, stop ADP, open Vbus, because B-device a Plug and device as a whole, at this time B-device must be connected with a plug, host detects the peripheral connection, start enumeration.
As Host only with B-device (a plug for cable connection) only as a peripheralThe host segment detects a plug insertion, stops ADP, opens the Vbus, and if the B-device is connected in a plug-in then the entire connection process is the same as above, because at this point the b-device may not have plugged in, the device connection times out, the Vbus is closed again, Wait for the next ADP change (the cable connection is complete), open Vbus again, and start the normal bus enumeration. OTG device and OTG deviceThe host side detects plug insertion, then turns on Vbus, if no peripheral detects, turns off Vbus, turns on ADP Probing,device detects plug insertion, opens SRP, if cable is not plugged, SRP expires, device end begins ADP Probing, when the cable connection is complete, 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 device connection. 6. Case study:Have customer feedback their prototype OTG Mrio 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.