usb sop and eop

news/2024/5/21 1:16:11/文章来源:https://blog.csdn.net/xuelin273/article/details/127272635

USB包(packet)由SOP,SYNC,Packet内容和EOP组成.
 

SOP信号-------------瞬态信号

协议中的描述:7.1.7.4.1

The start of a packet (SOP) is signaled by the originating port by driving the D+ and D- lines from the Idle state to the opposite logic level (K state).

This switch in levels represents the first bit of the SYNC field

. Hubs must limit the change in the width of the first bit of SOP when it is retransmitted to less than ± 5 ns. Distortion can be minimized by matching the nominal data delay through the hub with the output enable delay of the hub

也就是idle状态到相反的K状态。电平上的切换代表SYNC 字段的第一个bit

低速设备SOP信号:总线从IDLE状态(J状态:差分0)切到K状态(差分1),即可完成低速SOP信号的发送。

全速设备SOP信号:总线从IDLE状态(J状态:差分1)切到K状态(差分0),即可完成全速SOP信号的发送。

3.2 EOP信号-----------

低速设备EOP信号:总线持续2位时间的SE0(单端0)状态,后跟随1位时间的J状态(差分0),即可完成低速EOP信号的发送。

全速设备EOP信号:总线持续2位时间的SE0(单端0)状态,后跟随1位时间的J状态(差分1),即可完成全速EOP信号的发送。

———————————————————————————————————————————

高速IDLE \SOP\ EOP信号定义,spec 7.1.7.4.2 High-speed Signaling

The high-speed Idle state is when both lines are nominally at GND.-----高速idle定义,d+和d-都拉低

The source of the packet signals the Start of Packet (SOP) in high-speed mode by driving the D+ and D- lines from the high-speed Idle state to the K state. This K is the first symbol of the SYNC pattern (NRZI sequenceKJKJKJKJ KJKJKJKJ KJKJKJKJ KJKJKJKK) as described in Section 7.1.10.----------高速SOP 定义,IDLE--->K状态。

The high-speed End of Packet (EOP) begins with a transition from the last symbol before the EOP to the opposite symbol. This opposite symbol is the first symbol in the EOP pattern (NRZ 01111111 with bit stuffing disabled) as described in Section 7.1.13.2.-------eop第一个符号是前面的crc前面的最后一个符号取反的符号。

Upon completion of the EOP pattern, the driver ceases to inject current into the D+ or D- lines, and the lines return to the high-speed Idle state.

The high-speed SOF EOP is a special case. This SOF EOP is 40 symbols without a transition (rather than 8 for a non-SOF packet)

.--------高速sof eop是个特殊情况,40个符号没有符号变化

The fact that the first symbol in the EOP pattern forces a transition simplifies the process of determining precisely which is the last bit in the packet prior to the EOP delimiter. -----EOP的第一个符号是为了简化操作,保证精确分开和packet直接的精确界限划分开

————————————————————————————————————————————————————————————————————————————————————

The high-Speed mode, on the other hand, has been modified to use an 8-bit NRZ signal of "01111111," without stuffed bit insertion. The first symbol indicating an EOP is the reversal value of the last symbol immediately before the EOP. When the end of the EOP pattern is reached, the driver stops the flow of current to the D+ or D- line, and switches the line to high-Speed idle state.

另一方面,高速模式已被修改为使用“01111111”的 8 位 NRZ 信号,而无需插入填充位。指示 EOP 的第一个符号是紧接在 EOP 之前的最后一个符号的反转值。当到达 EOP 模式结束时,驱动器停止电流流向 D+ 或 D- 线,并将线切换到高速空闲状态。

---------------非sof包的eop 格式

The format of the SOF packet is shown in Figure 12. ---------sof packet 格式

sof的eop是5B=40bit

The EOP for a high-Speed SOF (Start Of Frame) is a special case, and has a length of 40 bits, not 8 bits. This is used to detect the disconnection of a device. When a device is disconnected, the 45 ohm resistance further from the hub's downstream port is lost. However, this is not sufficient to detect the disconnection of a device, since the driver does not send a current to the D+ or the D- line while in the high-Speed idle state. Simply put, the disconnection of a device can only actually be detected while there is a transaction on the bus. The 40-bit long EOP is used to maintain the output level until the signal returns to the transmitting end after being reflected at the end of the cable. When the output level exceeds approx. 600 mV, the device is considered to be disconnected.

高速SOF(Start Of Frame)的EOP是一个特例,它的长度为40位,而不是8位。这是用来检测一个设备的断开连接的。当一个设备断开时,离集线器下游端口更远的45欧姆电阻就会丢失。然而,这并不足以检测设备的断开,因为在高速空闲状态下,驱动器不会向D+或D-线发送电流。简单地说,只有在总线上有交易的时候才能真正检测到设备的断开。40位长的EOP用于维持输出电平,直到信号在电缆末端反射后返回到发送端。当输出电平超过约600 mV时,设备被认为是断开了。

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

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

相关文章

实验六:倾斜开关实验

OK,周一周二一共10节课,比较辛苦,昨天下午还有咨询师模拟演练,很累,就早早休息了 今天早上就想写一个实验指导书 也就是现在的实验六 一会十点有《C语言程序设计》的课,不过,今天好在就只有两节课(课时,一次大课2个课时,习惯说2节课) 感觉又是我最喜欢和擅长的C…

JSON——简介

JSON——简介 JSON——基础语法 JSON——json数据与java对象的转换// 将java对象转为json字符串User user = new User(1,"zahngsan","123");// 转换String jsonString = JSON.toJSONString(user);System.out.println(jsonString);// 将json字符串转为jav…

java基于vue+springboot 的体育用品销售购物网站 多商家 nodejs

用户在打开网站之后首先打开的是首页部分,在首页部分可以看到一些推荐的信息 环境需要 1.运行环境:最好是java jdk 1.8,这是目前最稳定的JDK也是被使用最多的JDK版本。 2.IDE环境:IDEA,Eclipse都可以。推荐IDEA; 3.to…

移动端IM产品RainbowChat[专业版] iOS端 v6.0版已发布!

关于MobileIMSDK MobileIMSDK 是一套专门为移动端开发的开源IM即时通讯框架,超轻量级、高度提炼,一套API优雅支持UDP 、TCP 、WebSocket 三种协议,支持iOS、Android、H5、标准Java平台,服务端基于Netty编写。 工程开源地址是&…

分治法实现二分查找(python)

问题描述: 改写二分查找算法:设a[1…n]是一个已经排好序的数组,改写二分查找算法: 当搜索元素x不在数组中时,返回小于x的最大元素位置i,和大于x的最小元素位置j; (即返回x的左、右2个元素) 当搜索元素x在…

系动词使役动词

系动词 系动词的作用就是赋值 I am a rabbit 把 a rabbit赋值给i我 我是一只兔子 The rabbit is smart 这兔子是聪明的 smart赋值给兔子 系动词连系的方式,就是简简单单把它前后的概念含义连起来而已 所以系动词又叫连系动词 (Linking Verb) 就是把前后两端连起来(link)就好…

基于侧影轮廓的三维模型构建

建模过程 图像的获取 由于待建模物体具有较多细节,因此选择在同一个方向拍摄两个角度的照片(手机倾斜角大约为60度和45度,如下图所示),以及顶部细节照片,最终拍摄的有效照片为35张。模型构建 新建项目,并导入所有拍摄的照片照片掩饰 可以先采用自动掩饰工具将物体轮廓从…

kotlin koin

介绍 Koin是一个面向Android developer的依赖注入框架使用场景 为什么要用依赖注入框架? 比如我们有一个下载器对象Downloader,需要下面三个对象才能完成构造。但是这个下载器对象在各个活动中使用频繁val executor = Executor() val client = HttpClient() val request = Re…

使用 Zpan 搭建低成本个人私有网盘,还不限速

摘要:本文就介绍一个不限速的低成本个人网盘——ZPan,相较于老牌的私有网盘 OwnCloud 等,Zpan 有一个独有的优势:不限速。本文分享自华为云社区《使用 Zpan 搭建低成本个人私有网盘》,作者: 云存储开发者支…

甘特图:制定项目计划的三个要点

任何事情都要有计划,这样才能保证自己的事情按照既定的目标和轨迹推进 制定计划首先要明确以下三点: 1、目标明确:做这个项目是做什么的要达成什么目标。 2、任务明确:达成这个目标要做哪些事,有具体的实施推进步骤。…

MP-SPDZ详细介绍

基础知识概述 隐私计算底层协议包括两种:其一是基础的加密传输协议,用于信息分发,包括不经意传输、秘密分享、同态加密、零知识证明等。其二是加密计算协议,包括乱码电路、同态加密、零知识证明等。 不经意传输是所有隐私计算协…

python 运行错误收集

目录global全局声明错误 global全局声明错误 SyntaxError: name is_login is used prior to global declaration 解决办法:global is_login 放在 if is_login:的上面 is_login = Falsedef login_auth(func_name):def inner(*args, **kwargs):if is_login:res = func_name(*arg…

AlphaZero强化学习模型

搬来了DeepMind的AlphaTensor DeepMind前不久发在Nature上的论文Discovering faster matrix multiplication algorithms with reinforcement learning引发热议。 这篇论文在德国数学家Volken Strassen「用加法换乘法」思路和算法的基础上,构建了一个基于AlphaZero…

[GWCTF 2019]我有一个数据库

打开题目是乱码,好奇怪 御剑扫一下 扫到了phpmyadmin 版本为4.8.1 这个版本是有漏洞的(CVE-2018-12613),复现一下 部分源码: $target_blacklist array (import.php, export.php ); ​ // If we have a valid target…

SpringBoot统一处理返回格式

在对接第三方接口的时候,第三方接口返回格式形式为{"result":null,"status":1010},虽然返回了状态码,但是状态码对应的描述信息并没有携带,前端在使用的时候需要根据状态码返回一个友好的提示,如此…

刘韧:我每时每刻都会注意管理自己的知识

1. 担心总能让我积极行动起来。2. 要提早主动求变,不要等到被迫地、见招拆招地应变。3. 很多愚蠢的念头,都源于自己分内的事,却老想让别人负责,比如将自己的愿望寄托在子女身上。4. 推卸责任的同时,多少会对等地给予一…

ShardingSphere 5.2.0:分片审计功能拦截多分片场景下的不合理请求

一、背景Apache ShardingSphere 基于用户的实际使用场景,为用户打造了多种实用功能,包括数据分片、读写分离等。在数据分片功能中,我们发现有些用户涉及到的分片较多,一个分片逻辑表可能对应后端 1000 个物理表,这给用…

猿创征文 | 国产数据库实战之TiDB 数据库快速入门

猿创征文 | 国产数据库实战之TiDB 数据库快速入门一、系统检查1.检查系统版本2.查看本地IP地址3.TiDB集群介绍二、快速部署本地测试集群1.安装 TiUP工具2.声明全局环境变量3.快速部署TiDB 集群三、连接 TiDB 数据库1.新开一个session 以访问 TiDB 数据库2.通过Mysql客户端连接T…

SpringSecurity整合JWT+Oauth2认证

没写完&#xff0c;推荐下面的博客 推荐博客<查看pom依赖、数据库sql、实体类、数据映射>&#xff1a;SpringSecurity框架 推荐博客<查看SpringSecurity整合JWTOauth2认证>&#xff1a;SpringSecurity整合JWTOauth2认证 一 创建项目 测试浏览器&#xff1a;建议使用…

网课查题系统-公众号轻松调用方法

网课查题系统-公众号轻松调用方法 本平台优点&#xff1a; 多题库查题、独立后台、响应速度快、全网平台可查、功能最全&#xff01; 1.想要给自己的公众号获得查题接口&#xff0c;只需要两步&#xff01; 2.题库&#xff1a; 查题校园题库&#xff1a;查题校园题库后台&am…