Universal serial bus controlled connect and disconnect

A device for connection to a Universal Serial Bus (USB) signals connection and disconnection from the bus without physically removing or reinserting the USB cable. The devices system controller controls the signaling so that connection or disconnection may be signaled in a variety of situations to accomplish certain tasks. Connection signaling may be delayed until power-up reset procedures are complete to prevent the device from being polled by the host. A disconnect then a connect may be signaled to help recover from certain error conditions. The same data lines may also be used for interfaces other than the USB bus. A switched connection from a USB data line through a pull-up resistor to a positive supply voltage. The switched connection is controlled by a logic function so that it will not be connected when the power supply on the USB cable is not present. The switched connection is also controlled by a logic signal that may be supplied by the USB device's system controller.

FIELD OF THE INVENTION

This invention relates to communication between a host computer and peripherals and more particularly to connect and disconnect signaling of devices on the Universal Serial Bus (USB).

BACKGROUND OF THE INVENTION

The Universal Serial Bus (USB) is a peripheral bus specification developed by personal computer (PC) and telecommunication industry companies that brings the plug and play features of computer peripherals outside the PC box. This eliminates the need to install cards into dedicated computer slots and reconfigure the system. Personal computers equipped with USB allow computer peripherals to be automatically configured as soon as they are physically attached. This eliminates the need to reboot or run setup software. USB also allows multiple devices to run simultaneously on a computer, with dedicated hubs and peripherals such as monitors and keyboards also acting as additional plug-in sites.

The Universal Serial Bus is defined in the Universal Serial Bus Specification, revision 1.1, Sep. 23, 1998 which is hereby incorporated herein by reference. This document is available from the USB Implementers Forum web page at www.usb.org.

One aspect of the USB specification provides for the detection, by a host or hub device, of the connection and disconnection of downstream devices. This is done by the use of a 1.5K pull-up resister between a positive supply voltage and one of the data lines (D or D ). Since the host or hub device has its D and D lines terminated to ground through a 15K resistor, when no downstream device is connected these lines are read as both being a logical zero. When the downstream device is connected, the 1.5K pull-up resistor causes one of the data lines to be pulled to a logical one. This informs the host or hub device that a new device has been connected. The host then queries the device for more information and may reset and configure the device shortly thereafter.

The USB specification also describes two types of devices: bus-powered and self-powered. Bus-powered devices rely totally on the USB cable for power. In contrast, those that have an alternate source of power are called self-powered devices. A bus-powered device has its positive supply voltage connected as soon as it is plugged into the bus. In a self-powered device, the supply voltage may be off when the device is plugged into the USB bus. Then the power may be turned on. In both of these cases, the 1.5K pull-up resistor immediately starts pulling up one of the data lines as soon as power is applied. Therefore, these devices must have completed power-up reset procedures prior to the host polling the device for information. It is possible that these devices may not have completed their power-up reset procedures and that being polled by the host will cause errors or an unstable device state. Thus, a solution that can at least provide more time for power-up reset procedures is desirable.

SUMMARY OF THE INVENTION

A preferred embodiment of the invention allows a USB device signal connection and disconnection from the bus without physically removing or reinserting the USB cable. The devices system controller controls the signaling so that connection or disconnection may be signaled in a variety of situations to accomplish certain tasks. The invention eliminates the need for a USB device to be ready prior to the insertion of the USB cable. It also eliminates the need for a USB device to complete its power-up reset procedures prior to being polled by the host. The invention also provides a USB device with the ability to reinstate normal communications by signaling a disconnect and then a reconnect so that the host device will reinitialize communications and setup of the USB device. The invention also allows the same data lines to be re-used when operating the device with a different type of interface.

The invention provides a switched connection from a USB data line through a pull-up resistor to a positive supply voltage. The switched connection is controlled by a logic function so that it will not be connected when the power supply on the USB cable is not present. The switched connection is also controlled by a logic signal that may be supplied by the USB device's system controller.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiment has a USB device signal connection and disconnection from the bus under the control of the device's system controller without physically removing or reinserting the USB cable. The ability to give these signals means the USB device does not need to have the host recognize the device until the device is ready. When the host recognizes that a new device has been connected, it quickly requests information from the device. This information includes what type of device it is, how many endpoints it contains, etc. If the device does not respond on a certain amount of time, the host assumes that the device is not functioning properly and the host does not enumerate the device. If the device has not yet completed its power-up reset, or is waiting for media to become ready, it may not be ready to send the correct information to the host. Since the USB device can control the signaling of connection and disconnection, it is able to delay the signaling of connection until it is ready to respond.

The USB device, or the host, may also get into a state where the two devices can no longer communicate properly with each other. To reestablish proper communication, it may be necessary to disconnect and reconnect the device. This may cause the host device to re-initialize, reset, or otherwise change parameters or control information that reestablishes proper communication with the device. Since the USB device can control the signaling of connection and disconnection, it is able to signal this disconnect and connect to the host without actual physical disconnection. This allows the device to recover from certain error conditions without the need for user intervention.

Self-powered USB devices may be plugged into the USB bus before their own power supplies are plugged in or are turned on. Depending on the design of the USB device, it may be possible for the power supplied by the USB cable to bleed through the device pulling up a data line. If this happens, the host will attempt to poll the device. The partially powered USB device may not respond, or may supply faulty data to the host. Since the host will typically only attempt to communicate one time, this failed first attempt will keep the host from trying to communicate with the device even after its power is on. Preventing the signaling of a connection until the self-powered device is powered up and finished with initialization procedures prevents this from happening.

A USB device may be designed to operate in both USB mode and in some other alternate interface mode that uses the same data lines. This would allow one device design to be used in several situations. For example, a device may be configured to communicate using interfaces such as IDE (Intelligent Drive Electronics), SCSI (Small Computer Serial Interface), serial port, printer port, etc. If the two USB data lines (D and D ) are also used on the alternate interface, the 15K pull-up resistor would affect communications when the device was in the alternate interface mode. Preventing the signaling of a connection when the device is in the alternate interface mode would keep the 1.5K resistor from interfering with communications.

FIG. 1 is a schematic illustration of a circuit that provides controlled connect and disconnect signaling. The USB connector on a USB device is indicated by box 102 with the USB wires V BUS , GND, D , and D . All four of these wires are passed on to the device. V BUS is also connected to a terminal of resistor 110 and an input of two-input NAND gate 104 . The other terminal of resistor 110 is connected to the negative supply voltage, GND. In the preferred embodiment, resistor 110 is a 10K resistor that functions to hold the input of NAND gate 104 low when V BUS is not energized. V BUS won't be energized when the device is not connected to the USB, or when the device is powered-up before certain other devices on the USB.

The other input of NAND gate 104 is connected to signal ENCONN. ENCONN is driven low by the device to signal disconnection from the USB and driven high to signal a connection to the USB. Signal ENCONN is connected to a terminal of resistor 112 . The other terminal of resistor 112 is connected to the negative supply voltage, GND. In the preferred embodiment, resistor 112 is a 10K resistor that functions to hold ENCONN to a logical low when ENCONN is not being actively driven by the device.

The output of NAND gate 104 controls switching device 106 . One terminal of switching device 106 is connected through resistor 108 to the positive supply voltage. In the preferred embodiment, resistor 108 is approximately 1.5K and the positive supply voltage is approximately 3.3V. The other terminal of switching device 106 is shown connected to the USB signal D . This is the proper connection for a device that is going to signal that it is a full-speed signaling device. However, this terminal of switching device 106 could also be connected to the USB signal D if the device was to signal that it is a low-speed signaling device.

In an alternate embodiment, NAND gate 104 is omitted. In this case, ENCONN is be used to control switching device 106 directly.

In the preferred embodiment, switching device 106 is a PNP transistor with its base connected to the output of NAND gate 104 , its emitter connected to resistor 108 , and its collector connected to D . However, with appropriate changes to the circuit or the polarity of the control logic, switching device 106 could also be any one of a number of switching devices such as a NPN transistor, a MOSFET, a JFET, a relay, etc.

In the preferred embodiment, the ENCONN line comes from the device's system controller. When this line is high and V BUS is energized high, NAND gate 104 controls switching device 106 to conduct. This pulls-up the D (or D ) line toward the positive supply voltage signaling a connection to the USB bus. With this circuit, the USB device does not signal that it is connected until the system controller set ENCONN high and the USB cable has been connected and V BUS is energized. The system controller should not set ENCONN high until after reset procedures are complete and the device is ready to connect to the USB.

As stated above, a USB device may be designed to operate in both USB mode and in IDE mode and use the same data lines. To operate a device in IDE mode, the system controller should keep ENCONN asserted low. This will prevent resistor 108 from interfering with the operation of an IDE line.

From the foregoing it will be appreciated that controlled connect and disconnect from a USB bus offers numerous advantages. Controlled connect and disconnect allows a USB device to have more time to complete reset and power-up sequences. Controlled connect and disconnect also allows a USB device to signal a disconnect and then a connect to get a host device to reconfigure itself, or the USB device. This can allow the USB device to recover from some errors without the need for user intervention. Finally, controlled connect and disconnect also allows the USB device to disable a pull-up resistor so that a USB data line may be used for and IDE interface.

Although a specific embodiment of the invention has been described and illustrated, the invention is not to be limited to the specific forms or arrangements of parts so described and illustrated. The invention is limited only by the claims.