USB2.0 速度识别--区分低速-高速-全速
USB2.0是向下兼容USB1.X的,即USB2.0支持高速,全速,低速的USB设备
(HIGH-SPEED,FULL-SPEED,LOW-SPEED),而USB1.X不支持高速设备。
因此如果高速设备接在USB1.X的hub上,也只能工作在全速状态。
因此对速度的识别是很重要的,否则没办法以想要的速度通信。
**************************************************************************************
全速和低速区分
根据规范,全速和低速很好区分。因为在设备端有一个1.5K的上拉电阻,
上电后,有上拉电阻的那根数据线会被拉高,
根据 D+或D-的电平状态来检测是全速还是低速设备。
全速,高速的识别比较简单,但是USB2.0,USB1.X只有一对数据线,
就没办法有第三种状态来表示高速设备了,所以高速设备的识别稍微复杂。
**************************************************************************************
高速设备是以一个全速设备的身份出现的,即和全速设备一样,高速设备也在D+端有一个1.5K的上拉电阻。
USB2.0的HUB把设备当成一个全速设备,然后进行一系列的握手信号来确认双方的身份,
一方面HUB要检测设备是高速还是全速,另一方面设备也要检测HUB是USB2.0还是USB1.X的,
如果HUB是USB2.0,设备也是高速的 就工作在高速模式,否则只能工作在全速模式。
HUB连接到设备或上电时,向主机报告,主机通过发送Set_port_feature请求让hub复位新插入的设备。
设备复位操作是驱动数据线到复位SE0(D+,D-都为低电平),并持续至少10MS。
高速设备复位后,通过内部的电流源向D-持续灌17.78MA大小的电流。
因为此时D+端的1.5K上拉电阻还没撤销,在hub端,全速/低速驱动器形成一个45欧姆的终端电阻,
两电阻并联约形成45欧姆的阻抗,所以在HUB端可以看到一个 800ma(17.78*45)的电压,
这个就是Chirp K信号。Chirp K 的持续时间是 1ms - 7ms.
在HUB端,虽然下达了复位信号,并一直驱动着SE0,但usb2.0的高速接收器一直在检测 Chirp K信号,
如果没有检测到,就继续复位操作,直到复位结束,然后就工作在全速状态。
如果只是一个全速的hub,不支持高速设备,那么hub也不会理会Chirp k信号,之后设备也不会切换到高速模式。
如果是高速 HUB,设备在发送的Chirp k信号结束后的100us内,HUB必须回复一连串的KJKJKJ........序列,
向设备表明这是一个usb2.0的hub,这里的kj序列式连续的,且不能中断,每个K或J的持续时间是 40us--60us.
再回到设备端,设备检测到6个hub发送的 Chirp信号(3对KJ)后,它必须在500us内切换到高速模式。
切换动作有:
1.断开1.5K的上拉电阻
2. 连接D+/D-上的高速终端电阻(high-speed termination),其实就是全速/低速差分驱动器。
3.进入默认的高速状态
执行完 1,2两步后,USB信号线上看的到现象就发生变化了:
HUB发动的 Chirp降到原来的一半,400mv。
这是因为设备端挂载新的终端电阻后,并联原来的终端电阻,结果为22.5欧姆,
17.78*22.5为 400mv,以后高速设备操作的 信号幅值就是 400mv而不是 全速/低速的 3.3V。
至此高速设备与usb2.0握手完毕,开始进行480Mbps的通信。
**************************************************************************************
高速设备的连接检测刚开始是在全速信号环境下进行的。
通过高速设备和高速集线器之间传输一个握手信号来指示设备是否为高速设备。
如果握手信号传输失败,则默认为全速设备。
设备连接到集线器Hub或主机时,全速和高速设备在D+线上有一个1.5KΩ的上拉电阻,
由于下拉电阻为15KΩ,D+会加到近似 90%的直流电平,
当集线器探测到D+的高电平,就认为连接到全速设备。
此时,软件就会通过复位命令发送一个RESET信号到集线器,
让集线器驱动一个 SE0信号(D+和D-都为低电平)超过10ms。
高速设备检测到RESET信号后发送一个Chirp K信号给集线器(1~7ms的时间)。
集线器的高速接收器若在设备发出Chirp K序列后2.5微秒内检测到,
则响应传送一个交替的Chirp K和Chirp J信号序列。
设备检测到这6个线性调频脉冲Chirp序列(3个交替的KJ信号对),
集线器将连接端口置入高速启用状态,并从D+断开上拉电阻,
启用高速设备终端,设置高速设备默认状态。
**************************************************************************************


Data Transmission
The data rate achieved by High Speed is 480 Mb/s.
This needs to be transmitted down cables which were originally specified for a 12 Mb/s transmission rate,
To achieve this, when the link is conveying high speed data, each end of D+ and each end of D- is
terminated with a 45 Ohm resistance to ground.
Data is sent by steering a current of 17.78 mA (derived from the positive supply) : 17.78*22.5 = 400mv
into either the D+ or the D- line. This results in a voltage of 400mV on the line being fed with current.
The differential state of the line is detected at the receiving end by a differential receiver.
This arrangement is able to reliably receive data sent at 480 Mb/s.
In fact the 45 Ohm resistors are provided by the Full Speed / Low Speed driver,
at each end of the link, applying a Single Ended Zero.
The FS/LS driver is designed to provide as accurate a termination resistance as possible.
By switching off the high speed transceiver current source, the line conditions are as defined for full speed / low speed.
In addition to the differential receiver, there is also a 'transmission envelope detector' and a 'differential envelope detector'.
The transmission envelope detector produces a 'squelch' signal if there is less than 100uV between the data lines,
which means that there is no data being received.
The differential envelope detector detects if the far end has been unplugged,
as the differential voltage will double to about 800 mV if the far end terminating resistors are not present.
(Further down the page you will see how this is used by the host to detect the unplugging of a high speed device.)
Negotiating High Speed
To maintain the required compatibility, a high speed device will always present itself
initially as a Full Speed device (by a 1.5K pullup resistor on D+).

The negotiation for High Speed takes place during the Reset, which is, as we remember,
the first thing a host must do to a device before attempting data communication.
The high speed detection handshake is initiated by the device.
The hub will respond to it, if it is high speed capable.
What the device does
The device leaves its D+ 1.5K pullup resistor connected,
and does not terminate the lines with 45 Ohm resistors as it would for high speed.
But it drives high speed current (17.78mA) into the D- line for at least a millisecond.
Now, remember that the hub is applying a reset condition to the lines,
so effectively is already terminated as for high speed data.
As only one end of the link is terminated, the hub will see about 800 mV on D-.
This condition is called a K-chirp.
A full / low speed hub will pay no attention to this condition,
but a high speed hub will detect it using its differential receiver and the absence of a squelch signal.
If the hub does not respond, then the rest of the reset,
and subsequent data transmissions will take place as is normal for a full speed device.
Hub Response
If the hub is high speed capable then it will monitor the K-chirp from the device until it sees it completing.
It must, within 100us, send a series of K-J chirp pairs to the device.
This means that it will inject 17.78 mA alternately into the D- and the D+ lines.
Each of these chirps lasts around 50us, and there are no gaps between them.
The device has to see at least 3 chirp pairs before assuming that the hub is high speed capable.
Switching to High Speed
At this point the device disconnects its 1.5K pullup resistor,
applies the 45 Ohm high speed terminations (using its full speed data driver in SE0 mode),
and is thus in a state to perform high speed data transmission and reception.
The hub will continue to send chirp pairs up until 100 - 500 us before the end of reset,
and the device will monitor these chirps.
At the point in time when the device termination is applied,
the amplitude of the chirp signals, viewed on an oscilloscope would be seen to halve in amplitude from 800mV to 400mV.
USB2.0 速度识别--区分低速-高速-全速的更多相关文章
- USB2.0速度识别
我们知道USB2.0向下兼容USB1.x,即高速2.0的hub能支持所有的速度类型的设备,而USB1.x的hub不能支持高速设备(High Speed Device).因此,如果高速设备挂到USB1. ...
- usb2.0与usb3.0的区分
USB 2.0 USB2.0技术规范是有由Compaq.Hewlett Packard.Intel.Lucent.Microsoft.NEC.Philips共同制定.发布的,规范把外设数据传输速度提高 ...
- [原创]免固件开发USB2.0 FPGA方案 速度40Mbyte/s+
USB 2.0接口,实测速度40Mbyte/s: 一个接口实现两种功能(USB2.0+FPGA配置): 免固件开发: 完整的FPGA代码,即拿即用: FPGA逻辑工程师开发USB接口福音: 平台可移植 ...
- BL8810|USB2.0高速闪存读卡器|BL8810芯片
BL8810是由台湾旺玖半导体推出的一款USB2.0 SD/MMC闪存读卡器单芯片.支持USB2.0高速传输,并符合通用串行总线规范.该芯片集成了一个高速的8051微处理器和一个最好的数据引擎,它的引 ...
- BL8810|USB2.0高速闪存读卡器芯片|BL8810规格书
1.说明 BL8810是一款USB 2.0读卡器控制器,采用高度集成的单芯片解决方案,旨在提供USB2.0和SD.SDHC.mini SD.Micro SD(T-Flash)接口规范之间的高速数据传输 ...
- USB2.0规范
USB是一种支持热插拔的高速串行传输总线,它使用差分信号来传输数据,最高速度可达480Mb/S. USB支持“总线供电”和“自供电”两种供电模式.在总线供电模式下,设备最多可以获得500mA的电流.U ...
- usb2.0 协议分析
转:https://blog.csdn.net/u011594613/article/details/48291307 一.USB硬件介绍1.1.概述 一条USB传输线分别由地线.电源线.D+和D-四 ...
- USB2.0协议学习笔记---基本概念
概念 USB是一种串行通信总线(Universal Serial Bus),经历的版本有USB1.0,USB1.1.USB2.0等.USB是一种主从模式的结构,因此它无法在设备与设备.主机与主机之间 ...
- 【转载】USB2.0接口差分信号线设计
引 言 通用串行总线(Universal Serial Bus)从诞生发展到今天,USB协议已从1.1过渡到2.0,作为其重要指标的设备传输速度,从1.5 Mbps:的低速和12 Mbps的全速,提高 ...
随机推荐
- Requests中出现大量ASYNC_NETWORK_IO等待
七夕活动,网页显示异常:504 Gateway Time-out The server didn't respond in time.开发询问数据库是否正常,当时正连接在实例上查询数据,感觉响应确实慢 ...
- golang container heap&sort
go语言也自己的容器数据结构.主要有list.heap和ring package main import ( "container/heap" "fmt" &q ...
- Servlet笔记9--转发与重定向
关于Web中资源跳转的问题: 转发和重定向基本代码: package com.bjpowernode.javaweb; import java.io.IOException; import javax ...
- IE下常见兼容性问题总结
概述 本小菜平时主要写后台程序,偶尔也会去写点前端页面,写html.css.js的时候,会同时开着ie6.ie7.ie8.ie9.chrome.firefox等浏览器进行页面测试,和大部分前端开发一样 ...
- Paint Fence
There is a fence with n posts, each post can be painted with one of the k colors.You have to paint a ...
- centos6.5安装maridb5.5.51
1.先创建关于mariadb的yum源 vi /etc/yum.repos.d/MariaDB.repo [mariadb] name = MariaDB baseurl = http://yum.m ...
- emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ensure Intel HAXM is properly installed and usable.CPU acceleration status: HAX kernel module is not installed!
Android Studio 1.0 已经放出来了,以后的Android平台开发激昂逐步从Eclipse向Android Studio迁移,为了能不落伍我也特意从Google下载了Android St ...
- linux开启远程访问端口
开启3306端口的tcp访问权限 /sbin/iptables -I INPUT -p tcp -dport 3306 -j ACCEPT 保存防火墙信息 /etc/rc.d/init.d/iptab ...
- mysql xtrabackup工具备份
一.注意事项 建议用xtrabackup备份时采用全备或增量备份的方式,楼主也尝试过单库备份,但是都以备份后恢复到已经存在数据库的mysqldata目录下后部分库会出幺蛾子而告终,建议使用mysqld ...
- form的智能表单
1.智能表单的介绍 其中,(1)中的使用格式使得form不会太臃肿. 2.使用规范 3.新属性 4.举例 二.程序 1.关于邮件的问题 <!DOCTYPE html> <head&g ...