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

Chapter 12: HS Transfers, Transactions, & Scheduling

Figure 12-11: PING Transaction versus OUT Transaction

3,1* 7UDQVDFWLRQ YV 1$.HG 287

 

 

 

 

 

 

 

,QWHU 3DFNHW 'HOD\

 

 

 

 

 

 

 

 

 

 

287 7RNHQ

 

'$7$

 

1$.

 

 

 

 

 

 

 

 

 

E\WHV

8S WR E\WHV

E\WHV

 

 

 

 

 

 

 

% PD[ GDWD VL]H RYHUKHDG

 

 

 

,QWHU 3DFNHW 'HOD\

 

 

 

 

 

 

 

 

 

 

 

 

 

3,1*

 

 

1$.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

E\WHV

E\WHV

 

 

 

The Ping Protocol

All bulk and control endpoints must support the ping protocol. However, the setup stage of a control transfer must always return ACK; thus, these transactions do not support pinging. This section discusses the possible actions taken by the host and device when performing an OUT transaction with the assistance of pinging the endpoint.

Figure 12-12 depicts the sequence of the events that take place when various responses are received from the device endpoint.

261

USB System Architecture

 

 

 

Figure 12-12: Host Ping Processing Overview

 

 

 

 

 

 

 

 

 

$&.

 

 

 

 

 

 

 

 

:9

 

1$.

 

 

3LQJ

 

 

 

 

 

 

 

 

 

 

 

 

 

$&.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0RUH URRP $GYDQFH

 

 

 

 

 

 

 

 

 

 

1$. RU 1<(7

 

 

WR QH[W WUDQVDFWLRQ

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

'DWD

 

 

 

 

 

 

 

 

 

Figure 12-13 illustrates the actions taken by the target endpoint during ping processing. The actions taken by the endpoint are largely dependent upon whether the device currently has space available or not.

Figure 12-13: Endpoint Ping Processing

 

 

6SDFH

 

287 'DWD

3LQJ

 

$YDLODEOH

6SDFH

2U 3LQJ

 

6SDFH

 

 

ACK

 

1RW

1$.

$YDLODEOH

 

$YDLODEOH

 

 

 

 

2XW 'DWD

 

 

6SDFH

 

 

 

 

$YDLODEOH

..059

6SDFH

NYET

 

 

,9,

1RW

 

 

 

 

 

 

 

 

$YDLODEOH

 

 

262

Chapter 12: HS Transfers, Transactions, & Scheduling

PING Packet Handshake Responses. When the host issues a PING

packet to a device endpoint, two possible non-error responses are returned to the host: NAK (No Acknowledge) and ACK (Acknowledge).

A NAK handshake indicates that the endpoint does not have room for a maxi- mum-sized data packet. When the device returns NAK, the host continues to issue ping transactions knowing that the device has no room for the data packet. However, the host should use the ping protocol in a manner which increases bus utilization. For example, if the device endpoint returns a NAK handshake indicating that it does not have space for the OUT data, the host controller can delay the next ping for this endpoint and perform transactions to other endpoints. In this way, bus time is used to transfer data to or from other endpoints while the original endpoint empties its FIFO.

An ACK handshake returned from an endpoint being pinged indicates that the endpoint has room for a maximum-sized packet. In response to an ACK, the host must issue the OUT transaction as the next transaction to that endpoint. However, the host may perform transactions to other endpoints between reception of ACK and the OUT transaction.

The OUT transaction following a ping acknowledge can receive three non-error responses:

ACK — This also verifies successful transfer of the OUT data, and that the endpoint has room for another maximum-sized packet. Thus, the host can issue the next OUT transaction.

NYET — This packet verifies that the target received the OUT data without error, but that there is not enough room for the next maximum-sized packet. Thus, the host resumes endpoint pinging.

NAK — This handshake is unexpected because the ACK response from the pinged endpoint reported that the endpoint had sufficient room for the data, but the device, having returned NAK, is now indicating that it has no room for the data. This response suggests that the endpoint returned an inappropriate handshake, or that the endpoint became busy and temporarily could not respond.

High-speed bulk/control endpoints must be designed to limit the number of NAKs they will issue. Specifically, an endpoint is allowed to NAK at most one time during the interval specified in its endpoint descriptor as listed in Table 12- 7 on page 264. An interval of zero indicates that the endpoint never issues a NAK. Endpoints that never issue NAKs must still be able to respond to PING packets.

263

USB System Architecture

Table 12-7: Interval Field of Endpoint Descriptor Defines NAK Rate for Non-periodicTransfers

Offset

Field

Size

Value

Description

 

 

 

 

 

 

 

 

 

 

6

bInterval

1

Number

HS bulk and control OUT endpoints define

 

 

 

 

bInterval as the maximum NAK rate of the

 

 

 

 

endpoint. bInterval specifies the number of

 

 

 

 

microframes/NAK (0-255). A value of 0

 

 

 

 

means the EP never issues a NAK hand-

 

 

 

 

shake.

 

 

 

 

 

264

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