Chinaunix首页 | 论坛 | 博客
  • 博客访问: 928441
  • 博文数量: 1334
  • 博客积分: 645
  • 博客等级: 上士
  • 技术积分: 5762
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-25 16:56
文章分类

全部博文(1334)

文章存档

2014年(108)

2013年(1059)

2012年(169)

分类: LINUX

2013-12-09 19:26:16

http://m.blog.csdn.net/blog/guoshaobei/5556772

1.Definitions, Acronyms and Abbreviations


BSP

Board Support Package

HS

HS High Speed (480 Mbps)

LS

Low Speed (1.5 Mbps)

FS

Full Speed(12 Mbps)

OTG

On-The-Go

SRP

Session Request Protocol

HNP

Host Negotiation Protocol

ID

Identification

SE0

Single Ended Zero

SOF

Start of Frame

USB

Universal Series Bus

A-Device

A device with a Mini-A plug inserted into its receptacle. An A-device supplies power to Vbus; is host at the start of a session; and under certain conditions, the A-device will relinquish the role of host to a dual-role B-device

B-Device

A device with a Mini-B plug inserted into its receptacle. The B-device is a peripheral at the start of a session. If the device is dual-role, it may be granted the role of host from the A-device.

Dual-role device

A device that has the following feature and characteristics:

* limited Host capability

* full-speed operation as peripheral(high-speed optional)

* full-speed support as host(low-speed and high-speed optional)

* Targeted Peripheral List

* Session Request Protocol

* Host negotiation Protocol

* one, and only one, Mini-AB receptacle

* minimum 8mA output on Vbus

* means for communicating message to the user

UTMI

USB 2.0 Transceiver Macrocell Interface

UTMI+

UTMI extension supporting USB host and On-The-Go

ULPI

UTMI+ Low Pin Interface (ULPI)

Application

A generic term referring to any software that is running on a device that can control the behavior or actions of the USB port(s) on a device.

Host

A physical entity that is attached to a USB cable and is acting in the role of the USB host as defined in the USB Specification, Revision2.0. This entity initiates all data transactions and provides periodic Start of Frames(SOF’s)

Peripheral

A physical entity that is attached to a USB cable and is currently operating as a “device” as defined in the USB Specification, Revision2.0. The peripheral responds to low level bus requests from the Host.


 

2.OTG protocol overview

2.1. Why OTG

USB has become a popular interface for exchanging data between PCs and peripherals. An increasing number of portable peripherals are using the USB interface to communicate with the PC. Many of these portable devices would benefit from being able to communicate to each other over the USB interface, yet certain aspects of USB make this difficult to achieve.

Specifically, USB communication can only take place between a host and a peripheral. However, to qualify as a PC host, a device must have several characteristics, including:

l     storage for a large number of device drivers,

l     the ability to source a large current, and

l     a standard host connector receptacle.

It is not practical for many portable devices to have all of these characteristics, and in many cases, these characteristics are not needed to accomplish the application.

To enable these limited-requirements, portable USB applications, this supplement to the USB 2.0 specification was developed that allows a portable device to become a USB host, without the burden of supporting all the functions of a PC host.

The objective of this supplement is to define a minimal set of changes to the USB 2.0 specification, such that portable USB applications are enabled.

USB On-The-Go is not a stand-alone specification. It is a supplement to the USB 2.0 specification. Any aspects of USB that are not specifically changed by this supplement are governed by the USB 2.0 specification.

This specification is not just targeted at portable consumer electronic devices. This specification can also apply to PC peripherals or any non-portable devices.

USB On-The-Go defines the following additions to the USB specification:

l     Dual role device (Devices behaves as host or peripheral)

l     Host Negotiation Protocol (HNP) for swapping USB host and peripheral roles

l     Session Request Protocol

l     Micropower option in addition to low and high power

l     Miniconnector

 

2.2.Dual-Role Device

In addition to being a fully compliant USB 2.0 peripheral, a dual-role device must include the following features and characteristics:

l     a limited Host capability

l     full-speed operation (high-speed optional)

l     Targeted Peripheral List

l     Session Request Protocol (SRP)

l     Host Negotiation Protocol (HNP)

l     one, and only one, Mini-AB receptacle

l     minimum 8 mA output on VBUS

l     means for communicating messages to the user

2.2.1. The initial roles of master and slave

The initial roles defined by the connectors (More detail about connectors will be described in next sessions). USB On-The-Go defines a new mini receptacle called mini-AB receptacle and can accept both the mini-A and mini-B plugs. The mini-AB receptacle has ID pin pull-up to power. The mini-A plug has grounded ID pin and the mini-B plugs has a open ID pin. When two On-The-Go devices are connected together, the ID pin on the mini-A plug side will inject a "0" status to the ID pin. Whereas the ID pin on the mini-B plug side has a "1" on it. The On-The-Go with ID = 0 will become a default master (A-Device), and the On-The-Go with ID=1 will become a default slave (B Device). (这里的open指的是悬空;OTG适用于mini-AB,也应该适用于micro-AB,它们都有ID线)

At any point of time, there are two unequal devices connected : A-Device (master) and B-Device (slave)

a) Devices

l     Default master

l     mini-A plug inserted (ID pin shorted)

l     Supplies power on VBUS

l     Must source at least 8 mA (can be more)

 mini-A plug

Figure 1. Mini-A plug

 

b) B-Device

l     Default slave

l     mini-B plug inserted (ID pin floating)

 mini-B plug

Figure 2. Mini-B plug

 

The HNP is a mechanism in which an A-device and a B-device exchange the master & slave roles (virtual reversal of the cable). The sequence for swapping the master and slave roles is illustrated as following process:

l     Pull-up resistor used to signal slave role

l     device sets "HNP Enable" feature on B-device

l     device deasserts pull-up

l     device asserts its pull-up resistor , indicates that the A-device has submitted to be the slave

l     device still powers VBUS

l     device detects A-device's pull-up

l     resets/enumerates/uses A-device

2.2.2. Host Negotiation Protocol

The mechanism allows host function to be transferred between two dual role devices, eliminating the need of switch of cable

l     HNP is initiated in response to input from application s/w on the dual role B-Device

l     HNP many only be implemented through the Mini AB receptacle

l     Allows a B-device to request the A-device to turn on VBUS and start a session.

2.2.3. Session Request Protocol

This protocol allows the A-device, which may be battery powered, to conserve power by turning VBUS off when there is no bus activity while still providing a means for the B-device to initiate bus activity.

l     Any A-device, including a PC or laptop, is allowed to respond to SRP.

l     Any B-device, including a std USB peripheral, is allowed to initiate SRP.

l     A dual-role device is required to be able to initiate and respond to SRP.

阅读(496) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~