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

Chapter 4

 

Data Flow Model

Wireless Universal Serial Bus Specification, Revision 1.0

support dynamic switching. If dynamic switching is supported, the endpoint supports dynamically being reconfigured to a different bandwidth mode (represented by a different alternate setting).

4.7.5Isochronous Data Discards and Use of Isochronous Packet Discard IE

When link conditions degrade for an extended period of time an isochronous transmitter may be required to discard data. The Wireless USB protocol contains mechanisms to provide the receiver with information about the number of discarded packets. This section describes the discard mechanism for isochronous OUT and isochronous IN function endpoints and the requirements for the host and function endpoint in each situation. Each isochronous data packet includes an isochronous specific header that includes a presentation time associated with the packet. The presentation time is used in making discard decisions and processing data, see the protocol chapter for specific details on the isochronous header format.

An isochronous IN function endpoint only discards data when it runs out of physical storage. When data must be discarded, the isochronous IN function endpoint discards the oldest data stored in the buffer. If the isochronous IN function endpoint has already tried to transmit the discarded data, it attempts to transfer the oldest available non-discarded packets using the same burst sequence number(s) as the discarded packet(s). The host must examine presentation times on received packets and place data into buffer locations based on the presentation time. This behavior ensures that the host will correctly process data that is transmitted out of order when an isochronous IN function endpoint discards data.

A host only discards data to an isochronous OUT function endpoint if the presentation time for any of the isochronous segments in the packet is earlier than the current Wireless USB Channel time. A host must discard the entire packet (all segments) if the presentation time is earlier than the current Wireless USB Channel time. When the host discards a packet to an isochronous OUT function endpoint it does not reuse the burst sequence number associated with the discarded packet. When the host discards a packet it must notify the isochronous OUT function endpoint of the discard. The host performs this notification by transmitting an Isochronous Packet Discard IE. The Isochronous Packet Discard IE indicates the number of packets discarded, the expected state of the isochronous OUT endpoint receive window after the discards, the first position in the receive window, and an ID number for the discard IE. The host must put the Isochronous OUT discard IE before WXCTAs in the MMC. The host must include at least one WDTCTA for the isochronous IN function endpoint in the same MMC. If the host receives a transmission from the endpoint in the WDTCTA time slot it must not send the Isochronous OUT discard IE again until another discard occurs. If the host does not receive a transmission, it must continue to send the Isochronous OUT discard IE in subsequent MMCs. If the host must discard additional packets to the isochronous OUT function endpoint before it has received a transmission from the device it must update the discarded packet count and expected device receive window in the Isochronous Packet Discard IE and continue to send the IE until it receives a transmission from the endpoint confirming that it received an MMC transmitted with the Isochronous Packet Discard IE. The host must use the same ID value for all (re)transmissions of an Isochronous packet discard IE until it receives a transmission from the endpoint. When the host transmits a new isochronous packet discard IE to an endpoint it must increment the ID value. When a device containing an Isochronous OUT function endpoint receives an Isochronous Packet Discard IE for that endpoint it must update its receive window to the expected window specified in the IE.

Note: With some isochronous OUT function endpoint implementations it is not necessary to process Isochronous Packet Discard IEs. See implementations examples in Section 4.11.7 for more details.

Use of the dynamic switching mechanism for interfaces with multiple isochronous endpoints is beyond the scope of this specification. It is recommended that isochronous endpoints supporting dynamic switching be placed in separate interfaces if possible.

4.8Control Transfers

The purpose and characteristics of Control Transfers are identical to those defined in USB 2.0 (Section 5.5 of the USB 2.0 Specification). Chapter 5 of this specification describes the details of the packets, bus transactions and transaction sequences used to accomplish Control transfers. Chapter 9 of the USB 2.0 specification and Chapter 7 of this specification define the complete set of standard command codes used for devices.

47

Chapter 4

 

Data Flow Model

Wireless Universal Serial Bus Specification, Revision 1.0

Each device is required to implement the Default Control Pipe as a message pipe. This pipe is intended to be used for device initialization and logical device management. This pipe is to be used to access device descriptors and to make requests of the device to manipulate its behavior (at a device-level). Control transfers must adhere to the same USB data structure definitions described in USB 2.0.

The Wireless USB system will make a “best effort” to support delivery of control transfers between the host and devices. As with USB 2.0, a function and its client software cannot request specific channel access frequency or bandwidth for control transfers. System software may restrict the channel access and bandwidth a device may desire as defined in Section 4.8.1and 4.8.2.

4.8.1Control Transfer Packet Size and Signaling Rate Constraints

Control endpoints have a fixed maximum control transfer data payload size of 512 bytes and have a maximum burst size of one (1). These maximums apply to all data transactions during the data stage of the control transfer. Refer to Section 5.5.2 for information on optimizations beyond the USB 2.0 standard provided in Wireless USB for the Setup and Status stages of a control transfer.

A Wireless USB device must report a value of 255 (FFH) in the bMaxPacketSize field of its Device Descriptor. The host must ignore this field in the Device Descriptor for Wireless USB devices and assume a wMaxPacketSize of 512 (200H) for the Default Control Pipe. A host must always use the PHY base signaling rate for Wireless USB Standard request transfers on the Default Control Pipe. This is in order to make these requests as reliable as possible. A host may choose to use other signaling rates for all other control transfers, based on the same criteria it uses to select signaling rates on other endpoint transfer types (see Section 4.4). The Default Control Pipe has a maximum sequence value (bMaxSequence) of 2 (i.e. only sequence values in the range [0-1] are used). Note, the special control requests DATA_LOOPBACK_READ and DATA_LOOPBACK_WRITE are not required to use the PHY base signaling rate for packets transmitted during the request’s data phase. These requests may require packet sizes larger than 512 bytes to be used. These exceptions are described in detail in Sections 7.3.1.8 and 7.3.1.7.

The requirements for data delivery and completion of device to host and host to device Data stages are generally not changed between USB 2.0 and Wireless USB (see Section 5.5.3 in the USB 2.0 Specification). A control pipe may have a variable-length data phase in which the host requests more data than is contained in the actual data structure. When all of the data is returned to the host, the function must indicate that the Data stage is ended by returning a packet with the last packet flag set to one. This rule applies regardless of the size of the last data packet.

4.8.2Control Transfer Channel Access Constraints

A device has no way to indicate a desired bus access frequency for a control pipe. A host balances the bus access requirements of all control pipes and pending transactions on those pipes to provide a “best effort” delivery between client software and functions on the device. This policy is unchanged with regards to USB 2.0.

Wireless USB requires that part of the Wireless USB Channel be reserved to be available for use by control transfers as follows:

A control transfer comprises multiple transactions and may therefore span more than one transaction group. The individual transactions of a control transfer may, or may not be scheduled onto contiguous transaction groups.

The transactions of a control transfer may be scheduled co-incident with transactions for other function endpoints of any defined transfer type.

Retries are not required to occur in contiguous transaction groups and may be scheduled with equal priority to all new control and bulk transactions.

Control transfers that are being frequently retried should not be expected to consume an unfair share of channel time.

If there are too many pending control transfers for the available channel time, control transfers are selected to move through the channel as appropriate.

48

Chapter 4

 

Data Flow Model

Wireless Universal Serial Bus Specification, Revision 1.0

If there are control and bulk transfers pending for multiple endpoints, control transfers for different endpoints are selected for service according to a fair access policy that is Host Controller implementationdependent.

When a control endpoint delivers a flow control event (as defined in 5.5.4), the host will remove the endpoint from the actively scheduled endpoints. The device must transmit an Endpoint Ready device notification to notify the host that it is ready to resume data streaming on the flow controlled endpoint.

These requirements allow control transfers between a host and devices to regularly move through the Wireless USB Channel with “best effort”. The basic System Software discretionary behavior defined in USB 2.0 (Section 5.5.4) applies equally to Wireless USB Control Transfers.

4.8.3Control Transfer Data Sequences

Wireless USB preserves the message format and general stage sequencing of control transfers defined in USB 2.0 (see Section 5.5.5). The Wireless USB protocol defines several optimizations for the Setup and Status stages of a control transfer, however all of the sequencing requirements for normal and error recovery scenarios defined in USB 2.0 Section 5.5.5 directly map to the Wireless USB Protocol. The only necessary clarification is in regards to recovery from a halt condition, because Wireless USB does not utilize a Setup PID.

After a halt condition is encountered or an error is detected by the host, a control endpoint is allowed to recover by accepting the next Setup stage control as defined in Section 5.5.2; i.e. recovery actions via some other pipe are not required for control endpoints. For the Default Control Pipe, a device reset may be ultimately required to clear a halt or error condition if the next Setup control is not accepted.

4.8.4Data Loopback Commands

Wireless USB requires that all devices support a pair of control loopback requests: Data Loopback Write and Data Loopback Read. The Data Loopback requests provide a standard method for accomplishing loopback capability on all devices. This capability is utilized for a variety of purposes, including compliance testing and link quality estimation. These requests require exceptions to several of the standard rules for control requests. Detailed requirements for the loopback requests are described in this section.

All devices are required to support the loopback requests in the UnAuthenticated device state and in the Default and Address device states. Any device that contains one or more isochronous endpoints in any of its configurations (isochronous device) must also support the loopback commands in the Configured state. Non isochronous devices are not required to support the request in the configured state. Behavior for a non isochronous device is not specified if it receives one of the loopback requests in the configured state.

The amount of data that any device must be able to store for the loopback commands is dependent on the configuration(s) of the device. A device must be able to store a data payload equal in size to the largest wMaxPacketSize or wOverTheAirPacketSize value from any of the device’s endpoints in any of its configurations (devMaxPacketSize). The device must be able to store a data packet of devMaxPacketSize or less, received with a Data Loopback Write request.

Note: The data packet sent in the data stage of a Data Loopback Write can be up to devMaxPacketSize in bytes. This is an exception to the normal 512 byte limitation imposed by the control endpoint maximum packet size. The host can not send more than one data packet in the data stage of a Data Loopback Write. Device behavior if the host includes multiple packets in the data stage is undefined. Loopback requests may use any data rate supported by the device. The device must support a Data Loopback Write request with any data rate that the device indicates it supports. The device must perform the data stage of a control loopback read request at the specified data rate.

After a device receives a Data Loopback Write request it is required to store the data payload. The required behavior for a device with stored loopback data including how long the data must be stored is described for each possible case in the list below:

The device receives another Data Loopback Write request. The device is required to overwrite any currently stored data with the data from the current Data Loopback Write Request.

49

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