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. linux在shell date获取时间的相关操作

    获得当天的日期 date +%Y-%m-%d 输出: 2011-07-28 将当前日期赋值给DATE变量DATE=$(date +%Y%m%d) 有时候我们需要使用今天之前或者往后的日期,这时可以使用 ...

  2. FZU 2029 买票问题 树状数组+STL

    题目链接:买票问题 思路:优先队列维护忍耐度最低的人在队首,leave操作ok. vis数组记录从1到n的编号的人们是不是在队列中,top维护队首的人的编号.pop操作搞定. 然后,check操作就是 ...

  3. The C10K problem

    原文链接:http://www.kegel.com/c10k.html It's time for web servers to handle ten thousand clients simulta ...

  4. 新手必看,老鸟绕道–LAMP简易安装

    导读 LAMP是企业中最常用的服务,也是非常稳定的网站架构平台.其中L-指的是Linux,A-指的是Apache,m-指的是mysql或者marriDB,p-php.相信大家对这些都已经非常熟悉了,但 ...

  5. ajax状态码

    1- AJAX状态值与状态码区别 AJAX状态值是指,运行AJAX所经历过的几种状态,无论访问是否成功都将响应的步骤,可以理解成为AJAX运行步骤.如:正在发送,正在响应等,由AJAX对象与服务器交互 ...

  6. 一个QQ木马的逆向分析浅谈(附带源码)

    程序流程:首先注册自己程序的窗口以及类等一系列窗口操作,安装了一个定时器,间隔为100ms,功能搜索QQ的类名,如果找到就利用FindWindow("5B3838F5-0C81-46D9-A ...

  7. bzoj 1791: [Ioi2008]Island 岛屿

    #include<iostream> #include<cstdio> #define M 1000009 using namespace std; *M],cnt,n,hea ...

  8. 一步步学习JSON

    什么是Json json是JavaScript Object Notation(javascript对象表示法)的缩写,是一种轻量的数据格式,是基于javascript的一个子集.与XML一样,jso ...

  9. HighAvailability和LoadBalancer

    HighAvailability                         LoadBalancer 红帽RHCS                                lvs(三种工作 ...

  10. 反Secure Boot垄断:兼谈如何在Windows 8电脑上安装Linux

    感谢HQSQ的投递一.自由软件基金会的呼吁上周,2012年将近结束的时候,自由软件基金会(FSF)发出呼吁,要求人们继续支持反Secure Boot垄断,希望签名者能达到5万人(目前是4万).我觉得, ...