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. HDU 1688 Sightseeing

    题目链接:Sightseeing 题意:求最短路和比最短路长度+1的所有路径条数. 附代码:用数组记录最短和次短路径的长度和条数,一次更新,直到没有边可以更新. #include <stdio. ...

  2. 选择最适合你的Linux学习方法

    我们知道Linux只是一个内核,现在的Linux操作系统底层都是用这个内核,包括Android手机,所以Linux操作系统其实是将Linux内核与应用软件做一个打包,我们称之为Linux发行版.现在比 ...

  3. eclipse debug时老提示edit source lookup path解决方案

    用myeclipse debug web应用的时候,总提示edit source lookup path,每次都得手动选择项目,费时费力.在网上终于找到了方法. 搬运:http://www.educi ...

  4. Problem A CodeForces 560A

    Description A magic island Geraldion, where Gerald lives, has its own currency system. It uses bankn ...

  5. 使用OCI向Oracle插入Geometry数据

    使用C/C++操作Oracle数据库,使用OCI可谓是最强大,当然也是最难的方式.Oracle是一个功能复杂而强大的数据库,它可以很好的支持空间数据(Oracle spatial).如何使用OCI向O ...

  6. [转]理解WSRF之一 使用WS-ResourceProperties (整理自IBM网站)

    理解 WSRF第1部分-使用 WS-ResourceProperties   本 教程是一个由 4 部分组成的系列文章中的第 1 部分,该系列介绍 WSRF(Web Services Resource ...

  7. iPhone 6/6 Plus国行版开卖当日抢购攻略

    在距离苹果首批发售时隔一个月也就是北京时间10月17日,苹果iPhone 6.iPhone 6 Plus终于也要在中国大陆开卖,众多国内用户终于有机会安排自己的购机计划.据不完全数据显示,目前iPho ...

  8. Tomcat容器运行struts2+spring+mybatis架构的java web应用程序简单分析

    1.具体的环境为 MyEclipse 8.5以及自带的tomcat spring3.0.5 struts2.3.15.1 mybatis3.0.5 2.想弄明白的一些问题 tomcat集成spring ...

  9. php大力力 [019节]php分页类的学习

    2015-08-26 php大力力019.php分页类的学习 [2014]兄弟连高洛峰 PHP教程14.2.1 分页需求分析 14:18 [2014]兄弟连高洛峰 PHP教程14.2.2 分页类中分页 ...

  10. BZOJ 3181 BROJ

    像我这种SB还是早点退役. #include<iostream> #include<cstdio> #include<cstring> #include<al ...