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

Chapter 6: LS/FS Transfer Types & Scheduling

A control transfer consists of at least two and perhaps three stages:

Setup Stage — control transfers always begin with a setup stage that transfers information to a target device, defining the type of request being made to the USB device (e.g., read the device descriptor).

Data Stage — this stage is defined only for requests that require data transfers. For example, the read descriptor request sends the contents of the descriptor to the system during the data stage. Some requests do not require data transfers beyond the setup phase.

Status Stage — this stage is always performed to report the result of the requested operation.

Bus Bandwidth Allocation

Control transfers begin with a setup stage containing an 8 byte data packet. This 8 bytes defines the amount of data to be transferred during the data stage of the control transfer. During the data stage, data packets are limited to a maximum data payload of 64 bytes. Control transfers are given a guaranteed 10% bus allocation. If additional bus bandwidth is available, then more than 10% can be allocated to control transfers.

Error Recovery

Control transfers participate in error detection and recovery mechanisms to provide a “best effort” delivery. Failure of the recovery mechanism is viewed as a catastrophic failure of the device.

Bulk Transfers

Bulk transfers are used by devices that have no particular transfer rate requirements. A classical example of a bulk transfer device is a printer. No problems will be incurred if the transfer occurs at a slow rate, other than impatience of the user who is waiting for the print job to emerge.

Bus Bandwidth Allocation

Since bulk transfers have no specific needs regarding the rate of data delivery, they are relegated to the lowest priority during each frame. The maximum bandwidth allocation that can be taken by the periodic transfers (90%) and control transfers (10%), leave no bus bandwidth for bulk transfers. This would only occur in a fully allocated frame. Bulk transfers are scheduled based on bandwidth remaining after all other transfers have been scheduled. If no bandwidth

137

USB System Architecture

is available for bulk transfers, they are deferred until the bus load diminishes. However, in the absence of other transfer types, a large portion of the bus bandwidth may be allocated to bulk transfers, resulting in high performance.

The maximum data packet size for bulk transfers is limited to only 8, 16, 32, or 64 bytes. No other packet sizes are permitted. When a bulk transfer is taking place, all packet sizes must be the maximum size specified in the maximum packet size field, except for the last data packet of a transfer. Failure to transmit packets with the expected size results in the termination of the transfer.

Table 6-7: Full-Speed Bulk Bandwidth

 

Percentage

Max

 

Data

of Frame

Maximum

Xfers/

Payload

Bandwidth/

Bandwidth

Frame

 

Transfer

 

 

 

 

 

 

 

 

 

 

 

 

1

1%

107

107KB/s

 

 

 

 

2

1%

100

200KB/s

 

 

 

 

4

1%

88

352KB/s

 

 

 

 

8

1%

71

568KB/s

 

 

 

 

16

2%

51

816KB/s

 

 

 

 

32

3%

33

1.056MB/s

 

 

 

 

64

5%

19

1.216MB/s

 

 

 

 

Bulk transfer endpoints can always be configured by software, since there is no requirement to deliver data at any particular rate. If no bus bandwidth is available, bulk transfers are deferred until bus time is available for bulk transfers.

138

Chapter 6: LS/FS Transfer Types & Scheduling

Error Recovery

Bulk transfers support error detection and recovery. Data integrity in bulk transfer applications is far more critical than the rate of transfer. Bulk transfers use all available forms of error detection and recovery.

139

USB System Architecture

140

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