USB Bus Enumeration(总线枚举)

9.1.2 Bus Enumeration(总线枚举)

When a USB device is attachedto or removed from the USB, the host uses a process known as bus

enumeration to identify andmanage the device state changes necessary. When a USB device is attached to apowered port, the following actions are taken:

当USB设备插入或拨出,主机采用一个叫总线枚举的过程识别和管理设备的状态变更。当USB设备插入上电的端口,将会出现以下动作:

1. The hub to which the USBdevice is now attached informs the host of the event via a reply on its status changepipe (refer to Section 11.12.3 for more information). At this point, the USBdevice is in the Powered state and the port to which it is attached isdisabled.

1.USB设备连接的集线器将通过响应状态改变管道告诉主机当前发生的事件(具体参考11.12.3),这时,USB设备将上电,连接端口将被设置为无效。

 

2. The host determines theexact nature of the change by querying the hub.

2. 主机通过询问集线器,确认具体的改变。

 

3. Now that the host knows theport to which the new device has been attached, the host then waits for at least100 ms to allow completion of an insertion process and for power at the deviceto become stable. The host then issues a port enable and reset command to thatport. Refer to Section 7.1.7.5 for

sequence of events and timingsof connection through device reset.

3.现在知道新的设备已连接该主机的端口,然后主机等待至少100毫秒,以完成插入进程并保证供电力稳定。主机然后发出一个端口启用和复位命令到该端口。请参阅7.1.7.5: 事件时序,及设备复位的连接时序。

4. The hub performs therequired reset processing for that port (see Section 11.5.1.5). When the reset signalis released, the port has been enabled. The USB device is now in the Default stateand can draw no more than 100 mA from VBUS. All of its registers and state have been reset and itanswers to the default address.

4。该集线器执行该端口(参见11.5.1.5)所需的复位处理。当复位信号释放,端口已被启用。现在的USB设备在默认状态,可以得到不超过100毫安的VBUS。它的寄存器和状态都被重置,并回复了默认的地址。

5. The host assigns a uniqueaddress to the USB device, moving the device to the Address state.

5。主机分配一个唯一的地址到USB设备,并将设备置于该地址状态。

6. Before the USB device receivesa unique address, its Default Control Pipe is still accessible via the defaultaddress. The host reads the device descriptor to determine what actual maximumdata payload size this USB device’s default pipe can use.

6。USB设备收到一个唯一的地址之前,它的默认控制管道仍是通过默认地址访问。主机读取设备描述符,以确定这个USB设备的默认管道可以使用的实际最大数据有效载荷大小。

7. The host reads theconfiguration information from the device by reading each configuration zero ton-1, where n is the number of configurations. This process maytake several milliseconds to complete.

7。主机从设备读取由每个配置信息,从零读到n -1,其中n是配置数量的配置。这个过程可能需要几毫秒的时间来完成。 

 

 

8. Based on the configurationinformation and how the USB device will be used, the host assigns a

configuration value to thedevice. The device is now in the Configured state and all of the endpoints in

this configuration have takenon their described characteristics. The USB device may now draw the amount of VBUS power described inits descriptor for the selected configuration. From the device’s point of view,it is now ready for use. When the USB device is removed, the hub again sends anotification to the host. Detaching a device disables the port to which it hadbeen attached. Upon receiving the detach notification, the host will update itslocal topological information.

8。基于配置信息,以及如何使用USB设备的信息,主机将分配一个配置值到设备。该设备是目前在配置状态,所有端点的特征描述都已在他们的这种配置中。 USB设备现在可以根据选定的配置从描述中提请VBUS电源功率值。从设备的角度来看,现在可以使用了。当USB设备被移除,集线器再次向主机发送一个通知。被移除的设备端口禁用。接到移除通知后,主机将更新其本地集线器拓扑信息。

 

附注:

相关request流程:

get_hub_descriptor==

get_hub_status==

set_port_feature==

get_port_status==

clear_port_feature==

get_port_status==

get_hub_descriptor==

get_hub_status==

set_port_feature==

set_port_feature==

get_port_status==

get_port_status==

clear_port_feature==

usb 1-1:new high speed USB device using pxa9xx-ehci and address 2

hub_port_init==

set_port_feature==

get_port_status==

clear_port_feature==

hub_set_address==


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值