Usb Note
Usb Note
USB 3.0______
#Device endpoint: a uniquely addressable portion of USB that is the source or the sink information in a communication flow between the host and device #Dual simplex: two data path that independently carry data in each direction #USB 3.0 utilizes dual bus architecture that provides backward compatibility with USB 2.0 It provides for simultaneous operation of SuperSpeed and non-SuperSpeed information exchange #three parts of architecture of USB 3.0 Interconnect, devices N host USB 3.0 connection model allows for the discovery and configuration of USB devices at the highest signaling speed supported by the devices, all hubs b/w host and devices. Purpose of hub is to provide additional connection points to the bus beyond provided by host.
Interconnect topology: tiered star topology with single host at tier 1 and hubs at lower tiers Physical layer: SuperSpeed has two different paths one for data transfer and one for data receive Link layer: logical and physical connection of two ports. Logical portion: Connect, removal, power management of physical layer Flow control and reliable delivery Correcting framing sequence and error check Protocol layer: each packet include CRC to detect multiple bit error SuperSpeed power management: Packets are routed, allowing the links that are not involved in data communication remains in low power state
HUBs: are logical combination of USB 2.0 hub and SuperSpeed hub for backward compatibility Host: interacts with USB devices through host controller. Includes both SuperSpeed and USB 2.0 elements detects attachment and removal of USB manage control flow and data b/w host and USB devices Pipes: association b/w an end point on device and software on the host. Pipe moves data between software on the host via memory buffer and an end point on a device. Busy if NRDY and for service ERDY Difference from USB 2.0:
supports bursting 2.0 polling model, 3.0 asynchronous notification Streaming for bulk endpoint Offers isochronous devices to enter in low power link state b/w service interval SuperSpeed transaction: SuperSpeed dual simplex physical layer allows information to travel simultaneously in both directions. Tx can send multiple data packet before receiving handshake USB 2.0 broadcast packets to all enabled downstream, every device require to decode the address triple (Device address, endpoint, direction), SuperSpeed unicasts the packets. Packet contains routing information and is sent to directed path. Isochronous timestamp packet (ITP) is multicast. USB 2.0 uses polling style. USB 3.0 uses asynchronous notification style. SuperSpeed transaction is initiated by the host making a request followed by response from device If endpoint halted: STALL handshake If cannot honor a request due to lack of buffer space or data: NRDY If can honor request: ERDY SuperSpeed packets: 16-byte header, 16-bit CRC, end with 2B link control word
Most packets contain routing information and a dive triple (Device address, endpoint number, direction) Four types of basic packet s: Link management packet (LMP) only traverses a pair of directly connected ports and is primarily used to manage link. Transaction packet (TP): controls the flow of data packets, configure, devices and hub. Data packet (DP): packet header + data payload Isochronous timestamp packet (ITP) is a multicast sent by the host to all active links. Transfer description: SuperSpeed has independent TX and Rx paths; TX does not have to wait for ack, 4.4.1 Data bursting: enhances efficiency by eliminating the wait time for ack on a per data basis. In TX: (data in host ack to device) Host initiates tx by sending ack to the device. This ack packet contains addressing information required to route the packet to intended end point. Host tells number of packets it can send and sequence number of the first data packet expected from the device. Out TX: (data in device ack to host) Host initiates a TX by sending burst of data packet to the device. Each data packet contains addressing information and sequence number of data packet. Even though the device is required to send an ack for every data packet received, the host can send up to maximum limit burst size number of data packets to the device without waiting for an ack. Power management and performance: When host initiates a transaction that encounters a link in a non active state, a deferred response is sent by the hub to the host that this particular path is in a reduced power managed state and that host should go and schedule other transactions TX types:
In transfer, out transfer, control transfer, bulk transfer, interrupt transfer, isochronous transfer Interrupt transfer: Provide highly reliable method to communicate small amount of data Guaranteed maximum service interval Guaranteed retry of transfer attempts in the next service interval. For burst size equal to one, maximum interrupt transfer packet size is 1024. Isochronous transfer: Guaranteed b/w for transaction attempts on the SuperSpeed bus with bounded latency. Guaranteed data rate through the pipe as long as data is provided to pipe.
HUB CONROLLER Endpoint organization: Hub class defines an additional endpoint pipe: status change endpoint with max burst size one. Host system receives port and hub status change notification through the status change endpoint Its an interrupt endpoint; if no hub or port status bit is set then the hub returns an NRDY when status change endpoint receives an IN. when the status change bit is set the hub will send an ERDY. The host will subsequently ask the status change endpoint for data. Hub descriptor and hub/port status and control are accessible the default control pipe. The hub descriptor may be read at any time. When a hub detects a change on a port or when it changes its own state sce transfers data to host in specified form. Hub/port status bit can be reset by ClearPortFeature () or by hub reset. Port change information processing
Hub reports ports status through port command. USB system software ack a port change by clearing the change state corresponding to the status change reported by hub. Ack clears the change state for the port so future data transfer to the sce do not report previous event. Hub returns a byte and zero at invalid number field location for hub/port status change Any time any state change bits are non-zero , an ERDY is returned Over current reporting and recovery If an over current condition occurs, it causes a status/state change at one/more place. This change is reported to USB system software so that it can take corrective option. When a hub experiences an over current condition it shall place all affected ports in DSPORT>Power-off state. Host recovery from over current event Host gets change notification from hub with over-current event. Host extracts appropriate hub/port change information. Host waits for over current status to be cleared to 0. Host cycles power to on for all necessary ports. Host re-enumerates all affected ports.
USB 3.0 1. Out: token +data In: handshake +data 2. Supports bursting 3. Dual simplex unicast 4. Polling model
USB 2.0 token+data+handshake for both TX and Rx not half duplex asynchronous notification