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. java之io之File类的list()方法过滤目录的使用

    java的io的知识中,File类必须掌握.File类是对文件或者文件夹的封装.它本身并不能对所封装的文件进行读写,它封装的只是文件或文件夹的周边知识,比如 大小啦,创建日期啦,路径啦等等. 如果Fi ...

  2. JAVA输出图形(网上找的)

    public class TuXing { public static void main(String[] args) { int i, j, k; for (i = 1; i <= 5; i ...

  3. POJ 1011 Sticks dfs,剪枝 难度:2

    http://poj.org/problem?id=1011 要把所给的集合分成几个集合,每个集合相加之和ans相等,且ans最小,因为这个和ans只在[1,64*50]内,所以可以用dfs一试 首先 ...

  4. Json数据,日期的转换

    using (SQLiteConnection con = new SQLiteConnection(Constants.DATA_SOURCE)) { con.Open(); using (SQLi ...

  5. 用C#操作vss、msbuild、reactor

    一.命令行 凡是支持命令行的工具,都可以通过cmd.exe操作.如下: var p = new Process(); p.StartInfo.FileName = "cmd.exe" ...

  6. MyEclipse8.5集成Tomcat7

    我最近需要在MyEclipse中使用Tomcat7,已经在Servers中配置了本地的Tomcat路径,之后发布项,在MyEclipse启动Tomcat服务则出现如下错误提示: Exception i ...

  7. java的动态绑定和静态绑定

    首先是方法的参数是父类对象,传入子类对象是否可行然后引出Parent p = new Children();这句代码不是很理解,google的过程中引出向上转型要理解向上转型又引出了动态绑定从动态绑定 ...

  8. git 克隆项目 与 分支简单操作

    git clone http://abcde.com/myproject/abc.git 克隆远程项目到本地githome文件夹git branch -a 查看所有分支 包括远程和本地 *号开头表示当 ...

  9. uva11059

    除法(Division,uva725) 输入整数n,按从小到大的顺序输出所有形如abcde/fghij=n的表达式,其中a~j恰好为数字0~9的一个排列(可以有前导0),2<=n<=79. ...

  10. 《java版进制转换》

    import java.util.Scanner; class 十进制转成十六进制_2 { public static void main(String[] args) { int num = 0; ...