HCC Embedded » USB » USB On-The-Go

What is OTG?
The On-The-Go extension to the USB protocol was introduced so that a system can operate as either a USB host or as a USB peripheral (also called “device”) using a single connector. To facilitate this, the OTG extension added three main features:
  1. The Micro-AB connector, which allows either a host or a peripheral to be connected.
  2. The fifth pin – the ID pin – of the Micro-AB connector. It is possible to determine what has been connected by using the ID pin. If it is a USB host, then the micro-A connector’s ID pin will be grounded. If it is a USB device, then the micro-B connector’s ID pin will float.
  3. A software layer that allows two devices to negotiate which shall operate as the host and which shall provide the bus power. Normally this type of negotiation process requires human intervention.
Do I need OTG Software?
Embedded applications with both USB host capability and USB device capability usually require dual mode operation. This means that when a USB host device is inserted, the host stack should start, and correspondingly for insertion of a USB peripheral and the USB device stack. This is done simply by recognition of the ID pin on the USB OTG connector. It requires no further firmware, and is supported by HCC’s USB host and device stacks as standard. No additional USB OTG software is required.
If, however, two devices need to decide which will operate as the host and which will operate as the device, then the HCC EUSB-OTG software module is needed. EUSB-OTG has full support for SRP (Service Request Protocol) and HNP (Host Negotiation Protocol). It has been ported to several targets, including MCF52227 and LPC2468. HCC can provide ports of EUSB-OTG for other targets on request. Contact HCC at