当前位置: 首页 > 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…...

新手也能看懂的TCAD入门:用Sentaurus和Silvaco分别跑一个NPN三极管(附完整代码)

TCAD新手实战指南&#xff1a;从零开始仿真NPN三极管 1. 初识TCAD&#xff1a;半导体仿真的利器 在微电子领域&#xff0c;TCAD&#xff08;Technology Computer-Aided Design&#xff09;工具如同设计师的"数字实验室"&#xff0c;让我们能在计算机上模拟半导体器件…...

移动端大语言模型本地部署:从模型轻量化到推理引擎实战

1. 项目概述&#xff1a;当GPT遇见移动端&#xff0c;一个开源项目的诞生最近在GitHub上闲逛&#xff0c;发现了一个挺有意思的项目&#xff0c;叫Taewan-P/gpt_mobile。光看名字&#xff0c;你大概就能猜到它的核心&#xff1a;把类似GPT这样的大语言模型&#xff08;LLM&…...

【低功耗蓝牙】④ 蓝牙MIDI协议:从ESP32 MicroPython代码到智能乐器DIY

1. 蓝牙MIDI协议入门&#xff1a;从音乐小白到智能乐器开发者 第一次听说蓝牙MIDI协议时&#xff0c;我正盯着桌上的ESP32开发板发呆。作为一个只会弹几个和弦的编程爱好者&#xff0c;完全没想到自己能用代码"演奏"音乐。蓝牙MIDI就像音乐世界的通用语言&#xff0c…...

番茄小说下载器:打造属于你的个人数字图书馆终极指南

番茄小说下载器&#xff1a;打造属于你的个人数字图书馆终极指南 【免费下载链接】fanqienovel-downloader 下载番茄小说 项目地址: https://gitcode.com/gh_mirrors/fa/fanqienovel-downloader 你是否曾经遇到过这样的场景&#xff1f;深夜追更小说时网络突然断线&…...

像素艺术家紧急预警:Midjourney即将关闭--tile参数兼容性(倒计时14天),现在必须掌握的3种替代渲染方案

更多请点击&#xff1a; https://intelliparadigm.com 第一章&#xff1a;像素艺术家紧急预警&#xff1a;Midjourney即将关闭--tile参数兼容性&#xff08;倒计时14天&#xff09; Midjourney v6.5 已正式宣布将于 14 天后终止对 --tile 参数的原生支持&#xff0c;此举将直…...

终极免费换肤方案:R3nzSkin国服版完整使用教程

终极免费换肤方案&#xff1a;R3nzSkin国服版完整使用教程 【免费下载链接】R3nzSkin-For-China-Server Skin changer for League of Legends (LOL) 项目地址: https://gitcode.com/gh_mirrors/r3/R3nzSkin-For-China-Server 想要在英雄联盟国服免费体验所有皮肤&#x…...

飞书自动化工具feishu-atuo:Python积木式开发与实战指南

1. 项目概述&#xff1a;飞书自动化&#xff0c;从零到一的效率革命 如果你和我一样&#xff0c;每天的工作流里都离不开飞书&#xff0c;那你肯定也经历过这些时刻&#xff1a;手动把日报、周报从文档复制到表格里归档&#xff1b;在多个群里重复发送同样的通知&#xff1b;为…...

物联网安防系统故障排查与ESP8266固件刷写实战指南

1. 物联网安防系统故障排查实战做物联网安防系统&#xff0c;最怕的就是“哑火”。你花了好几天时间&#xff0c;把ESP8266、Raspberry Pi、MQTT Broker、Adafruit.IO和IFTTT像搭积木一样连起来&#xff0c;满心期待它能在关键时刻给你发条短信。结果&#xff0c;门被推开了&am…...

未来之窗昭和仙君(九十三)用户指引自助教学源码—东方仙盟

代码<!DOCTYPE html> <html lang"zh-CN"> <head> <meta charset"UTF-8"> <meta http-equiv"X-UA-Compatible" content"IEedge,chrome1"> <title>你的导师-未来之窗</title> <style>*…...

多智能体强化学习环境PettingZoo:从核心概念到工程实践

1. 项目概述&#xff1a;从零理解PettingZoo如果你正在寻找一个能让你快速上手、高效构建多智能体强化学习&#xff08;Multi-Agent Reinforcement Learning, MARL&#xff09;实验环境的工具&#xff0c;那么Farama Foundation旗下的PettingZoo项目&#xff0c;绝对是你绕不开…...