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的全速,提高 ...
随机推荐
- <td>内容超出自动换行
td 内容自动换行 table表格td设置宽度后文字太多自动换行 设置table 的 style="table-layout:fixed;" 然后设置td的 style=" ...
- win8开wifi共享无法使用的问题解决办法
相信现在不少人都安装了windows8操作系统,因为windows8这个全新的操作系统用起来 确实挺强大,包括漂亮的开始屏,但是不得不说这个系统的兼容性还是有待提高,所以win8我的 装了又卸,卸了又 ...
- [转]GCC系列: __attribute__((visibility("")))
在 objc-api.h 里面有很多关于__attribute__ 的定义. 例如 #if !defined(OBJC_VISIBLE) # if TARGET_OS_WIN32 # if defin ...
- jmeter的环境配置
工具/原料 WIN7 Jmeter安装包 JDK 一.安装JDK 1 [步骤一]安装jdk 1.下载jdk,到官网下载jdk,地址:http://www.oracle.com/technetw ...
- 转:存储之直连存储Dell Powervault MD 3000
存储之直连存储DellPowervault MD 3000 存储根据服务器类型可以分为:封闭系统的存储和开放系统的存储 1.封闭系统的存储:封闭系统主要指大型机,AS400等服务器 2.开放系统的存储 ...
- Nginx是什么,有什么优点?为什么选择Nginx做web服务器软件?(经典经典)
1.基础知识 代理服务器: 一般是指局域网内部的机器通过代理服务器发送请求到互联网上的服务器,代理服务器一般作用在客户端.应用比如:GoAgent,FQ神器. 一个完整的代理请求过程为:客 ...
- click模块使用
# coding:utf8 import time import click @click.command() @click.option('--id', default='123', help='a ...
- [WC2008]游览计划 「斯坦那树模板」
斯坦那树 百度释义 斯坦纳树问题是组合优化问题,与最小生成树相似,是最短网络的一种.最小生成树是在给定的点集和边中寻求最短网络使所有点连通.而最小斯坦纳树允许在给定点外增加额外的点,使生成的最短网络开 ...
- 5 个 Laravel Eloquent 小技巧
1. 快速生成 Model & Migration 这并不是一个很多人知道的小技巧,为文章生成 Model 和 Migration. $ php artisan make:migration ...
- supervisor安装部署和使用实例
Supervisord是用Python实现的一款非常实用的进程管理工具,类似于monit,monit和supervisord的一个比较大的差异是supervisord管理的进程必须由superviso ...