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.

时间: 2024-08-06 03:47:06

USB2.0 速度识别--区分低速-高速-全速的相关文章

USB2.0速度识别

我们知道USB2.0向下兼容USB1.x,即高速2.0的hub能支持所有的速度类型的设备,而USB1.x的hub不能支持高速设备(High Speed Device).因此,如果高速设备挂到USB1.x的hub上,那该设备只能工作在全速模式下.不管是hub还是设备(device),对于速度的区分是非常重要的,否则,后续的通信根本无法进行. 全速和低速识别 根据规范,全速(Full Speed)和低速(Low Speed)很好区分,因为在设备端有一个1.5k的上拉电阻,当设备插入hub或上电(固定

全网最佳CY7C68013A开发板,USB2.0高速核心板,独家最全开发资料,长期更新支持

铺天盖地的USB开发板.USB核心板那款最适合您?IFLabs组织专业团队.不惜成本.耗费大量时间精力打造的精品USB核心板是您最佳的选择,优化的核心板结构.全网最全的开发手册.全面的配件,一套在手即可开展USB接口的开发.只需这一次投入,即可实现USB接口开发的从入门到精通! 史无前例的专业.可靠.全面.豪华,绝不是其他低价产品所能比的.无论你是初学者,还是具有USB开发基础的工程师都值得拥有. IFLabs USB2.0 FX2LP核心板开发板详情:http://item.taobao.co

USB2.0规范

USB是一种支持热插拔的高速串行传输总线,它使用差分信号来传输数据,最高速度可达480Mb/S. USB支持“总线供电”和“自供电”两种供电模式.在总线供电模式下,设备最多可以获得500mA的电流.USB2.0 被设计称为向下兼容的模式,当有全速(USB 1.1)或者低速(USB 1.0)设备连接到高速(USB 2.0)主机时,主机可以退化工作在全速或者低速的模式.一条USB总线上,可达到的最高传输速度等级由该总线上最慢的“设备”决定,该设备包括主机.HUB以及USB功能设备. USB体系包括“

独家全功能USB2.0开发板,最强CY7C68013A-128核心板,超强资料不断提供更新服务

       学习USB开发再也不用买书啦,也不用花费重金去上培训班啦,IFLabs开创USB学习开发新模式,你所需要的知识.技术.范例.代码等等统统都在这里.IFLabs打造全网最丰富.最权威的USB开发平台和资料. 热卖的IFLabs精品USB2.0核心板套件再升级,全网独家推出最强.最全功能的Cypress USB 2.0 CY7C68013A-128AXC核心板开发板,全网最全配件和全网最全开发资料.只需这一次投入,即可实现USB接口开发的从入门到精通!并且有长期的全网最全开发手册更新支

ehci符合USB2.0,uhci,ohci,

uhci   ohci   ehci他们都是主机控制器的规格,OHCI主要为非PC系统上以及带有SiShe ALi芯片组的 PC主板上的USB芯片,UHCI大多为Intel和Via主板上的USB控制器芯片. UHCI的硬件电路比OHCI简单,成本第,但驱动复杂.但他们都是由USB1.1规格的. EHCI是有Intel等几个厂商研发,兼容OHCI  UHCI 遵循USB2.0规范. USB规范EHCI,UHCI,OHCI区别 为 了实现USB主机功能的统一,提高系统的可靠性与可移植性,上游芯片生产

这就是全网最专业的USB2.0核心板,USB2.0 FX2LP开发板,使用CY7C68013A

铺天盖地的USB开发板.USB核心板那款最适合您?IFLabs组织专业团队.不惜成本.耗费大量时间精力打造的精品USB核心板是您最佳的选择,优化的核心板结构.全网最全的开发手册.全面的配件,一套在手即可开展USB接口的开发.只需这一次投入,即可实现USB接口开发的从入门到精通! 史无前例的专业.可靠.全面.豪华,绝不是其他低价产品所能比的.无论你是初学者,还是具有USB开发基础的工程师都值得拥有. IFLabs USB2.0 FX2LP核心板开发板详情:http://item.taobao.co

USB2.0学习笔记连载(二):USB基础知识简介

  USB接口分为USB A型.USB B型.USBmini型.USBmicro型.USB3.0其中每种都有相应的插座和插头. 图1 图2 上图是USBA型接口,图1为插座,图2为插头.插座指向下行方向,插头指向上行方向. USB中一般常用有4根线,两边两根线一般为VBUS(5V的接入或接出线,对应上图中的1引脚)和GND(对应上图中的4引脚).中间两根为D+(对应上图中的3引脚),D-(对应上图中的2引脚),还有外加一个屏蔽层. 图3 图4 USB B型所对应的各信号和USB A型一致.在各种

USB2.0学习笔记连载(六):USB2.0硬件设计需要注意事项

笔者在设计USB2.0时找到了一个官方给的硬件设计正确设计指南,其中有些内容还挺nice的.不单单只是USB的设计,其中有些思想可以应用到其他的场合中. 对于USB2.0而言,全速状态下可以达到480Mbps,带宽相比USB1.0提高了不少.USB2.0的供电大功率供电可以达到500mA,实际上加上USB自身消耗,也就是在450~480mA左右. 1.USB供电 对于外部器件的供电选择,可以使用USB进行供电,也可以自供电.关于USB集线器的介绍参看另外一篇关于USB集线器的介绍. USB进行供

MiS603开发板 第十章 USB2.0 CY7C68013A 开发环境搭建

作者:MiS603开发团队 日期:20150911 公司:南京米联电子科技有限公司 论坛:www.osrc.cn 网址:www.milinker.com 网店:http://osrc.taobao.com EAT博客:http://blog.chinaaet.com/whilebreak 博客园:http://www.cnblogs.com/milinker/ MiS603开发板 第十章 USB2.0 CY7C68013A 开发环境搭建   CY7C68013A是Cypress公司推出的稳定,易