Archive for the ‘USB’ Category

In The Data Stage of a USB 2.0 Control Read Transfer

USB 2.0 device doesn’t return an expected handshake packet during a control transfer, the host retries. On receiving no response after a (typical) total of three tries, the host notifies the software that requested the transfer and stops communicating with the endpoint until the problem is resolved.

The two retries include only those sent in response to no handshake at all. A NAK triggers a retry but doesn’t increment the error count.Control transfers use data toggles (USB 2.0) or Sequence Numbers (Super- Speed) to protect against lost data. In the Data stage of a USB 2.0 Control read transfer, on receiving the data from the device, the host normally returns ACK and then sends an OUT token packet to begin the Status stage. If the device for any reason doesn’t see the ACK returned after the transfer’s final data packet, the device must interpret a received OUT token packet as evidence that the Status stage has begun.

Devices must accept all error-free Setup packets. If a new Setup packet arrives before a previous control transfer completes, the device must abandon the previous transfer and start the new one.

A USB 2.0 device has these responsibilities for transfers on a control endpoint:

  • Send ACK in response to every Setup packet received without error.
  • For supported control write requests, send ACK in response to received data in the Data stage (if present) and return a ZLP in the Status stage.
  • For supported control read requests, send data in response to IN token packets in the Data stage and ACK the received ZLP in the Status stage.
  • For unsupported requests, return STALL in the Data or Status stage.

Tags: , , , ,

No Comments


The Flow Control Condition on Responding

To conserve bandwidth and to enable inactive links to transition to low-power states, USB 3.0 hosts stop requesting to send or receive data from SuperSpeed endpoints that are in the flow control condition. This condition indicates that the endpoint temporarily can’t send or receive data. To request to resume communications, the endpoint sends an ERDY Transaction Packet. A device can send the ERDY at any time without waiting for the host to request a packet.

On receiving the ERDY, the host resumes communications with the endpoint. An IN endpoint is in the flow control condition after responding to an ACK Transaction Packet with either of the following A NRDY Transaction Packet. A Data Packet with the End of Burst (EOB) field set to 1, indicating that the packet is the last in a burst. The device sets EOB if the data payload is equal to the endpoint’s maximum packet size and the endpoint is returning fewer than the number of packets requested in the previous ACK Transaction Packet.

An OUT endpoint is in the flow control condition on responding to a Data Packet with either of the following A NRDY Transaction Packet. An ACK Transaction Packet with the NumP field set to zero, indicating that the endpoint can’t accept any Data Packets. Hosts retain the option to attempt communications with bulk endpoints in the flow-control condition before receiving ERDY.

Tags: , , , , , , ,

No Comments


USB Classes Included With Windows XP

Not every device requires its own INF file. Many devices that use the system’s class drivers can use the INF file that Windows provides for the class. These are some INF files for USB classes included with Windows XP.Because Windows XP and later prefer signed drivers, if you provide an unsigned driver for a device in a supported class, Windows XP and later won’t
use your driver and instead will select a compatible ID from the class’s INF file.

An INF file is considered part of the driver package, so Windows XP and later prefer a system-provided INF file for a system driver over an unsigned, vendor provided INF file for the same driver even if the vendor’s INF file contains a matching hardware ID. When the best match is an unsigned driver, operating-system settings can affect whether Windows blocks installation, installs the driver with a warning, or installs with no warning. To change the setting, in Windows Control Panel, select System > Hardware > Driver Signing.

A device that uses a class driver can have a custom, signed INF file with vendor specific strings that display in the Device Manager. For example, the entry for a HID can be a vendor-specific string instead of the default USB Human Interface Device. Many INF files provided with Windows contain sections with manufacturer specific information. When a device passes WHQL tests, Microsoft can add the device’s sections to an existing INF file or add a manufacturer-specific INF file to the files distributed with Windows.

Tags: , , , , , , ,

No Comments



SetPageWidth