A self-powered USB peripheral provides its own power, so is it okay to connect just D+, D- and GND to the host port, or do you always have to connect +5V as well, then wait for the negotiation phase for the device to tell the host that it is self-powered and therefore doesn't want any power, thank you very much?
The specific peripheral I'm looking at is based on an FTDI FT4232H USB-to-serial adapter, but I'm really hoping for a generic answer to the question.
Answer
The generic answer to this question is yes, the VBUS (+5V from cable) must be connected to the device even if it is self-powered. The reason is as follows:
To start the connect process on host side, the device must pull up D+ (in case of FS/HS mode), or D- (in case of LS device).
However, USB specifications have a mandatory requirement that no USB device should source any current on any interface pin unless it is connected to a cable, see section 7.1.5.1, which reads,
The voltage source on the pull-up resistor must be derived from or controlled by the power supplied on the USB cable such that when VBUS is removed, the pull-up resistor does not supply current on the data line to which it is attached.
If a USB device doesn't have this control, one of data lines will be a source of current. Premature assertion of pull-ups were a source of problems for some legacy USB hosts. That's why this rule was instituted, and there is a special test for this in USB-IF certification program.
Therefore, the USB VBUS is an important "side-band" signal in USB connect protocol. As such, normal USB device ICs do have a separate input pin to sense the presence of USB host. Some IC manufacturers (e.g. FT232H, MCP2221, etc.) skip on this requirement, assuming that their chip will be solely used in bus-powered configuration, where the pull-up control requirement is automatically satisfied. However, when designing these chips into self-powered designs, some extra circuit efforts are needed to link the enabling of pull-ups with presence of VBUS on the USB port.
Regarding the USB connect "handshake" protocol, USB doesn't rely on current drawn from VBUS. The protocol is this: Host port must have VBUS active; VBUS is connected to device; device sees the VBUS and pulls-up 1.5k on one of D+/D- wires; host sees this connect, and after a 100ms delay asserts USB_RESET signaling (SE0 etc.).
No comments:
Post a Comment