USB has four different packet types. Token packets indicate the type of transaction to follow, data packets contain the payload, handshake packets are used for acknowledging data or reporting errors and start of frame packets indicate the start of a new frame.

  • Token Packets:There are three types of token packets,
    • In - Informs the USB device that the host wishes to read information.
    • Out - Informs the USB device that the host wishes to send information.
    • Setup - Used to begin control transfers.

    Token Packets must conform to the following format,

Sync PID ADDR ENDP CRC5 EOP
  • Data Packets:There are two types of data packets each capable of transmitting up to 1024 bytes of data.
    • Data0
    • Data1

    High Speed mode defines another two data PIDs, DATA2 and MDATA.

    Data packets have the following format,

Sync PID Data CRC16 EOP
    • Maximum data payload size for low-speed devices is 8 bytes.
    • Maximum data payload size for full-speed devices is 1023 bytes.
    • Maximum data payload size for high-speed devices is 1024 bytes.
    • Data must be sent in multiples of bytes.
  • Handshake Packets:There are three type of handshake packets which consist simply of the PID
    • ACK - Acknowledgment that the packet has been successfully received.
    • NAK - Reports that the device temporary cannot send or received data. Also used during interrupt transactions to inform the host there is no data to send.
    • STALL - The device finds its in a state that it requires intervention from the host.

    Handshake Packets have the following format,

Sync PID EOP
  • Start of Frame Packets:The SOF packet consisting of an 11-bit frame number is sent by the host every 1ms ± 500ns on a full speed bus or every 125 µs ± 0.0625 µs on a high speed bus.
Sync PID Frame Number CRC5 EOP

USB Packet Types的更多相关文章

  1. 创建agsXMPP 自定义packet types

    在网上看了好多文章基本都是转载 没有能成功运行的,又没有别的资料,很是费解,无奈之下只好潜心研究,最终总结了几个要点给大家分享下,以免再次多浪费时间 agsXMPP是什么就不多描述了,重点说下我在创建 ...

  2. USB 3.0规范中译本 第8章 协议层

    本文为CoryXie原创译文,转载及有任何问题请联系cory.xie#gmail.com. 协议层管理设备及其主机之间端到端的数据流.这一层建立在链路层提供对某些类型的包的保证传输(guarantee ...

  3. USB port 如何识别不同的Charger类型

    基于Qualcom 8960/8921平台 一,软件分析 1.  USB charger types & Power supply types USB_INVALID_CHARGER      ...

  4. USB 2.0 Spec 微缩版

    4.1.1 Bus Topology 最大层数为7,第7层只能是Function不能是Hub,非根Hub最大5级. 5.3 USB Communication Flow Host Controller ...

  5. 深入理解USB流量数据包的抓取与分析

    0x01 问题提出 在一次演练中,我们通过wireshark抓取了一个如下的数据包,我们如何对其进行分析? 0x02 问题分析 流量包是如何捕获的? 首先我们从上面的数据包分析可以知道,这是个USB的 ...

  6. FT232H USB转串口,I2C,JTAG高速芯片

    随着FT232H USB2.0高速芯片的发布,英商飞特蒂亚公司(FTDI)进一步巩固了其在USB接口集成电路产品的地位.此款多功能的单通道USB转UART/FIFO接口设备可通过EEPROM配置为各种 ...

  7. Linux usb 4. Device 详解

    文章目录 1. 简介 2. Platform Layer 2.1 Platform Device 2.2 Platform Driver 3. UDC/Gadget Layer 3.1 Gadget ...

  8. pcap文件的文件头的link type

    http://www.tcpdump.org/linktypes.html Link-layer header type values LINKTYPE_ name LINKTYPE_ value C ...

  9. System Address Map Initialization in x86/x64 Architecture Part 2: PCI Express-Based Systems

      原文  http://resources.infosecinstitute.com/system-address-map-initialization-x86x64-architecture-pa ...

随机推荐

  1. 编程思考 PetShop读后感

    标准,插拔式的设计思想建立一致的标准是通向“复用”的通道.分层,使其得到的充分的独立.一个东西如果独立了[不是孤立],这个事物就具有很强大的力量,这个和一个人的成长是相同的道理.所以呢,在写程序的过程 ...

  2. 谈谈CSS的布局,display、position、float

    前言 前端一直是我的一个很大的缺憾,这段时间痛顶思痛,决定好好的把前台的东西加强,这不,在学习了一段时间js之后,在做一些小练习,却发现最基本的一些css知识却还不了解,所以便有了这篇博文. 块级元素 ...

  3. 对Docker的价值和应用场景分析

    近年来,Docker在IT界可谓风光十足,各大技术论坛上赚足了眼球,公司内外也有相当多的介绍和尝试,看上去如此高大上的技术,貌似会给云.服务部署.运维等领域带来颠覆性的创新. 近期查阅了一些文档,较深 ...

  4. hdu 4612 Warm up

    http://acm.hdu.edu.cn/showproblem.php?pid=4612 将原图进行缩点 变成一个树 树上每条边都是一个桥 然后加一条边要加在树的直径两端才最优 代码: #incl ...

  5. C#获取指定日期为一年中的第几周

    /// <summary> /// 获取指定日期,在为一年中为第几周 /// </summary> /// <param name="dt">指 ...

  6. WP8 学习 Onnavigatedto和OnnavigatedFrom的区别

    OnNavigatedTo:重写 OnNavigatedTo 方法以检查导航请求并且准备供显示的页面.这个方法就像是初始化(Ini) ,它先于Loaded事件之前被执行,所以在这里可以控制一些初始化前 ...

  7. 浏览器Firefox新标签页默认打开地址设置

    1.地址栏输入about:config 2.找到browser.newtab.url 修改它的值为你想要的地址,如:https://www.baidu.com

  8. HDU 4087 三维上的平移缩放旋转矩阵变化

    题目大意: 就是根据它给的程序的要求,不断平移,缩放,旋转三维的点,最后计算出点的位置 这里主要是要列出三种转换方式的齐次矩阵描述 平移translate tx ty tz1 0 0 00 1 0 0 ...

  9. Android TextView多行垂直滚动

    在Android应用中,有时候需要TextView可以垂直滚动,今天我就介绍一下怎么实现的.在布局里: <TextView android:id="@+id/tvCWJ" a ...

  10. DotNetBar v12.3.0.3 Fully Cracked

    PS: 博客园的程序出现问题,导致我的博客不能访问(转到登录页),而我自己由于 Cookies 问题,一直可以访问,所以一直未发现该问题. 感谢冰河之刃告知,thx! 更新信息: http://www ...