这是本文档旧的修订版!
目录
USB
USB的标准组织为USB-IF,网站https://www.usb.org/,相关标准文档均可以从该网站(https://www.usb.org/documents)上下载。
常用标准
USB 1.x & 2.x: Universal Serial Bus Specification Revision 2.0
USB 3.x:Universal Serial Bus 3.2 Specification
USB 4.x:Universal Serial Bus 4 (USB4®) Specification
Type-C:Universal Serial Bus Type-C Cable and Connector Specification
版本差异
USB各版本的差异如下,每个版本支持的接口不一样,到了USB4,则只支持Type-C接口。
Operation mode | Old name | Introduced in | Encoding | Data wire pairs | Nominal rate 单向 | USB-IF marketing name | Connector |
Low-Speed | USB 1.0 | NRZI | 1 HDx | 1.5 Mbit/s half-duplex | Basic-Speed USB | Type A/B Type A/B SuperSpeed Mini Mini SuperSpeed Micro Type C |
|
Full-Speed | 1 HDx | 12 Mbit/s half-duplex | Basic-Speed USB | ||||
High-Speed | USB 2.0 | 1 HDx | 480 Mbit/s half-duplex | Hi-Speed USB | |||
USB 3.2 Gen 1×1 | USB 3.0, USB 3.1 Gen 1 | USB 3.0 | 8b/10b | 2 FDx (+ 1HDx) | 5 Gbit/s symmetric | SuperSpeed USB 5Gbps (formerly SuperSpeed USB) | Type A/B SuperSpeed Mini SuperSpeed Type C |
USB 3.2 Gen 2×1 | USB 3.1 Gen 2 | USB 3.1 | 128b/132b | 2 FDx (+ 1HDx) | 10 Gbit/s symmetric | SuperSpeed USB 10Gbps | |
USB 3.2 Gen 1×2 | USB 3.2 | 8b/10b | 4 FDx (+ 1HDx) | 10 Gbit/s symmetric | |||
USB 3.2 Gen 2×2 | 128b/132b | 4 FDx (+ 1HDx) | 20 Gbit/s symmetric | SuperSpeed USB 20Gbps | |||
USB4 Gen 2×1 | USB4 | 64b/66b[b] | 2 FDx (+ 1HDx) | 10 Gbit/s symmetric | Type C | ||
USB4 Gen 2×2 | 4 FDx (+ 1HDx) | 20 Gbit/s symmetric | USB4 20Gbps | ||||
USB4 Gen 3×1 | 128b/132b[b] | 2 FDx (+ 1HDx) | 20 Gbit/s symmetric | ||||
USB4 Gen 3×2 | 4 FDx (+ 1HDx) | 40 Gbit/s symmetric | USB4 40Gbps | ||||
USB4 Gen 4 | USB4 version 2.0 | PAM-3 11b/7t | 4 FDx (+ 1HDx) | 80 Gbit/s symmetric | USB4 80Gbps | ||
40 Gbit/s up 120 Gbit/s down | |||||||
120 Gbit/s up 40 Gbit/s down | |||||||
Note: | |||||||
1、1HDx为DP DM这组差分线 | |||||||
2、2 FDx为Tx+ Tx-和Rx+ Rx-这两组差分线 | |||||||
参考文献:https://en.wikipedia.org/wiki/USB#Signaling |
Connector如下图1),图中的USB 3.0为 Type A SuperSpeed。
USB power standards
各标准所支持的传输功率(电压和电流)如下表。
Specification | Current | Voltage | Power (max.) |
Low-power device | 100 mA | 5V 4.4~5.25V | 0.50 W |
Low-power SuperSpeed (USB 3.0) device | 150 mA | 5V | 0.75 W |
High-power device | 500 mA | 5V 4.75~5.25V | 2.5 W |
High-power SuperSpeed (USB 3.0) device | 900 mA | 5V | 4.5 W |
USB 3.2 Gen 2×1 device | 1.5 A | 5V | 7.5 W |
Battery Charging (BC) 1.1 | 1.5 A | 5V | 7.5 W |
Battery Charging (BC) 1.2 | 1.5 A | 5V | 7.5 W |
USB-C (single-lane) | 1.5 A | 5V | 7.5 W |
USB-C (multi-lane) | 3 A | 5V | 15 W |
Power Delivery 1.0/2.0/3.0 Type-C | 5 A | 5V 9V 15V 20V | 100 W |
Power Delivery 3.1 Type-C | 5 A | 5V 9V 15V 20V 28V 36V 48V | 240 W |
参考文献: https://en.wikipedia.org/wiki/USB#Low-power_and_high-power_devices Universal Serial Bus Specification Revision 2.0: Table 7-7. DC Electrical Characteristics |
原理图设计
信号连接如下图,USB_DM和USB_DP为USB2.0差分信号线,USB_SS_xxx为USB3.0信号线。
说明如下几点:
- USB设备有Host和Device两种,有些芯片支持一种,有些芯片有USBID可以切换这两种状态,一般拉高为Device,拉低为Host。
- Device的供电可以自己供电,也可以由Host的Vbus提供。
- Device插入Host设备的插入识别,Device设备一般通过Vbus来检测(注意Vbus的电压范围,不同的芯片差异大),如果没有Vbus,Device设备也可以主动建立USB连接。
- 对于Type-C接口,需要主要CC1和CC2的处理,如果Type-C接口只是支持USB2.0,则此两个引脚需要下拉5.1K电阻(这样才能被Type-C Host识别)。
- 差分信号线上可以加共摸滤波器滤除干扰,其会影响差分信号,非必要不添加。共摸滤波器需要注意其阻抗和USB差分阻抗相近,且截止频率大于USB2.0或USB3.0等的工作频率。
- 差分信号线上的esd器件,需要注意其寄生电容,一般USB2.0小于1pF,USB3.1小于0.15pF。
对于外置USB头,其外面金属的接地,和系统地之间,推荐增加RC滤波器,优化EMI和ESD,如下图所示2)。
PCB设计
USB2.0 DP-DM差分线3):
- 差分阻抗90 Ω +5/-10Ω(具体阻抗参考芯片Datasheet),
- 差分线内等长差小于1.25mm(50mil)(对于模块需考虑其内部的等长差),线长尽量短总长应小于15cm。
USB3.1 SS_TX+/- SS_RX+/-差分线:
- 差分阻抗85 Ω +10/-5Ω(具体阻抗参考芯片Datasheet),
- 差分线内等长差小于0.05mm(2mil)(对于模块需考虑其内部的等长差),线长尽量短总长应小于10cm。
- 差分线对(TX~RX)之间无严格要求,推荐10mm。
USB3.1 SS_TX+/-端的AC耦合电容(0.1uF)靠近Tx放置。
USB连接器
各USB连接器的pin脚定义如下4):
USB Type A and B
USB Mini B
USB Micro A and B
USB Type A and B superspeed
USB Micro B superspeed
USB Type C
参考文档 Universal Serial Bus Type-C Cable and Connector Specification
Figure 2-1 USB Type-C Receptacle Interface (Front View)
Figure 2-2 USB Full-Featured Type-C Plug Interface (Front View)
Table 3-4 USB Type-C Receptacle Interface Pin Assignments
Pin | Signal Name | Description | Mating Sequence | Pin | Signal Name | Description | Mating Sequence |
A1 | GND | Ground return | First | B12 | GND | Ground return | First |
A2 | TXp1 | Positive half of first TX differential pair | Second | B11 | RXp1 | Positive half of first RX differential pair | Second |
A3 | TXn1 | Negative half of first TX differential pair | Second | B10 | RXn1 | Negative half of first RX differential pair | Second |
A4 | Vbus | Bus Power | First | B9 | VBus | Bus Power | First |
A5 | CC1 | Configuration Channel | Second | B8 | SBU2 | Sideband Use(SBU) | Second |
A6 | Dp1 | Positive half of the USB 2.0 differential pair- Position 1 | Second | B7 | Dn2 | Negative half of the USB 2.0 differential pair-Position 2 | Second |
A7 | Dn1 | Negative half of the USB 2.0 differential pair- Position 1 | Second | B6 | Dp2 | Positive half of the USB 2.0 differential pair-Position 2 | Second |
A8 | SBU1 | Sideband Use(SBU) | Second | B5 | CC2 | Configuration Channel | Second |
A9 | VBus | Bus Power | First | B4 | VBus | Bus Power | First |
A10 | RXn2 | Negative half of second RX differential pair | Second | B3 | TXn2 | Negative half of second TX differential pair | Second |
A11 | RXp2 | Positive half of second RX differential pair | Second | B2 | TXp2 | Positive half of second TX differential pair | Second |
A12 | GND | Ground return | First | B1 | GND | Ground return | First |
特殊管脚说明5):
CC1和CC2针脚:
这些引脚是通道配置引脚。它们执行许多功能,例如电缆连接和移除检测、插座/插头方向检测和当前广播。这些引脚也可用于Power Delivery和Alternate Mode所需的通信。
下面的图4显示了CC1和CC2引脚如何显示插座/插头方向。在此图中,DFP代表下游面向端口,该端口充当数据传输中的主机或电源。UFP表示上游面向端口,它是连接到主机或电力消费者的设备。
DFP通过Rp电阻上拉CC1和CC2引脚,但UFP通过Rd将它们拉低。如果没有连接电缆,则源在CC1和CC2引脚处看到逻辑高电平。连接USB Type-C电缆可创建从5V电源到地的电流路径。
由于USB Type-C电缆内只有一根CC线,因此只形成一条电流路径。例如,在图4的上图中,DFP的CC1引脚连接到UFP的CC1引脚。因此,DFP CC1引脚的电压低于5 V,但DFP CC2引脚仍处于逻辑高电平。因此,监控DFP CC1和CC2引脚上的电压,我们可以确定电缆连接及其方向。
除电缆方向外,Rp-Rd路径还用作传递源电流能力信息的方式。为此,功耗(UFP)监视CC线上的电压。当CC线上的电压具有其最低值(约0.41 V)时,源可以分别为USB 2.0和USB 3.0提供500 mA和900 mA的默认USB电源。当CC线电压约为0.92 V时,源可提供1.5 A的电流。最高CC线电压约为1.68 V,对应于3A的源电流能力。
详细的可参考 Universal Serial Bus Type-C Cable and Connector Specification 4.5.1.2。
VCONN引脚:
如上所述,USB Type-C旨在提供超快的数据传输速度以及高水平的功率流。这些特征可能需要使用通过在内部使用芯片进行电子标记的特殊电缆。此外,一些有源电缆利用重新驱动芯片来加强信号并补偿电缆等引起的损耗。在这些情况下,我们可以通过施加5 V、1 W电源为电缆内部的电路供电提供给VCONN引脚。
如您所见,有源线缆使用Ra电阻来下拉CC2引脚。Ra的值与Rd不同,因此DFP仍然可以通过检查DFP CC1和CC2引脚上的电压来确定电缆方向。确定电缆方向后,与“有源电缆IC”对应的通道配置引脚将连接到5 V,1 W电源,为电缆内部的电路供电。例如,在图5中,有效的Rp-Rd路径对应于CC1引脚。因此,CC2引脚连接到VCONN表示的电源
测试
是德推荐的测试方案见文档:最新USB Type-C®互连一致性测试
USB架构
Electrical Characteristics
USB1.0和2.0的电特性要求如下表:
Table 7-7. DC Electrical Characteristics 9) | |||||
Parameter | Symbol | Conditions | Min. | Max. | Units |
Output Levels for Low-/full-speed: | |||||
Low | VOL | Note 4, 5, Section 7.1.1 | 0 | .3 | V |
High (Driven) | VOH | Note 4, 6, Section 7.1.1 | 2.8 | 3.6 | V |
(D+) - (D-) | >200mV | ||||
(D-) - (D+) | <200mV | ||||
Output Levels for High-speed: | |||||
High-speedidlelevel | VHSOI | Section7.1.7.2 | -10 | 10 | mV |
High-speeddatasignalinghigh | VHSOH | Section7.1.7.2 | 360 | 440 | mV |
(D+) - (D-) | > =300mV | ||||
(D-) - (D+) | < =300mV |
Vbus上的并联电容不能超过10 μF10)。
模式识别
USB采用在D+或D-线上增加上拉电阻的方法来识别低速和全速设备11) 12)。
如下图,D-通过1.5K电阻上拉为低速设备13),D+通过1.5K电阻上拉为全速设备14)。
高速设备是以一个全速设备的身份出现的,即和全速设备一样,高速设备也在D+端有一个1.5K的上拉电阻。USB2.0的HUB把设备当成一个全速设备,然后进行一系列的握手信号来确认双方的身份。
测试
待办事项
USB的初始化流程
评论