Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
USB System Architecture (USB 2.0).pdf
Скачиваний:
172
Добавлен:
03.05.2015
Размер:
7.03 Mб
Скачать

Chapter 19: USB Device Configuration

Table 19-12: Endpoint Descriptor Definition

Offset

Field

Size

Value

Description

 

 

 

 

 

 

 

 

 

 

6

bInterval

1

Number

Interval for polling endpoint for data

 

 

 

 

transfers. Expressed in 1 millisecond or

 

 

 

 

125 second units. (Used for 1.x devices

 

 

 

 

and 2.0 devices except as defined below.)

 

 

 

 

FS/HS isochronous endpoints define poll-

 

 

 

 

ing intervals via the formula:

 

 

 

 

2bInterval-1 where bInterval is a value of 1-

 

 

 

 

16, yielding a polling interval of 1 to

 

 

 

 

32,768ms.

 

 

 

 

LS interrupt endpoints:

 

 

 

 

the polling interval is any integer value

 

 

 

 

from 1 to 255ms.

 

 

 

 

HS interrupt endpoints use the formula:

 

 

 

 

2bInterval-1 where bInterval = 1 to 16

 

 

 

 

HS bulk and control OUT endpoints

 

 

 

 

define bInterval as the maximum NAK

 

 

 

 

rate of the endpoint. bInterval specifies

 

 

 

 

the number of frames/NAK (0-255). A

 

 

 

 

value of 0 means the EP never issues a

 

 

 

 

NAK handshake.

 

 

 

 

 

Device States

Table 19-13 on page 373 shows the device states that a device goes through during the configuration process. The device states listed in the first row show the typical sequence in state changes from left to right. Note, however, that a device can proceed to the suspend state from any other state.

Attached State

Column one in Table 19-13 indicates that the device is not attached to the USB. In this case the state of the device is unknown. The device may be powered if it has its own local power supply or may require power from the bus.

371

USB System Architecture

Powered State

Once a device is attached to the USB, it may or may not have power applied to it by the hub. That is, some hubs have power switching while others do not. When the device is attached, if the port is not powered, then host software must apply power to the port, detect the device, and enable the port. In this condition the device is powered but must not draw more than 100ma of current.

Default State

The device enters its default state after it has received a reset (i.e., both D+ and D- driver low by the hub for >10ms). The device now responds to its default address of zero. Configuration software can use address zero to access the device’s descriptors via the default control pipe (always at endpoint zero). The device can also accept control writes, allowing an address to be assigned by configuration software.

Addressed State

A device enters its addressed state after receiving a Set Address request from configuration software. It now responds only to its new address, not address zero.

Configured State

Once configuration software has determined that sufficient power and bus bandwidth are available to support the device, it can be configured. The configuration value specified within the configuration descriptor that has been selected is written to the device to complete the configuration via the Set Configuration request. The device can now draw the maximum current required and is ready to be accessed by the USB device driver.

372

Chapter 19: USB Device Configuration

Suspend State

A device enters its suspend state when the bus remains idle for greater than 3ms. In the suspend state the device must not draw more than 500µa of current. Refer to Chapter 9 for details regarding device suspend.

Table 19-13: Device States

Attached

Powered

Default

Address

Configured

Suspend

State

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

Device is not attached to

 

 

 

 

 

 

USB. Other attributes are

 

 

 

 

 

 

not significant.

 

 

 

 

 

 

 

Yes

No

Device is attached to USB,

 

 

 

 

 

 

but is not powered. Other

 

 

 

 

 

 

attributes are not signifi-

 

 

 

 

 

 

cant.

 

 

 

 

 

 

 

Yes

Yes

No

Device is attached to USB

 

 

 

 

 

 

and powered, but has not

 

 

 

 

 

 

been reset.

 

 

 

 

 

 

 

Yes

Yes

Yes

No

Device is attached to USB,

 

 

 

 

 

 

powered, and has been

 

 

 

 

 

 

reset, but has not been

 

 

 

 

 

 

assigned a unique address.

 

 

 

 

 

 

Device responds at the

 

 

 

 

 

 

default address.

 

 

 

 

 

 

 

Yes

Yes

Yes

Yes

No

Device is attached to USB,

 

 

 

 

 

 

powered, and has been

 

 

 

 

 

 

reset, and a unique device

 

 

 

 

 

 

address has been assigned.

 

 

 

 

 

 

Device is not configured.

 

 

 

 

 

 

 

Yes

Yes

Yes

Yes

Yes

No

Device is attached to USB,

 

 

 

 

 

 

powered, has been reset, has

 

 

 

 

 

 

unique address, is config-

 

 

 

 

 

 

ured, and is not suspended.

 

 

 

 

 

 

Host may now use the func-

 

 

 

 

 

 

tion provided by the device.

 

 

 

 

 

 

 

373

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]