---
title: USB 与 Type-C
url: https://doc.liz6.com/hardware/06-interfaces-and-communication/03-usb-and-type-c
locale: zh
area: hardware
tags:
- hardware
- 接口与通信
date: 2026-06-30
modified: 2026-07-11
description: USB 与 Type-C USB 版本演进 速度世代 (忽略那场命名灾难) 连接器演进 --- USB 电气与拓扑 差分信号 拓扑 USB 物理拓扑:Host 为根的树形结构 Host (主控) Hub Hub Device Device Device 树形结构,最多 7 层(含 Root Hub);Host 发起所有…
---

# USB 与 Type-C

## USB 版本演进

### 速度世代 (忽略那场命名灾难)

```
实际速度 (用市场名):

USB 2.0 (High Speed):   480 Mbps
USB 3.0 (SuperSpeed):   5 Gbps    ← 也叫 USB 3.1 Gen1 / USB 3.2 Gen1
USB 3.1 (SuperSpeed+):  10 Gbps   ← 也叫 USB 3.1 Gen2 / USB 3.2 Gen2
USB 3.2 (SuperSpeed 2x2): 20 Gbps  ← 双通道, 必须 Type-C
USB4 20Gbps:             20 Gbps   ← 基于 Thunderbolt 3
USB4 40Gbps:             40 Gbps   ← 基于 Thunderbolt 3

命名混乱史 (如果看到这些名字):
  USB 3.1 Gen1 = USB 3.0 = 5 Gbps
  USB 3.1 Gen2 = USB 3.2 Gen2 = 10 Gbps
  USB 3.2 Gen1x1 = USB 3.0 = 5 Gbps (again...)
  USB 3.2 Gen2x2 = 20 Gbps

规则: 别看名字, 直接问 "多少 Gbps"
```

### 连接器演进

```
Type-A: 经典方口, 单向插入 (永远插三次才对)
  USB 2.0: 4 引脚 (VBUS/D-/D+/GND)
  USB 3.0: 9 引脚 (多了5根高速差分对)

Type-B: 方口, 打印机/Arduino/旧设备
  USB 3.0 版多了一坨凸起

Mini-USB: 已淘汰 (MP3/旧手机时代)
Micro-USB: 手机时代过渡品, 正被 Type-C 取代
  Micro-B 3.0: 宽得离谱的"扁口"

Type-C: 统一一切的接口 ★
  24 引脚, 正反插, 支持 USB + DP + PD 同时传输
```

---

## USB 电气与拓扑

### 差分信号
```
D+/D- (USB 2.0): 半双工差分, 3.3V
  速度检测: D+ 上拉=Full Speed, D- 上拉=Low Speed

SSTX+/SSTX- (USB 3.x 发送): 全双工差分
SSRX+/SSRX- (USB 3.x 接收): 全双工差分
```

### 拓扑
<svg viewBox="0 0 720 220" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="USB 物理拓扑:Host 为根的树形结构,最多 7 层">
  <rect width="720" height="220" fill="#ffffff"/>
  <defs><marker id="mk-topo" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">USB 物理拓扑:Host 为根的树形结构</text>

  <rect x="30" y="86" width="90" height="44" rx="8" fill="#4f46e5"/>
  <text x="75" y="103" text-anchor="middle" font-size="12" font-weight="700" fill="#ffffff">Host</text>
  <text x="75" y="118" text-anchor="middle" font-size="10" fill="#ffffff">(主控)</text>

  <rect x="180" y="88" width="80" height="40" rx="7" fill="#e2e8f0"/>
  <text x="220" y="112" text-anchor="middle" font-size="12" font-weight="700" fill="#334155">Hub</text>

  <rect x="330" y="54" width="80" height="40" rx="7" fill="#e2e8f0"/>
  <text x="370" y="78" text-anchor="middle" font-size="12" font-weight="700" fill="#334155">Hub</text>

  <rect x="480" y="54" width="110" height="40" rx="7" fill="#ccfbf1" stroke="#99f6e4"/>
  <text x="535" y="78" text-anchor="middle" font-size="12" font-weight="700" fill="#0f766e">Device</text>

  <rect x="480" y="104" width="110" height="36" rx="7" fill="#ccfbf1" stroke="#99f6e4"/>
  <text x="535" y="126" text-anchor="middle" font-size="12" font-weight="700" fill="#0f766e">Device</text>

  <rect x="330" y="140" width="110" height="36" rx="7" fill="#ccfbf1" stroke="#99f6e4"/>
  <text x="385" y="162" text-anchor="middle" font-size="12" font-weight="700" fill="#0f766e">Device</text>

  <line x1="120" y1="108" x2="176" y2="108" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>
  <line x1="236" y1="92" x2="326" y2="76" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>
  <line x1="410" y1="74" x2="476" y2="74" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>
  <line x1="392" y1="94" x2="476" y2="116" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>
  <line x1="232" y1="128" x2="326" y2="152" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>

  <rect x="40" y="184" width="640" height="30" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="360" y="204" text-anchor="middle" font-size="12.5" fill="#3730a3">树形结构,最多 7 层(含 Root Hub);Host 发起所有传输,Device 不能主动发起。</text>
</svg>

### 传输类型
| 类型 | 特点 | 应用 |
|------|------|------|
| 控制 (Control) | 可靠、有保证带宽 | 枚举/配置 |
| 批量 (Bulk) | 可靠、无保证延迟 | 文件/数据 |
| 中断 (Interrupt) | 可靠、有保证延迟 | 键盘/鼠标 |
| 等时 (Isochronous) | 无重传、有保证带宽 | 音频/视频 |

---

## USB 设备枚举

<svg viewBox="0 0 720 420" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="USB 设备枚举流程与描述符层级结构">
  <rect width="720" height="420" fill="#ffffff"/>
  <defs><marker id="mk-enum1" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <text x="360" y="26" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">USB 枚举:插入到就绪,再到描述符逐层细化</text>

  <text x="20" y="46" font-size="13" font-weight="700" fill="#1f2933">枚举流程(插入 → 设备就绪)</text>

  <rect x="20" y="54" width="100" height="36" rx="6" fill="#e2e8f0"/>
  <text x="70" y="76" text-anchor="middle" font-size="11" font-weight="700" fill="#334155">插入</text>

  <rect x="135" y="54" width="170" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="220" y="76" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host 检测 D+/D- 上拉</text>

  <rect x="320" y="54" width="160" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="400" y="76" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host 复位总线(SEO)</text>

  <rect x="495" y="54" width="200" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="595" y="76" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host 分配地址(SET_ADDRESS)</text>

  <line x1="120" y1="72" x2="133" y2="72" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="305" y1="72" x2="318" y2="72" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="480" y1="72" x2="493" y2="72" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>

  <polyline points="595,90 595,95 150,95 150,100" fill="none" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>

  <rect x="20" y="100" width="260" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="150" y="122" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host 读取设备描述符(VID/PID/Class)</text>

  <rect x="300" y="100" width="180" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="390" y="122" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host 加载对应驱动</text>

  <rect x="500" y="100" width="170" height="36" rx="6" fill="#dcfce7" stroke="#4ade80"/>
  <text x="585" y="122" text-anchor="middle" font-size="12" font-weight="700" fill="#166534">设备就绪</text>

  <line x1="280" y1="118" x2="298" y2="118" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="480" y1="118" x2="498" y2="118" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>

  <line x1="20" y1="148" x2="700" y2="148" stroke="#e2e8f0" stroke-width="1"/>

  <text x="20" y="168" font-size="13" font-weight="700" fill="#1f2933">描述符层级(从属关系,逐层细化)</text>

  <rect x="20" y="180" width="300" height="34" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="34" y="197" font-size="12" font-weight="700" fill="#3730a3">Device Descriptor</text>
  <text x="34" y="209" font-size="10" fill="#4f46e5">VID/PID/厂商/产品</text>

  <rect x="70" y="224" width="320" height="34" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="84" y="241" font-size="12" font-weight="700" fill="#3730a3">Configuration Descriptor</text>
  <text x="84" y="253" font-size="10" fill="#4f46e5">功耗/接口数</text>

  <rect x="120" y="268" width="340" height="34" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="134" y="285" font-size="12" font-weight="700" fill="#3730a3">Interface Descriptor</text>
  <text x="134" y="297" font-size="10" fill="#4f46e5">HID / MSC / CDC ...</text>

  <rect x="170" y="312" width="360" height="34" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="184" y="329" font-size="12" font-weight="700" fill="#3730a3">Endpoint Descriptor</text>
  <text x="184" y="341" font-size="10" fill="#4f46e5">端点地址/方向/类型</text>

  <line x1="40" y1="214" x2="88" y2="224" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="90" y1="258" x2="138" y2="268" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="140" y1="302" x2="188" y2="312" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>

  <rect x="20" y="358" width="680" height="50" rx="8" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="34" y="378" font-size="12.5" fill="#3730a3">描述符层层从属:Configuration 定义功耗与接口数,Interface 声明设备类(Class),</text>
  <text x="34" y="396" font-size="12.5" fill="#3730a3">Endpoint 才是实际收发数据的通道 —— 驱动匹配靠 Interface 的 Class。</text>
</svg>

---

## Type-C 详解

### 引脚 (24 pin, 正反对称)
```
A面 (上):                    B面 (下):
GND  TX1+ TX1-  VBUS  CC1   GND  RX2+ RX2-  VBUS  SBU2
D+   D-   SBU1  VBUS  RX1-  D-   D+   SBU1  VBUS  TX2-
                                   (镜像对称!)

GND  RX1+ RX1-  VBUS  SBU1  GND  TX2+ TX2-  VBUS  SBU2  ← 翻转后

关键引脚:
  CC1/CC2: 检测插入方向 + PD 协议通信
  SBU1/SBU2: DP Alt Mode 的 AUX 通道
  D+/D-: USB 2.0 兼容
  4对 SuperSpeed 差分 (TX1/RX1/TX2/RX2)
```

### CC 引脚的作用
```
1. 检测插入方向 (哪一面在上)
2. 检测对端是 Host/Device/电源
3. 通过 Rp/Rd 电阻值通告电流能力:
   - USB Default: 500mA (5V)
   - USB 1.5A:    1.5A  (5V)
   - USB 3.0A:    3.0A  (5V)
4. 作为 USB PD 通信的物理层 (BMC 编码, 300kbps)
```

### Alt Mode
```
Type-C 的 4 对 SuperSpeed 通道可重新配置:

DisplayPort Alt Mode:
  2 lane DP + USB 3.2 → 4K@60Hz + 数据传输
  4 lane DP           → 5K@60Hz 或 8K@30Hz

Thunderbolt Alt Mode: 40Gbps PCIe + DP
HDMI Alt Mode: 不流行, 多数用 DP Alt Mode 转换
```

---

## USB Power Delivery (USB PD)

### PD 3.1 电压档位
```
PD 3.0 (最高 100W):
  5V/9V/15V/20V @ 5A = 100W

PD 3.1 EPR (最高 240W):
  新增 28V/36V/48V @ 5A = 240W

PPS (Programmable Power Supply):
  电压可 20mV 步进调节
  电流可 50mA 步进限制
  → 手机直接控制充电器的电压/电流, 无需手机内部降压
```

### PD 通信流程
<svg viewBox="0 0 720 320" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="USB PD 电源协商流程:Source 与 Sink 通过 CC 线握手">
  <rect width="720" height="320" fill="#ffffff"/>
  <defs><marker id="mk-pd" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">USB PD 协商:Source 与 Sink 通过 CC 线握手</text>

  <rect x="60" y="50" width="140" height="44" rx="8" fill="#4f46e5"/>
  <text x="130" y="68" text-anchor="middle" font-size="12" font-weight="700" fill="#ffffff">Source</text>
  <text x="130" y="83" text-anchor="middle" font-size="10" fill="#ffffff">(充电器)</text>

  <rect x="520" y="50" width="140" height="44" rx="8" fill="#0d9488"/>
  <text x="590" y="68" text-anchor="middle" font-size="12" font-weight="700" fill="#ffffff">Sink</text>
  <text x="590" y="83" text-anchor="middle" font-size="10" fill="#ffffff">(设备)</text>

  <line x1="130" y1="94" x2="130" y2="256" stroke="#cbd5e1" stroke-width="1.5" stroke-dasharray="4 3"/>
  <line x1="590" y1="94" x2="590" y2="256" stroke="#cbd5e1" stroke-width="1.5" stroke-dasharray="4 3"/>

  <line x1="130" y1="118" x2="590" y2="118" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-pd)"/>
  <text x="360" y="112" text-anchor="middle" font-size="11" fill="#475569">① 广播能力:5V/3A、9V/3A、15V/3A、20V/5A</text>

  <line x1="590" y1="156" x2="130" y2="156" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-pd)"/>
  <text x="360" y="150" text-anchor="middle" font-size="11" fill="#475569">② 请求:我要 20V/3A</text>

  <line x1="130" y1="194" x2="590" y2="194" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-pd)"/>
  <text x="360" y="188" text-anchor="middle" font-size="11" fill="#475569">③ 接受 → 切换到 20V 输出</text>

  <line x1="130" y1="230" x2="590" y2="230" stroke="#475569" stroke-width="1.6" stroke-dasharray="5 4" marker-end="url(#mk-pd)"/>
  <text x="360" y="224" text-anchor="middle" font-size="11" fill="#475569">④ 持续协商:PPS 动态调整(双向)</text>

  <rect x="40" y="264" width="640" height="42" rx="8" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="56" y="290" font-size="12.5" fill="#115e59">通信协议:USB PD 基于 Type-C CC 引脚,BMC 编码 300kbps;PPS 可 20mV/50mA 步进持续微调。</text>
</svg>

---

## 常用 USB 类 (Class)

| Class | 名称 | 无需驱动? | 例子 |
|-------|------|-----------|------|
| HID | 人机接口 | ✅ 系统自带 | 键盘/鼠标/手柄 |
| MSC | 大容量存储 | ✅ | U盘/移动硬盘 |
| CDC | 通信设备 | ❌ (需驱动) | USB转串口 |
| CDC-ACM | 抽象控制模型 | ✅ | 虚拟串口 (Arduino) |
| CDC-NCM | 网络控制模型 | ❌ | USB 网卡 |
| Audio | 音频 | ✅ (UAC 1.0) | USB 耳机/声卡 |
| Video | 视频 | ✅ (UVC) | 摄像头 |
| DFU | 设备固件升级 | - | 刷固件用 |
| MIDI | 音乐设备 | ✅ | MIDI 键盘 |

---

## 速查

```
想要充电快 → 看 PD 功率 (W), 不是看 W/QC/闪充营销词
想要速度快 → 看实际 Gbps, 不是看 USB 3.x GenXxX 名字
Type-C ≠ USB 3.x (可以是 USB 2.0 only 的 Type-C)
Type-C ≠ 支持 PD (有些 Type-C 口只有 5V)
Type-C ≠ 支持视频输出 (需要 DP Alt Mode)

看规格要认: 什么规范, 多少功率, 多少速度, 支不支持视频
```

---
*关键词: USB, Type-C, PD, PPS, Alt Mode, CC引脚, HID, CDC, 枚举, 描述符*
