当前位置: 首页 > news >正文

USB2.0 Spec

USB System Description

A USB system is described by three definitional areas:
• USB interconnect
• USB devices
• USB host

USB interconnect

The USB interconnect is the manner in which USB devices are connected to and communicate with the host.

USB Host

There is only one host in any USB system.
The USB interface to the host computer system is referred to as the Host Controller.
The Host Controller may be implemented in a combination of hardware, firmware, or software.
A root hub is integrated within the host system to provide one or more attachment points.

USB Devices

USB devices are one of the following:
Hubs, which provide additional attachment points to the USB
Functions, which provide capabilities to the system, such as an ISDN connection, a digital joystick, or speakers

Function <==> Device

USB devices are divided into device classes such as hub, human interface, printer, imaging, or mass storage
device.

All USB devices are accessed by a USB address that is assigned when the device is attached and
enumerated.

Electrical

The USB transfers signal and power over a four-wire cable,The signaling occurs over
two wires on each point-to-point segment.
在这里插入图片描述

Power

The cable also carries VBUS and GND wires on each segment to deliver power to devices. VBUS is
nominally +5 V at the source.

data rates

• The USB high-speed signaling bit rate is 480 Mb/s.
• The USB full-speed signaling bit rate is 12 Mb/s.
• A limited capability low-speed signaling mode is also defined at 1.5 Mb/s.

在这里插入图片描述

Clock

The clock is transmitted, encoded along with the differential data. The clock encoding scheme is NRZI
with bit stuffing to ensure adequate transitions. A SYNC field precedes each packet to allow the receiver(s)
to synchronize their bit recovery clocks.

In NRZI encoding, a “1” is represented by no change in level and a “0” is represented by a change in level.
在这里插入图片描述

Attachment of USB Devices

All USB devices attach to the USB through ports on specialized USB devices known as hubs. Hubs have
status bits that are used to report the attachment or removal of a USB device on one of its ports. The host
queries the hub to retrieve these bits. In the case of an attachment, the host enables the port and addresses
the USB device
through the device’s control pipe at the default address.
The host assigns a unique USB address to the device and then determines if the newly attached USB device
is a hub or a function.
If the attached USB device is a hub and USB devices are attached to its ports, then the above procedure is
followed for each of the attached USB devices.
If the attached USB device is a function, then attachment notifications will be handled by host software that
is appropriate for the function.

Removal of USB Devices

When a USB device has been removed from one of a hub’s ports, the hub disables the port and provides an
indication of device removal to the host. The removal indication is then handled by appropriate USB
System Software. If the removed USB device is a hub, the USB System Software must handle the removal
of both the hub and of all of the USB devices that were previously attached to the system through the hub.

Bus Enumeration

Bus enumeration is the activity that identifies and assigns unique addresses to devices attached to a bus.
Because the USB allows USB devices to attach to or detach from the USB at any time, bus enumeration is
an on-going activity for the USB System Software.

Data Flow Types

  • Control Transfers
    • Control data is used by the USB System Software to configure devices when they are first attached
  • Bulk Data Transfer
    • Bulk data typically consists of larger amounts of data, such as that used for printers or scanners.
    • Bulk data is sequential.
  • Interrupt Data Transfers
  • Isochronous Data Transfers

A pipe supports only one of the types of transfers described above for any given device configuration.

Physical Bus Topology

在这里插入图片描述
A composite device has only a single device address.
A device that has multiple interfaces controlled independently of each other is referred to as a composite device.

Logical Bus Topology

While devices physically attach to the USB in a tiered, star topology, the host communicates with each
logical device as if it were directly connected to the root port.
在这里插入图片描述

USB Communication Flow

在这里插入图片描述

Client Software-to-function Relationship

在这里插入图片描述

EndPoints

An endpoint is a uniquely identifiable portion of a USB device that is the terminus of a communication flow
between the host and device.
Each endpoint on a device is given at design time a unique device-determined identifier called the endpoint
number
.
The combination of the device address, endpoint number, and direction allows each endpoint to be uniquely referenced.
在这里插入图片描述

Pipes

A USB pipe is an association between an endpoint on a device and software on the host.
Pipes represent the ability to move data between software on the host via a memory buffer and an endpoint on a device.
There are two mutually exclusive pipe communication modes:
Stream: Data moving through a pipe has no USB-defined structure
Message: Data moving through a pipe has some USB-defined structure

Transfer Management

在这里插入图片描述

Mechanical

在这里插入图片描述
在这里插入图片描述

Icon

在这里插入图片描述

USB Connector Termination Data

在这里插入图片描述

Frame

在这里插入图片描述

USB Device States

在这里插入图片描述

  • Attached
  • Powered
    • USB devices may obtain power from an external source and/or from the USB through the hub to which they
      are attached.
  • Default
    • After the device has been powered, it must not respond to any bus transactions until it has received a reset
      from the bus.After receiving a reset, the device is then addressable at the default address.
  • Address
    • All USB devices use the default address when initially powered or after the device has been reset.
    • Each USB device is assigned a unique address by the host after attachment or after reset.
    • A USB device responds to requests on its default pipe whether the device is currently assigned a unique
      address or is using the default address.
  • Configured
    • Before a USB device’s function may be used, the device must be configured.
  • Suspended
    • In order to conserve power, USB devices automatically enter the Suspended state when the device has
      observed no bus traffic for a specified period.

USB Host

The USB System has three basic components:
• Host Controller Driver
• USB Driver
• Host Software

The Host Controller Driver (HCD) exists to more easily map the various Host Controller implementations
into the USB System, such that a client can interact with its device without knowing to which Host
Controller the device is connected.
The USB Driver (USBD) provides the basic host interface (USBDI) for clients to USB devices.
The client layer describes all the software entities that are responsible for directly interacting with USB
devices.

Device Configuration

在这里插入图片描述
When a device is attached, the hub driver receives a notification from the hub detecting the change.
The hub driver, using the information provided by the hub, requests a device identifier from the USBD.
The device is now ready to be configured for use. For each device, there are three configurations that must
be complete before that device is ready for use:

  1. Device Configuration: This includes setting up all of the device’s USB parameters and allocating all
    USB host resources that are visible to the device. This is accomplished by setting the configuration
    value on the device. A limited set of configuration changes, such as alternate settings, is allowed
    without totally reconfiguring the device. Once the device is configured, it is, from its point of view,
    ready for use.
  2. USB Configuration: In order to actually create a USBD pipe ready for use by a client, additional USB
    information, not visible to the device, must be specified by the client. This information, known as the
    Policy for the pipe, describes how the client will use the pipe. This includes such items as the
    maximum amount of data the client will transfer with one IRP, the maximum service interval the client
    will use, the client’s notification identification, and so on.
  3. Function Configuration: Once configuration types 1 and 2 have been accomplished, the pipe is
    completely ready for use from the USB’s point of view. However, additional vendor- or class-specific
    setup may be required before the client can actually use the pipe. This configuration is a private matter
    between the device and the client and is not standardized by the USBD.

相关文章:

USB2.0 Spec

USB System Description A USB system is described by three definitional areas: • USB interconnect • USB devices • USB host USB interconnect The USB interconnect is the manner in which USB devices are connected to and communicate with the host. USB Ho…...

prbs测试

PRBS是 Pseudo Random Binary Sequence 的简称,是一种伪随机序列,用于产生随机数据。 PRBS检测主要应用在设备开局或维护期间,在没有合适误码仪的情况下,使能了PRBS检测功能的设备自行发送PRBS码流,PRBS码流通过被测试网络,经远端设备环回(远端设备需要配置环回),经过PR…...

计算机网络:数据链路层(VLAN)

今天又学到一个知识&#xff0c;加油&#xff01; 目录 一、传统局域网的局限&#xff08;促进VLAN的诞生&#xff09; 二、VLAN简介 三、VLAN的实现 总结 一、传统局域网的局限&#xff08;促进VLAN的诞生&#xff09; 缺乏流量隔离:即使把组流量局域化道一个单一交换机中…...

C# WPF上位机开发(动态添加控件)

【 声明&#xff1a;版权所有&#xff0c;欢迎转载&#xff0c;请勿用于商业用途。 联系信箱&#xff1a;feixiaoxing 163.com】 写图形界面软件的时候&#xff0c;我们经常会遇到一种情况。那就是图形界面上面&#xff0c;显示的控件可能是不定的。有可能多&#xff0c;也有可…...

MySQL进阶|MySQL中的事务(一)

文章目录 数据库事务MySQL中的存储引擎InnoDB存储引擎架构什么是事务事务的状态总结 数据库事务 MySQL 事务主要用于处理操作量大&#xff0c;复杂度高的数据。比方我想要删除一个用户&#xff08;销户&#xff09;以及这个用户的个人信息、订单信息以及其他信息&#xff0c;这…...

设计模式策略模式讲解和代码示例

引言 策略是一种行为设计模式, 它将一组行为转换为对象, 并使其在原始上下文对象内部能够相互替换。 原始对象被称为上下文, 它包含指向策略对象的引用并将执行行为的任务分派给策略对象。 为了改变上下文完成其工作的方式, 其他对象可以使用另一个对象来替换当前链接的策…...

Qt容器QStackedWidget小部件堆栈

# QStackedWidget QStackedWidget是Qt框架中的一个控件,用于在同一区域显示多个子控件,只有一个子控件可见。以下是一些常用的QStackedWidget函数: addWidget(QWidget *widget):向QStackedWidget中添加一个子控件。 insertWidget(int index, QWidget *widget):在指定位置…...

设计模式 简单工厂 工厂方法模式 抽象工厂模式 Spring 工厂 BeanFactory 解析

工厂模式介绍 工厂模式是我们最常用的实例化对象模式了&#xff0c;是用工厂方法代替new操作的一种模式。它是创建型模式。 简单工厂 简单工厂模式是指由一个工厂对象决定创建出哪一种产品类的实例, 但它不属于GOF 23种设计模式 简单工厂适用于工厂类负责创建的对象较少的场景,…...

【Hive_03】单行函数、聚合函数、窗口函数、自定义函数、炸裂函数

1、函数简介2、单行函数2.1 算术运算函数2.2 数值函数2.3 字符串函数&#xff08;1&#xff09;substring 截取字符串&#xff08;2&#xff09;replace 替换&#xff08;3&#xff09;regexp_replace 正则替换&#xff08;4&#xff09;regexp 正则匹配&#xff08;5&#xff…...

RabbitMQ手动应答与持久化

1.SleepUtil线程睡眠工具类 package com.hong.utils;/*** Description: 线程睡眠工具类* Author: hong* Date: 2023-12-16 23:10* Version: 1.0**/ public class SleepUtil {public static void sleep(int second) {try {Thread.sleep(1000*second);} catch (InterruptedExcep…...

java使用枚举类型解决if-else大量堆积

调用代码 import com.example.javaone.kk.MyEnum;public class Gst {public static void main(String[] args) {MyEnum eMyEnum.getById(1);System.out.println(e.getGetSize());} }被调用代码 package com.example.javaone.kk; public enum MyEnum {ENUM1(1,2),ENUM2(2,3),E…...

【数据结构】八大排序之直接插入排序算法

&#x1f984;个人主页:修修修也 &#x1f38f;所属专栏:数据结构 ⚙️操作环境:Visual Studio 2022 一.直接插入排序简介及思路 直接插入排序(Straight Insertion Sort)是一种简单直观的插入排序算法. 它的基本操作是: 将一个数据插入到已经排好的有序表中,从而得到一个新的,数…...

网络编程『socket套接字 ‖ 简易UDP网络程序』

&#x1f52d;个人主页&#xff1a; 北 海 &#x1f6dc;所属专栏&#xff1a; Linux学习之旅、神奇的网络世界 &#x1f4bb;操作环境&#xff1a; CentOS 7.6 阿里云远程服务器 文章目录 &#x1f324;️前言&#x1f326;️正文1.预备知识1.1.IP地址1.2.端口号1.3.端口号与进…...

FreeSWITCH rtp endpoint recvonly

查了下rtp.c的源码&#xff0c;远端端口为0就意味着recvonly&#xff0c;但其实不然&#xff0c;调用switch_rtp_new会马上返回失败 经过反复测试&#xff0c;增加下面几行代码之后终于变成了recvonly: tech_pvt->mode RTP_RECVONLY; rtp_flags[SWITCH_RTP_FLAG_AUTOADJ];…...

Hadoop和Spark的区别

Hadoop 表达能力有限。磁盘IO开销大&#xff0c;延迟度高。任务和任务之间的衔接涉及IO开销。前一个任务完成之前其他任务无法完成&#xff0c;难以胜任复杂、多阶段的计算任务。 Spark Spark模型是对Mapreduce模型的改进&#xff0c;可以说没有HDFS、Mapreduce就没有Spark。…...

英文论文降重修改技巧 papergpt

大家好&#xff0c;今天来聊聊英文论文降重修改技巧&#xff0c;希望能给大家提供一点参考。 以下是针对论文重复率高的情况&#xff0c;提供一些修改建议和技巧&#xff0c;可以借助此类工具&#xff1a; 英文论文降重修改技巧 作为网站编辑&#xff0c;我们经常需要处理大量…...

DevOps搭建(十)-安装Harbor镜像仓库详细步骤

1、下载Harbor 官方地址&#xff1a; https://goharbor.io/ 下载地址&#xff1a; https://github.com/goharbor/harbor/tags 选择文档版本进行下载&#xff0c;这里我们选择v2.7.2版本 2、上传到服务器并解压 上传压缩包到服务器后&#xff0c;解压到/usr/local目录下&a…...

DDA 算法

CAD 算法是计算机辅助设计的算法&#xff0c;几何算法是解决几何问题的算法 CAD 算法是指在计算机辅助设计软件中使用的算法&#xff0c;用于实现各种设计和绘图功能&#xff0c;CAD 广泛应用于建筑、机械、电子等领域&#xff0c;可以大大提高设计效率和精度 绘图算法是 CAD…...

天猫数据平台-淘宝天猫数据-天猫销售数据分析:11月天猫平台滑雪运动装备行业销量翻倍!

随着天气变冷、冬季来临&#xff0c;迎来了疫情后的首个滑雪季&#xff0c;加之自冬奥会结束以来&#xff0c;大众参与冰雪运动的热度持续攀升&#xff0c;因此&#xff0c;冰雪运动的需求正集中释放。 根据相关数据显示&#xff0c;11月以来&#xff0c;全国滑雪场门票预订量较…...

使用OpenCV和PIL库读取图片的区别

OpenCV 和 PIL&#xff08;Pillow&#xff09;是两个不同的图像处理库&#xff0c;它们使用不同的数据结构来表示图像。 OpenCV 格式图像&#xff1a; OpenCV 中的图像通常表示为 NumPy 数组。这些数组可以是多维的&#xff0c;例如对于彩色图像&#xff0c;它们是三维数组&am…...

无法与IP建立连接,未能下载VSCode服务器

如题&#xff0c;在远程连接服务器的时候突然遇到了这个提示。 查阅了一圈&#xff0c;发现是VSCode版本自动更新惹的祸&#xff01;&#xff01;&#xff01; 在VSCode的帮助->关于这里发现前几天VSCode自动更新了&#xff0c;我的版本号变成了1.100.3 才导致了远程连接出…...

Linux相关概念和易错知识点(42)(TCP的连接管理、可靠性、面临复杂网络的处理)

目录 1.TCP的连接管理机制&#xff08;1&#xff09;三次握手①握手过程②对握手过程的理解 &#xff08;2&#xff09;四次挥手&#xff08;3&#xff09;握手和挥手的触发&#xff08;4&#xff09;状态切换①挥手过程中状态的切换②握手过程中状态的切换 2.TCP的可靠性&…...

【解密LSTM、GRU如何解决传统RNN梯度消失问题】

解密LSTM与GRU&#xff1a;如何让RNN变得更聪明&#xff1f; 在深度学习的世界里&#xff0c;循环神经网络&#xff08;RNN&#xff09;以其卓越的序列数据处理能力广泛应用于自然语言处理、时间序列预测等领域。然而&#xff0c;传统RNN存在的一个严重问题——梯度消失&#…...

Psychopy音频的使用

Psychopy音频的使用 本文主要解决以下问题&#xff1a; 指定音频引擎与设备&#xff1b;播放音频文件 本文所使用的环境&#xff1a; Python3.10 numpy2.2.6 psychopy2025.1.1 psychtoolbox3.0.19.14 一、音频配置 Psychopy文档链接为Sound - for audio playback — Psy…...

【决胜公务员考试】求职OMG——见面课测验1

2025最新版&#xff01;&#xff01;&#xff01;6.8截至答题&#xff0c;大家注意呀&#xff01; 博主码字不易点个关注吧,祝期末顺利~~ 1.单选题(2分) 下列说法错误的是:&#xff08; B &#xff09; A.选调生属于公务员系统 B.公务员属于事业编 C.选调生有基层锻炼的要求 D…...

【HTML-16】深入理解HTML中的块元素与行内元素

HTML元素根据其显示特性可以分为两大类&#xff1a;块元素(Block-level Elements)和行内元素(Inline Elements)。理解这两者的区别对于构建良好的网页布局至关重要。本文将全面解析这两种元素的特性、区别以及实际应用场景。 1. 块元素(Block-level Elements) 1.1 基本特性 …...

3-11单元格区域边界定位(End属性)学习笔记

返回一个Range 对象&#xff0c;只读。该对象代表包含源区域的区域上端下端左端右端的最后一个单元格。等同于按键 End 向上键(End(xlUp))、End向下键(End(xlDown))、End向左键(End(xlToLeft)End向右键(End(xlToRight)) 注意&#xff1a;它移动的位置必须是相连的有内容的单元格…...

九天毕昇深度学习平台 | 如何安装库?

pip install 库名 -i https://pypi.tuna.tsinghua.edu.cn/simple --user 举个例子&#xff1a; 报错 ModuleNotFoundError: No module named torch 那么我需要安装 torch pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple --user pip install 库名&#x…...

服务器--宝塔命令

一、宝塔面板安装命令 ⚠️ 必须使用 root 用户 或 sudo 权限执行&#xff01; sudo su - 1. CentOS 系统&#xff1a; yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh2. Ubuntu / Debian 系统…...

Mysql中select查询语句的执行过程

目录 1、介绍 1.1、组件介绍 1.2、Sql执行顺序 2、执行流程 2.1. 连接与认证 2.2. 查询缓存 2.3. 语法解析&#xff08;Parser&#xff09; 2.4、执行sql 1. 预处理&#xff08;Preprocessor&#xff09; 2. 查询优化器&#xff08;Optimizer&#xff09; 3. 执行器…...