Скачиваний:
31
Добавлен:
02.05.2014
Размер:
3.51 Mб
Скачать

Chapter 4

 

Data Flow Model

Wireless Universal Serial Bus Specification, Revision 1.0

4.5.2Bulk Transfer Channel Access Constraints

As with USB 2.0 a bulk function endpoint has no way to indicate a desired bus access frequency for a bulk pipe. Bulk transactions occur on the Wireless USB channel only on a bandwidth available basis; i.e. if there is Wireless USB channel time that is not being used for other purposes, bulk transactions will be moved. Wireless USB provides a “good effort” delivery of bulk data between client software and device functions. Moving control transfers over the channel has priority over moving bulk transactions. When there are bulk transfers pending for multiple endpoints, the host will provide transaction opportunities to individual endpoints according to a fair access policy, which is host implementation dependent.

All bulk transfers pending in a system contend for the same available bus time. Because of this, the USB System Software at its discretion can vary the bus time made available for bulk transfers to a particular endpoint. An endpoint and its client software cannot assume a specific rate of service for bulk transfers. Bus time made available to a software client and its endpoint can be changed as other devices are inserted into and removed from the system or also as bulk transfers are requested for other function endpoints. Client software cannot assume ordering between bulk and control transfers; i.e., in some situations, bulk transfers can be delivered ahead of control transfers. The host may determine that the sum of pending bulk transfers could achieve better throughput by making the Wireless USB channel larger. A host may reserve more MAC Layer channel time for the Wireless USB channel (i.e. enlarge the Wireless USB channel) for a short period of time in order to provide better throughput service to the pending bulk transfers. The decision to enlarge the Wireless USB channel for this purpose is host implementation dependent.

The host can use any burst size between 1 and the reported maximum in transactions with a bulk endpoint to more effectively utilize the available Wireless USB channel time. For example, there may be more bulk transfers than channel time available, so a host can employ a policy of using smaller data bursts per transactions to provide fair service to all pending bulk data streams.

When a bulk endpoint delivers a flow control event (as defined in 5.5.4) the host will remove it from the actively scheduled endpoints. The device must transmit an Endpoint Ready device notification to the host to notify it that the associated bulk endpoint has bulk data or bulk buffer space available and is ready to resume data streaming.

4.5.3Bulk Transfer Data Sequences

Bulk transactions use the standard burst sequence for reliable data delivery protocol defined in Section 5.4. Bulk endpoints are initialized to the initial transmit or receive window condition (as defined in Section 5.4) by an appropriate control transfer (SetConfiguration, SetInterface, ClearEndpointFeature). A host likewise assumes the initial transmit or receive window state for bulk pipes after it has successfully completed the appropriate control transfer as mentioned above.

Halt conditions for a Wireless USB bulk pipe have the identical side effects as defined for a USB 2.0 bulk endpoint. Recovery from halt conditions are also identical to the USB 2.0 specification, see Section 5.8.5 in the USB 2.0 specification. A bulk pipe halt condition includes a STALL handshake response to a transaction or exhaustion of the host’s transaction retry policy due to transmission errors (see Section 4.10).

4.6Interrupt Transfers

The purpose and characteristics of Interrupt Transfers are similar to those defined in USB 2.0 (Section 5.7 of the USB 2.0 Specification). The Wireless USB interrupt transfer types are intended to support devices that want a high reliability method to communicate a small amount of data with a bounded over-the-air service interval. Chapter 5 of this specification describes the details of the packets, bus transactions and transaction sequences used to accomplish Interrupt transfers. The Wireless USB Interrupt transfer type nominally provides the following. :

Guaranteed maximum service period.

Guaranteed retries during the service period if delivery failures occur.

Up to 5 retries for a Wireless USB interrupt endpoint.

39

Chapter 4

 

Data Flow Model

Wireless Universal Serial Bus Specification, Revision 1.0

Note: Retries are only guaranteed if the host detects that there was some attempt by the device to send data. If the device is completely non-responsive the host may postpone further attempts to the next service interval.

Guaranteed retry of transfer attempts the next service period in the case of multiple transfer failures during a service interval.

Interrupt transfers are attempted each service interval for an interrupt endpoint. Bandwidth is reserved to guarantee a transfer attempt and a certain number of retries each service period. Once a transfer is successful, another transfer attempt is not made until the next service period. The requested service interval for the endpoint is described in its descriptor. Subsequent sections describe the possible service intervals for Wireless USB interrupt endpoints.

Wireless USB retains the following characteristics of interrupt pipes:

No data content structure is imposed on communication flow for interrupt pipes

An interrupt pipe is a stream pipe, and therefore is always unidirectional.

4.6.1Low Power Interrupt IN

Wireless USB provides explicit support for function endpoints (devices) that move data infrequently, have a low latency requirement on the delivery of the data and a keen requirement to significantly save power. In order to accomplish the low-latency, the host must poll the endpoint for data at the required poll rate (based on the value of bInterval). To maximize power savings, the error tolerance rules/policies of the host are relaxed so that the function endpoint is not required to be listening for every IN token. In general, a low power interrupt function endpoint only needs to respond to IN tokens when it has data to move. All of the general operational characteristics and rules of an interrupt transfer type as described above, apply for a low power interrupt IN. The exceptions to the general rules and characteristics are described below.

A host will provide up to 3 attempts for a low power interrupt IN function endpoint. A retry may only be provided by the host if the host detects that there was some attempt by the device to send data. If the host determines the device was non-responsive, it may postpone further transaction attempts until the next service interval.

A low power interrupt IN function endpoint must NAK at least every TrustTimeout period or risks being either STALLED or disconnected by the host (depending on whether the function endpoint is the only ‘active’ endpoint on a device). A host must not use the Keepalive IE with a device where the low power interrupt IN function endpoint is the only active endpoint on the device.

4.6.2Interrupt Transfer Packet Size and Signaling Rate Constraints

An endpoint for interrupt transfers specifies the maximum data packet payload size that the endpoint can accept from or transmit to the Wireless USB channel. The allowable maximum data payload size for interrupt endpoints is 1024 bytes. The allowable maximum data payload size for low power interrupt endpoints is 64 bytes. The maximum allowable burst size for interrupt endpoints of any type is one. The equivalent of wired USB high bandwidth interrupt endpoints are not supported by Wireless USB. Wireless USB interrupt endpoints are only intended for moving small amounts of data with a bounded service interval. The Wireless USB protocol does not require the interrupt data packets to be maximum size. If an amount of data less than the maximum packet size is being transferred it does not need to be padded.

A host may use any of the device’s reported PHY signaling rates for data packets transmitted during the data phase of a Wireless USB transaction. For OUTs (host to device) transactions to an interrupt endpoint, the host may use any supported PHY signaling rate for data packets. For interrupt INs (device to host) the host may direct the device to use any one of the supported PHY signaling rates for data packets transmitted during the data phase.

A host is required to support any Wireless USB interrupt endpoint. A host must support maximum packet sizes from 0 to 1024 bytes for a Wireless USB interrupt endpoint. A host must support maximum packet sizes from 0 to 64 bytes for a Wireless USB low power interrupt endpoint. No host is required to support larger maximum packet sizes.

40

Chapter 4

 

Data Flow Model

Wireless Universal Serial Bus Specification, Revision 1.0

As noted in Section 4.10.2 a host may use smaller data payloads per packet than the reported maximum packet size as a measure to improve PER, when the device reports that it supports data packet size adjustments. This is an optional feature for an interrupt endpoint. For function endpoints that do not support the data packet size adjustments, the host must always use the reported wMaxPacketSize with transactions to the function endpoint. For function endpoints that do support data packet size adjustment, the host may only use allowed data packet sizes less than or equal to the reported maximum packet size for the endpoint. For interrupt endpoints that support maximum packet size adjustment, any packet size smaller than the reported wMaxPacketSize can be used. For example, with a wMaxPacketSize of 512 bytes; a host may only use packet sizes between 1 and 512. An IN transaction token (WDTCTA, see Section 5.2.1.2) always includes the packet size the function endpoint should use for the data phase data packets. A host must always use a data packet size supported by the function endpoint; otherwise the behavior is not defined. The data packet size selected for each interrupt transaction is called the ‘active’ packet size. On OUT transactions, the function interrupt endpoint (that supports packet size adjustments) must be prepared for the host to use any valid ‘active’ packet size in each transaction.

An interrupt function endpoint must always transmit data payloads with data fields less than or equal to the transaction’s active packet size. If the interrupt transfer has more information than will fit into the active packet size for the transaction, all data payloads in the transfer are required to be active packet size except for the last data payload in the transfer, which may contain the remaining data. An interrupt transfer may span multiple bus transactions. The host is allowed to adjust the active packet size (when the device supports it) on every contiguous burst. See Section 4.10.2 for the definition of a contiguous burst.

An interrupt transfer is complete when:

Exactly the amount of data expected has been transferred

A data packet is transferred with a last packet flag set to one in its Wireless USB header.

4.6.3Interrupt Transfer Channel Access Constraints

Periodic endpoints can be allocated at most 80% of the Wireless USB channel time. A Host is allowed to temporarily use the 20% channel time reserved for Bulk and Control to attempt to prevent periodic stream failures.

An endpoint for an interrupt pipe specifies its desired service interval bound. An interrupt function endpoint can specify an interval from 4.096 to 4194.304 milliseconds.2 The interval is reported as an integer value (x) from 6 to 16 in the bInterval field of an interrupt endpoint descriptor. The service interval is 2x-1 units of 128 microseconds. Table 4-2 shows the requested service interval in milliseconds for each bInterval value. The shaded values in the table show the intervals that can be achieved in a Wireless USB system. The service interval encoding is slightly different than the encoding used in the USB 2.0 specification, due to the MAC layer time base using units of 256 microseconds.

Table 4-2 Interrupt Endpoint Service Intervals

bInterval

Requested Service Interval

Value

(milliseconds)

 

 

 

1

0.128

 

 

 

 

2

0.256

 

 

 

 

3

0.512

 

4

1.024

 

 

 

 

5

2.048

 

 

 

 

6

4.096*

 

7

8.192

 

 

 

 

2 The Wireless USB channel does not allow an absolute service interval guarantee smaller than 8.192 milliseconds. Once every 65.536 milliseconds the service interval gap could be this long. The typical interval bound will still be 4.096 milliseconds if 4 is the requested interval.

41

Соседние файлы в папке Wireless USB Specification Revision 1.0 May 12, 2005