1.USB基本术语及简单枚举过程ppt课件_第1页
1.USB基本术语及简单枚举过程ppt课件_第2页
1.USB基本术语及简单枚举过程ppt课件_第3页
1.USB基本术语及简单枚举过程ppt课件_第4页
1.USB基本术语及简单枚举过程ppt课件_第5页
已阅读5页,还剩21页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1USB Host SystemClient driver softwareUniversal Bus Driver (USBD)Host Controller Driver (HCD)Host Controller (HC)USB DeviceSystem software Hardware HCIEhci/ohci/uhci/xhci2 TypeLow Speed1.1Mb/S (e.g., USB MS/KB )Full Speed12Mb/S(e.g., USB flash)High Speed480Mb/SSuper Speed 5Gb/SUSB 1.1(UHCI/OHCI)USB

2、2.0(EHCI) ICH-7 has 4 USB 1.1 Controllers & 1 USB 2.0 Controller, and supports 8 USB ports. PCH has 2 USB2.0 Controllers & 2 USB 2.0 USB 3.0(XHCI)3ICH7.port1port2port3port4port5port6port7port8UHCI ControllerUHCI ControllerUHCI ControllerUHCI ControllerEHCI Controller4PCH. The Hubs replace th

3、e functionality of the UHCI controllers by converting high-speed traffic into low and full-speed traffic.5Terms.6EndpointoUSB 通信最基本的形式是通过USB设备里一个叫Endpoint 的东西,Endpoint是通信的发送或者接收点。oEndpoint有确定的单一的方向,要么为in (Device-Host),要么为out (Host-Device)。注意有一个例外:USB协议规定每个设备都必须有Endpoint 0,它是双向的,USB利用它来实现缺省的控制管道(Cont

4、rol Pipe),从而控制设备。oEndpoint共有四种类型:Control,Bulk,Interrupt,Isochronous.7PipeoA USB pipe is an association between an endpoint on a device and software on the host. Pipes represent the ability to move data between software on the host via a memory buffer and an endpoint on a device.8Frame & MicroFra

5、meoUSB establishes a 1 millisecond time base called a frame on a full-/low-speed bus and a 125 s time base called a microframe on a high-speed bus. A (micro)frame can contain several transactions.9Transfer Typeso对应于四种不同的Endpoint同样有四种不同的传输方式:控制传输(Control Transfer), 中断传输(Interrupt Transfer), 批量传输(Bulk

6、 Transfer), 等时传输(Isochronous Transfer).o控制传输(Control Transfer)通常用于配置设备,获取设备信息,发送命令到设备,或者获取设备的状态报告等,总之就是用来传送控制信息的.o中断传输(Interrupt Transfer)用来以一个固定的速率传送少量的数据,USB 键盘和USB 鼠标使用的就是这种方式.10o批量传输(Bulk Transfer)用来传输大量的数据,确保没有数据丢失,并不保证在特定的时间内完成。U 盘使用的就是批量传输,咱们用它备份数据时需要确保数据不能丢,而且也不能指望它能在一个固定的比较快的时间内拷贝完.mass sto

7、rage device(U盘).o等时传输(Isochronous Transfer)同样用来传输大量的数据,但并不保证数据是否到达,以稳定的速率发送和接收实时的信息,对传送延迟非常敏感。常用于音频和视频一类的设备,这类设备期望能够有个比较稳定的数据流.camera.Detail: USB 2.0 SPEC 5.5&5.6&5.7&5.8Difference: Bandwidth & Priority & error retry11ConfigurationConfiguration: A USB device must be configured be

8、fore its function(s) may be used.Interface: Within a single configuration, a device may support multiple interfaces. An interface is a related set of endpoints that present a single feature or function of the device to the host.Alternate settings :an interface within a configuration may have alterna

9、te settings that redefine the number or characteristics of the associated endpoints.Endpoint: Data may be transferred between a USB device endpoint and the host in one of four ways. An endpoint number may be used for different types of data transfers in different alternate settings.Choose a properly

10、 function/feature to USB device.USB2.0 spec 9.2.312USB Device States& Enumeration1314Attach & Powered & Default state由port status register 來控制和體現。Address & configured state由 USB standard command 來配置。Note: different from generic HUB.15SuspendAll device begin the transition to the Susp

11、end state after they see a constant Idle state on their upstream facing bus lines for more than 3.0 ms.Global suspend: the entire bus is placed inthe Suspend state.Selective suspend: Segments of the bus can be selectively suspended by sending the command SetPortFeature(PORT_SUSPEND) to the hub port

12、to which that segment is attached.16Powered stateThe hub to which the USB device is now attached informs the host of the event via a reply on its status change pipe.A hub port must be powered in order to detect port status changes, including attach and detach. the host then waits for at least 100 ms

13、 to allow completion of an insertion process and for power at the device to become stable.17Default stateWhen the reset signal is released, the port has been enabled.After receiving a reset, the device is then addressable at the default address.When the reset process is complete, the USB device is o

14、perating at the correct speed.low- and full-speed is determined by the device termination resistors.A device capable of high-speed operation must reset successfully at full-speed when in an electrical environment that is operating at full-speed.18Address stateAll USB devices are accessed by a USB ad

15、dress. All USB devices must support endpoint zero to which the USB devices USB control pipe will be attached.Before the USB device receives a unique address, its Default Control Pipe is still accessible via the default address.The host assigns a unique address to the USB device, moving the device to

16、 the Address state.Set Address command is a standard USB command.How to send a standard USB command under XHCI/EHCI/UHCI/OHCI environment. 19Configured stateGet Configuration descriptor by get Configuration command.the host assigns a configuration value to the device. The device is now in the Config

17、ured state and all of the endpoints in this configuration have taken on their described characteristics.Set Configuration command is a standard USB command.20Set InterfaceWithin a single configuration, a device may support multiple interfaces. An interface is a related set of endpoints that present

18、a single feature or function of the device to the host.Some USB devices have configurations with interfaces that have mutually exclusive settings. This request allows the host to select the desired alternate setting.Set interface command is a standard USB command.21USB Device RequestsAll USB devices

19、 respond to requests from the host on the devices Default Control Pipe.22Standard Device Requests23DescriptorsDevice descriptor: general information about a USB device. A USB device has only one device descriptor.Device Descriptor: bLength: 18bDescriptorType: 1 Device DescriptorbcdUSB: 512bDeviceCla

20、ss: 0 xff massStorHIDHubbDeviceSubClass: 0 xffbDeviceProtocol: 0 xffbMaxPacketSize0: 0 x40 Max packet size for endpoint 0.idVendor: 0 x4b4 Vendor ID.idProduct: 0 x8613 Product ID.bcdDevice: 0 xa001 FW version.iManufacturer: 0 x0iProduct: 0 x0iSerialNumber: 0 x0bNumConfigurations: 0 x1 Number of configurations.Example:24Descriptors Co

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论