14
FX3 Programmers Manual, Doc. # 001-64707 Rev. *C
Introduction to USB
2.1.3.1
Pipes, Endpoints
USB data transfer can occur between the host software and a logical entity on the device called an
endpoint through a logical channel called pipe. A USB device can have up to 32 active pipes, 16 for
data transfers to the host, and 16 from it. An interface is a collection of endpoints working together to
implement a specific function.
2.1.3.2
Descriptors
USB devices describe themselves to the host using a chain of information (bytes) known as
descriptors. Descriptors contain information such as the function the device implements, the
manufacturer of the device, number of endpoints, and class specific information. The first two bytes
of any descriptor specify the length and type of descriptor respectively.
All devices generally have the following descriptors.
■
Device descriptors
■
Configuration descriptors
■
Interface descriptors
■
Endpoint descriptors
■
String descriptors
A device descriptor specifies the Product ID (PID) and Vendor ID (VID) of the device as well as the
USB revision that the device complies with. Among other information listed are the number of
configurations and the maximum packet size for endpoint 0. The host system loads looks at the VID
and PID to load the appropriate device drivers. A USB device can have only one device descriptor
associated with it.
The configuration descriptor contains information such as the device's remote wake up feature,
number of interfaces that can exist for the configuration, and the maximum power a particular
configuration uses. Only one configuration of a device can be active at any time.
Each function of the device has an interface descriptor associated with it. An interface descriptor
specifies the number of endpoints associated with that interface and other alternate settings.
Functions that fall under a predefined category are indicated using the interface class code and sub
class code fields. This enables the host to load standard device drivers associated with that function.
More than one interface can be active at any time.
The endpoint descriptor specifies the type of transfer, direction, polling interval, and maximum
packet size for each endpoint. Endpoint 0 is an exception; it does not have any descriptor and is
always configured to be a control endpoint.
2.1.3.3
Transfer Types
USB defines four transfer types through its pipes. These match the requirements of different data
types that need to be delivered over the bus.
Bulk data is 'bursty,' traveling in packets of 8, 16, 32, or 64 bytes at full speed or 512 bytes at high
speed. Bulk data has guaranteed accuracy, due to an automatic retry mechanism for erroneous
data. The host schedules bulk packets when there is available bus time. Bulk transfers are typically
used for printer, scanner, modem data, and storage devices. Bulk data has built-in flow control
provided by handshake packets.
Interrupt data is similar to bulk data; it can have packet sizes of 1 through 64 bytes at full-speed or up
to 1024 bytes at high-speed. Interrupt endpoints have an associated polling interval that ensures
they are polled (receive an IN token) by the host on a regular basis.
Содержание EX-USB FX3
Страница 8: ...8 FX3 Programmers Manual Doc 001 64707 Rev C Contents...
Страница 12: ...12 FX3 Programmers Manual Doc 001 64707 Rev C Introduction...
Страница 48: ...48 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Overview...
Страница 74: ...74 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Firmware...
Страница 76: ...76 FX3 Programmers Manual Doc 001 64707 Rev C FX3 APIs...
Страница 84: ...84 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Application Examples...
Страница 98: ...98 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Application Structure...
Страница 148: ...148 FX3 Programmers Manual Doc 001 64707 Rev C FX3 P Port Register Access...
Страница 153: ...FX3 Programmers Manual Doc 001 64707 Rev C 153 FX3 Development Tools 2 Select General Existing projects into Workspace...
Страница 165: ...FX3 Programmers Manual Doc 001 64707 Rev C 165 FX3 Development Tools Click next...
Страница 178: ...178 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools Click on Apply...
Страница 180: ...180 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools d Start the GDB server...
Страница 185: ...FX3 Programmers Manual Doc 001 64707 Rev C 185 FX3 Development Tools...
Страница 186: ...186 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools...
Страница 187: ...FX3 Programmers Manual Doc 001 64707 Rev C 187 FX3 Development Tools...
Страница 188: ...188 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools...
Страница 192: ...192 FX3 Programmers Manual Doc 001 64707 Rev C GPIF II Designer...