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.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/255417.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Go集成elasticsearch8极简demo,光速入门

Go集成elasticsearch8极简demo,光速入门 配置go环境创件go mod工程代码实现配置go环境 编辑器添加goproxy GO111MODULE=on;GOPROXY=https://mirrors.wps.cn/go/,https://goproxy.cn,direct;GOSUMDB=off创件go mod工程 mkdir demo cd demo go mod init demo代码实现 在demo…

建行江门市分行致力数字人民币加速融入百姓生活

数字金融是“数字中国”建设的重要组成部分。建行江门市分行主动拥抱数字经济浪潮&#xff0c;全力探索数字金融赋能实体经济和社会民生&#xff0c;不断助力增强人民群众对金融服务的获得感、幸福感和安全感。 缴交住维如此简单&#xff01; 江门是著名侨乡&#xff0c;有40…

对JVM内存模型的理解

程序员的公众号&#xff1a;源1024&#xff0c;获取更多资料&#xff0c;无加密无套路&#xff01; 最近整理了一份大厂面试资料《史上最全大厂面试题》&#xff0c;Springboot、微服务、算法、数据结构、Zookeeper、Mybatis、Dubbo、linux、Kafka、Elasticsearch、数据库等等 …

服务器RAID配置及功能介绍

服务器RAID配置及功能介绍 一、RAID磁盘阵列详解1.RAID磁盘阵列介绍2.RAID 03.RAID14.RAID35.RAID56.RAID67.RAID 10总结阵列卡介绍 一、RAID磁盘阵列详解 1.RAID磁盘阵列介绍 ①是Redundant Array of lndependent Disks的缩写中文简称为独立冗余磁盘阵列。 ②把多块独立的物…

揭秘 `nextTick`:解决异步回调的利器(上)

&#x1f90d; 前端开发工程师&#xff08;主业&#xff09;、技术博主&#xff08;副业&#xff09;、已过CET6 &#x1f368; 阿珊和她的猫_CSDN个人主页 &#x1f560; 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 &#x1f35a; 蓝桥云课签约作者、已在蓝桥云…

两位技术领导者的故事——英特尔和高通

对于科技行业来说&#xff0c;包括这样一个现实&#xff1a;上学、工作和娱乐实际上是未来生活的一部分。科技行业也面临着变革&#xff0c;行业内发生了几起重大收购和管理层变动。其中两个最具影响力的变化是英特尔和高通的换岗。具有讽刺意味的是&#xff0c;这两家公司在过…

OA、CRM、ERP之间的区别和联系是什么?

OA、CRM、ERP之间的区别和联系是什么&#xff1f; OA、CRM、ERP&#xff0c;这些系统都是用于提高企业运营效率和管理的工具&#xff0c;它们可能在某些功能上有重叠&#xff0c;比如 CRM 和 ERP 可能都涉及到客户数据管理&#xff0c;但它们的重点和功能侧重点是不同的。 我们…

ArrayList的初始化容量与扩容机制解析

目录 1. ArrayList初始化容量 2. ArrayList的扩容机制 2.1. 计算新容量 2.2. 创建新数组并复制数据 2.3. 更新内部数组引用 3. ArrayList扩容的性能优化 3.1. 批量添加元素 3.2. 避免无效的扩容 3.3. 初始容量设定 4. 总结 在Java中&#xff0c;ArrayList是一个非常常…

LeetCode 142. 环形链表 II

给定一个链表的头节点 head &#xff0c;返回链表开始入环的第一个节点。 如果链表无环&#xff0c;则返回 null。 如果链表中有某个节点&#xff0c;可以通过连续跟踪 next 指针再次到达&#xff0c;则链表中存在环。 为了表示给定链表中的环&#xff0c;评测系统内部使用整…

力扣题目学习笔记(OC + Swift) 14. 最长公共前缀

14. 最长公共前缀 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀&#xff0c;返回空字符串 “”。 方法一 竖向扫描法 个人感觉纵向扫描方式比较直观&#xff0c;符合人类理解方式&#xff0c;从前往后遍历所有字符串的每一列&#xff0c;比较相同列上的…

小信砍柴的题解

目录 原题描述&#xff1a; 时间&#xff1a;1s 空间&#xff1a;256M 题目描述&#xff1a; 输入格式&#xff1a; 输出格式&#xff1a; 样例1输入&#xff1a; 题目大意&#xff1a; 主要思路&#xff1a; 注意事项&#xff1a; 总代码&#xff1a; 原题描述&#…

Python语言学习笔记之十一(DotEnv)

本课程对于有其它语言基础的开发人员可以参考和学习&#xff0c;同时也是记录下来&#xff0c;为个人学习使用&#xff0c;文档中有此不当之处&#xff0c;请谅解。 1、认识Python DotEnv dotenv是Python中的一个工具包&#xff0c;它主要用于谈取项目中的.env文件&#xff0…

qt-C++笔记之模拟实现一个linux终端窗口

qt-C笔记之模拟实现一个linux终端窗口 code review! 文章目录 qt-C笔记之模拟实现一个linux终端窗口一.运行二.main.cpp三.不足&#xff0c;待改进点 一.运行 二.main.cpp 代码 #include <QApplication> #include <QPlainTextEdit> #include <QLineEdit>…

DataGrip 2023.3 新功能速递!

1 数据可视化 自 DataGrip 2023.3 发布以来&#xff0c;已整合 Lets-Plot 库&#xff0c;实现数据可视化。该可视化功能可用于所有三种类型的网格&#xff1a; 主选项卡&#xff1a;在打开表、视图或 CSV 文件时&#xff0c;在分割模式下显示图表。结果选项卡&#xff1a;在 服…

Day64力扣打卡

打卡记录 方格取数&#xff08;线性DP&#xff09; import sys input sys.stdin.readline 输入样例&#xff1a; 8 2 3 13 2 6 6 3 5 7 4 4 14 5 2 21 5 6 4 6 3 15 7 2 14 0 0 0 输出样例&#xff1a; 67 n int(input()) w [[0] * (n 1) for _ in range(n 1)] while Tru…

flask搞个简单登录界面

登录界面 直接放上login.html模板&#xff1a; <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>Lo…

Kubernetes 的用法和解析 -- 4

一.Deployment 资源详解 如果Pod出现故障&#xff0c;对应的服务也会挂掉&#xff0c;所以Kubernetes提供了一个Deployment的概念 &#xff0c;目的是让Kubernetes去管理一组Pod的副本&#xff0c;也就是副本集 &#xff0c;这样就能够保证一定数量的副本一直可用&#xff0c;…

LLaMA系列模型

1.LLama 1.1 简介 Open and Efficient Foundation Language Models (Open但没完全Open的LLaMA) 2023年2月&#xff0c;Meta&#xff08;原Facebook&#xff09;推出了LLaMA大模型&#xff0c;使用了1.4T token进行训练&#xff0c;虽然最大模型只有65B&#xff0c;但在相关评…

OpenCV技术应用(7)— 将图像转为热力图

前言&#xff1a;Hello大家好&#xff0c;我是小哥谈。本节课就手把手教大家如何将一幅图像转化成热力图&#xff0c;希望大家学习之后能够有所收获~&#xff01;&#x1f308; 目录 &#x1f680;1.技术介绍 &#x1f680;2.实现代码 &#x1f680;1.技术介绍 伪彩色处…

秋招上岸记录咕咕咕了。

思考了一下&#xff0c;感觉并没有单独写这样一篇博客的必要。 能够写出来的&#xff0c;一些可能会对人有帮助的东西都做进了视频里面&#xff0c;未来会在blbl发布&#xff0c;目前剪辑正在施工中&#xff08;&#xff1f;&#xff09; 另外就是&#xff0c;那个视频里面使…