📄 usb 1_1 for usb otg implementation - patent 7193442.htm
字号:
to complement existing high-performance PCs. The transmission speed of USB 2.0
also facilitates the development of next-generation PCs and applications. In
addition to improving functionality and encouraging innovation, USB 2.0
increases the productivity of user applications and allows the user to run
multiple PC applications at once or several high-performance peripherals
simultaneously. </P>
<P>USB On-the-Go (OTG) is a new USB communication protocol specified in the USB
2.0 specification. USB OTG allows peer-to-peer communications between two USB
OTG devices enabling, for example, a digital camera to directly communicate with
a printer without the need of a PC as a host. Generally a USB 1.1 device cannot
directly communicate with a USB OTG device because of communication protocol
differences. As USB OTG is gaining popularity, the demand for USB 1.1 devices to
communicate with USB OTG devices has created additional technical challenges.
</P>
<P>The OTG supplement to the USB 2.0 specification uses the following defined
terms. </P>
<P>Host USB device attaches to a USB cable and acts in the role of initiating
all data transmission transactions and provides periodic start-of-frame timing.
</P>
<P>USB A-Device supplies power to the Vbus power line. It is host at the start
of a transaction session. It will relinquish the role of host to a dual-role
B-Device to which it is connected by a USB cable. This can occur only under the
rules determined by the host negotiation protocol (HNP). </P>
<P>USB B-Device is always a peripheral at the start of a transaction session.
B-devices may be single role (peripheral only) or dual-role (peripheral/host).
Typically a B-Device requests a session according to USB 2.0 OTG session request
protocol (SRP). If a B-Device is dual-role it may subsequently be granted the
role of host from the A-Device under USB 2.0 OTG host negotiation protocol
(HNP). </P>
<P>The OTG supplement defines a session request protocol (SRP), which allows a
B-device to request the A-device to turn on Vbus and start a session. 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. </P>
<P>Dual-role devices are required to be able to initiate and respond to SRP. Any
A-device, including a PC or laptop, is allowed to respond to SRP. Any B-device,
including a standard USB peripheral, is allowed to initiate SRP. </P>
<P>The OTG supplement defines two methods used by the B-device to request that
the A-device begin a session. They are called data-line pulsing and Vbus
pulsing. These two methods comprise the session request protocol (SRP). </P>
<P>The two signaling methods (Vbus pulsing and data-line pulsing) allow maximum
latitude in the design of A-devices. An A-device need respond to only one of the
two SRP signaling methods. The B-device shall use both methods when initiating
SRP to insure that the A-device responds. </P>
<P>The B-device may not attempt to start a new session until it has determined
that the A-device has signaled the end of the previous session. The A-device
signals the end of a session by allowing Vbus to drop below its session valid
threshold (SVT). Since the A-device SVT may be as low as 0.8 volts, the B-device
must insure that Vbus is below this level before requesting a new session. The
B-device may ensure that Vbus is below the B-device session-end threshold either
by direct measurement of Vbus or by timing the discharge. </P>
<P>Additionally, the B-device may switch in a pull-down resistor from Vbus to
ground in order to speed the discharge process as long as the pull-down resistor
does not cause the B-device to draw more than 8 mA from the Vbus. </P>
<P>A second initial condition for starting a new session is that the B-device
must detect that both the D+ and D− data lines have been below the session end
detect (SED) threshold for at least 2 mS. This ensures that the A-device has
detected a disconnect condition from the B-device. </P>
<P>When the B-Device detects that Vbus has gone below its session end detect
(SED) threshold and detects that both D+ and D− have been below SED for at least
2 mS, then any previous session on the A-device is over and a new session may
start. </P>
<P>To indicate a request for a new session using the data-line pulsing SRP, the
B-device waits until the initial conditions are met and then turns on its data
line pull-up resistor (either D+ or D−) for a period of 5 mS to 10 mS. The
dual-role B-device is only allowed to initiate SRP at full-speed and thus shall
only pull up D+. The duration of such a data line pulse must be sufficient to
allow the A-device to reject spurious voltage transients on the data lines. An
A-device that is designed to detect the data-line pulsing method of SRP will
detect that a data line (either D+ or D−) has gone high and generate an
indication that SRP has been detected. </P>
<P>To indicate a request for a new session using the Vbus pulsing method, the
B-device waits until the initial conditions are met and then drives Vbus. Vbus
is driven for a period that is long enough for a maximum capacitance on Vbus to
be charged to 2.1 volts. </P>
<P>There are two scenarios that a B-device could encounter when pulsing Vbus to
initiate SRP. In one scenario, the B-device is connected to an A-device that
responds to the Vbus pulsing SRP. In this case, the B-device can drive Vbus
above the A-device session valid threshold (SVT) in order to wake up the
A-device. When driving such an A-device, the B-device shall ensure that Vbus
goes above 2.1 volts but does not exceed 5.25 volts. </P>
<P>In the second scenario, the B-device is attached to a standard host. In this
case, the B-device shall not drive Vbus above 2.0 volts. This insures that no
damage is done to standard hosts that are not designed to withstand a voltage
externally applied to Vbus. In order to meet these requirements, the B-device
can utilize the fact that the capacitance on a standard host will have
well-defined minimum and maximum values. Based on the difference between these
two capacitances and a self-imposed current limit, the B-device has a maximum
length of time it is allowed to drive Vbus. By driving Vbus for this duration it
is possible to guarantee that Vbus will rise above 2.1 volts if attached to a
dual-role device, while ensuring that Vbus will not exceed 2.0 volts if attached
to a standard USB host. </P>
<P>The B-device Vbus pulsing circuitry must limit the maximum current drawn by
the B-Device to 8 mA. One way to ensure this restriction is met is to drive Vbus
with a voltage source greater than 3.0 volts and with an output impedance
greater than 280 ohms. </P>
<P>The A-device continuously monitors Vbus as long as power is available on the
A-device. An A-device that is designed to detect the Vbus pulsing method will
detect that Vbus has gone above the A-device session valid threshold (SVT) and
generate an indication that SRP has been detected. </P>
<P>When a B-device detects that the voltage on Vbus is greater than the B-Device
session valid threshold (SVT), then the B-device shall consider a session to be
in progress. After the Vbus voltage crosses this threshold, the B-device shall
assert either the D+ or D− data-line within 100 mS. </P>
<P>The maximum time allowed for the B-device to complete all of its SRP
initiation activities is 100 mS. The B-device shall first perform data-line
pulsing, followed by Vbus pulsing. </P>
<P>Host negotiation protocol (HNP) is used to transfer control of a connection
from the default host (A-device) to the default Peripheral (B-device). This is
accomplished by the A-device preparing or conditioning the B-device to take
control of the bus and then the A-device presenting an opportunity for the
B-device to take control. </P>
<P>The B-device is conditioned when the A-device sends a set feature enable
(SFE) command. After sending this command, the A-device may suspend the bus to
signal the B-device that it may now take control of the bus. If the B-device
wants to use the bus at that time, it signals a disconnect to the A-device. If
the A-device has enabled the B-device to become host, then the A-device will
interpret this disconnect during suspend as a request from the B-device to
become host. The A-device will complete the handoff by turning on the pull-up
resistor on D+. </P>
<P>When the B-device has finished using the bus, it returns control to the
A-device simply by stopping all bus activity and turning on its D+ pull-up
resistor. The A-device will detect this lack of activity and turns off its
pull-up resistor. When the A-device detects the connection from the B-device, it
returns to operation as host. </P>
<P>The following is the normal host negotiation protocol sequence of events:
</P>
<P>1. A-device finishes using bus and stops all bus activity, (i.e. suspends the
bus). </P>
<P>2. B-device detects that bus is idle for more than 3 mS and begins (HNP) by
turning off pull-up on D+. This allows the bus to discharge to the SED state. If
the bus was operating in high speed mode, the B-device will first enter the
full-speed mode and turn on its D+ pull-up resistor before turning off its
pull-up to start the HNP sequence. </P>
<P>3. The A-device detects the SEO on the bus and recognizes this as a request
from the B-device to become host. The A-device responds by turning on its D+
pull-up resistor within 3 mS of first detecting the SEO on the bus. </P>
<P>4. After waiting long enough to insure that the D+ line cannot be high due to
the residual effect of the B-device pull-up, the B-device sees that the D+ line
is high and D− is low. This indicates that the A-device has recognized the HNP
request from the B-device. The B-device then becomes host and asserts bus reset
to start using the bus. The B-device must assert the bus reset (SEO) within 1.0
mS of the time that the A-device turns on its pull-up. </P>
<P>5. When the B-device completes using the bus, it stops all bus activity.
Optionally, the B-device may turn on its D+ pull-up at this time. </P>
<P>6. A-device detects lack of bus activity for more than 3 mS and turns off its
D+ pull-up. Alternatively, if the A-device has no further need to communicate
with the B-device, the A-device may turn off Vbus and end the session. </P>
<P>7. The B-device turns on its pull-up. </P>
<P>8. After waiting long enough to insure that the D+ line cannot be high due to
the residual effect of the A-device pull-up, the A-device sees that the D+ line
is high (and D−low) indicating that the B-device is signaling a connect and is
ready to respond as a peripheral. The A-device then becomes host and asserts bus
reset to start using the bus. </P>
<H1>SUMMARY OF THE INVENTION </H1>
<P>The present invention describes a low-cost interface function, which enables
USB 1.1 device and USB 1.1 host to communicate seamlessly with a USB 2.0 OTG
device. Prior techniques allow the OTG device to communicate only with another
OTG device and do not enable a standard USB 1.1 device to communicate with a USB
OTG device. A supplemental mixed signal interface circuitry and microcontroller
programming upgrades a USB 1.1 system to interface with a USB 2.0 OTG system by
mimicking USB 2.0 OTG functions. The mixed signal interface circuitry performs
crucial functions required to assure compliance with USB 2.0 OTG specifications.
</P><?BRFSUM description="Brief Summary" end="tail"?><?brief-description-of-drawings description="Brief Description of Drawings" end="lead"?>
<H1>BRIEF DESCRIPTION OF THE DRAWINGS </H1>
<P>These and other aspects of this invention are illustrated in the drawings, in
which: </P>
<P>FIG. 1 illustrates the block diagram of a conventional USB 1.1 system
comprising a microcontroller, USB 1.1 host and a USB 1.1 device connected to an
external USB 1.1 device through a USB cable (Prior Art); </P>
<P>FIG. 2 illustrates the block diagram of a modified USB 1.1 system comprising
a microcontroller, a USB 1.1 host and a USB 1.1 device and the mixed signal
interface circuit of this invention connected to an external USB 2.0 OTG single
role or dual-role device through USB cable; </P>
<P>FIG. 3 illustrates the signal and interface function blocks of this invention
for connection of a conventional USB 1.1 system A-Device to an external USB 2.0
OTG device/host B-Device; </P>
<P>FIG. 4 illustrates the signal and interface function blocks of this invention
for connection of a conventional USB 1.1 system B-Device to an external USB 2.0
OTG device/host A-Device; </P>
<P>FIG. 5 illustrates the circuit diagram of the USB 1.1 OTG Vbus pulsing detect
circuitry; </P>
<P>FIG. 6 illustrates the circuit diagram of the USB 1.1 OTG Vbus pulsing
circuitry; </P>
<P>FIG. 7 illustrates the circuit diagram of the USB 1.1 OTG dataline pulsing
circuitry; </P>
<P>FIG. 8 illustrates the circuit diagram of the USB 1.1 OTG Dataline (D+/D−)
pull-down circuitry; and </P>
<P>FIG. 9 illustrates the circuit diagram of the USB 1.1 OTG power management
circuitry. </P><?brief-description-of-drawings description="Brief Description of Drawings" end="tail"?><?DETDESC description="Detailed Description" end="lead"?>
<H1>DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS </H1>
<P>FIG. 2, illustrates a block diagram of this invention. This includes a
hardware interface function <B>208 </B>, which enables the modified USB 1.1
system <B>200 </B>including a microcontroller <B>205 </B>, an USB 1.1 device
<B>201 </B>and an USB 1.1 host <B>202 </B>and the mixed signal interface circuit
<B>208 </B>to communicate seamlessly with an USB 2.0 OTG device <B>209 </B>. The
full interface uses both software programming of the microcontroller device
<B>205 </B>and the hardware interface <B>208 </B>. The USB 2.0 OTG device <B>209
</B>, which may be either single role (slave) or dual-role (host/slave), is
connected to the USB 1.1 system <B>200 </B>through USB connectors <B>207 </B>and
<B>212 </B>and USB cable <B>210 </B>. Microcontroller <B>205 </B>performs
internal frame timing functions to synchronize the occurrence of pulsing, detect
and pull-up/pull-down control signals to implement SRP and HNP. USB 1.1 device
<B>201 </B>and host <B>202 </B>hardware need no modification to achieve the
interface, although microcontroller programming is required and additional
microcontroller input/output signals not used in the USB 1.1 system are required
to complete the USB 1.1 to USB 2.0 OTG interface <B>211 </B>. </P>
<P>Consider, first, the modified USB 1.1 system acting as an A device (default
host). FIG. 3 illustrates the modified USB 1.1 OTG microcontroller <B>300
</B>and interface hardware <B>301 </B>through <B>306 </B>and their required
interconnect to the USB 1.1 A-connector <B>321 </B>side of the interface. The
A-Device boundary is denoted by <B>326 </B>. USB cabling consists of D+ and D−
data lines, <B>316 </B>and <B>317 </B>respectively, Vbus (power supply) line
<B>318 </B>, GND <B>319 </B>and USB ID detect line <B>320 </B>. An USB 2.0 OTG
B-device <B>327 </B>including microcontroller <B>315 </B>and interface hardware
functions <B>308 </B>through <B>313 </B>is connected to the USB cable through a
B-connector <B>322 </B>. Device hardware <B>301 </B>through <B>306 </B>provides
an upgrade of the normal USB 1.1 capability to a modified USB 1.1 having USB 2.0
OTG compatibility. The B-device <B>327 </B>of FIG. 3 illustrates only in
symbolic form the hardware necessary to implement the USB 2.0 OTG requirements
and the SRP and HNP protocols described above. This hardware includes functional
blocks <B>308 </B>through <B>313 </B>and microcontroller <B>315 </B>. The
detailed content of these functions of the USB 2.0 OTG B-device is not a part of
the invention. Circuit blocks <B>301 </B>– <B>306 </B>perform actions initiated
by A-device <B>326 </B>. USB ID detect line <B>320 </B>is shorted to ground when
connected to an A-connector and open when connected to a B-connector. This
allows unambiguous determination of the A-device as default host and B-device as
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -