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

7 Packets &

Transactions

The Previous Chapter

The previous chapter introduced and described the four transfer types supported by USB: interrupt, bulk, control, and isochronous. The purpose of the transfers and their capabilities and limitations were also discussed.

This Chapter

Every transfer broadcast over the USB consists of a combination of packets. These packets are combined to define individual transactions that are performed as part of a larger transfer. Each transaction type is defined, along with the individual packets that compose it.

The Next Chapter

Interrupt, bulk, and control transfers require that the successful delivery of data be verified by USB. CRC and other error checking is performed to verify data delivery and if errors occur retries of the failed transmission are performed. This chapter discusses the various sources of errors and the error detection mechanisms used by USB to identify them, and the error recovery that is performed to overcome them.

Overview

The previous chapter discussed the various transfer types used to communicate with endpoints within a device. Transfers are performed across the USB using one or more transactions consisting of a series of packets. Figure 7-1 on page 142 illustrates the relationships between the various layers involved in performing a transfer — from the USB device driver’s request to perform a transfer (IRP) to the resulting packets that are transmitted across the USB wire to or from the device. This chapter deals with individual transactions that are initiated by the

141

USB System Architecture

host to transfer data to or from the target USB device. Each transaction consists of one or more packets that are transmitted over the USB wire.

Figure 7-1: The Layers Involved in USB Transfers

 

 

 

 

USB

 

 

 

 

 

USB

 

 

 

 

 

 

Client

 

 

 

 

 

Client

 

 

 

 

 

 

Driver

 

 

 

 

 

Driver

 

 

 

 

I/O Request Packet 1

 

 

I/O Request Packet 2

 

USB

Transaction

 

Transaction

Transaction

Trans.

Trans.

Trans.

Trans.

Trans.

Driver

 

1-0

 

1-1

 

 

1-2

2-0

2-1

2-2

2-3

2-4

Host

 

Frame 1

 

 

Frame 2

 

 

Frame 3

 

 

Controller

Transaction

Trans.

 

Trans.

Transaction

Trans.

Transaction

 

 

Driver

1-0

 

2-0

 

2-1

1-1

2-2

 

1-2

 

 

USB Host

Token

 

Data Packet

Handshake

Token

Data Packet Handshake

 

Controller

Packet

 

 

 

 

Packet

Packet

 

 

Packet

 

 

 

 

 

 

 

 

 

 

Sync

PID

Device

EndPoint CRC

 

Sync

PID

 

 

 

 

 

 

Address

Number

 

 

 

 

 

 

 

 

 

Sync

PID

 

 

DATA (Payload of Transaction)

 

 

 

CRC

142

 

 

 

 

 

 

 

 

 

 

 

 

 

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