zoukankan      html  css  js  c++  java
  • USB Packet Types

    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 PacketsThere 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 PacketsThere 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 PacketsThere 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 PacketsThe 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
  • 相关阅读:
    Watir: 当出现错误提示AutoItX3.dll 没有注册的时候,该怎么处理?
    Watir 能够为你做什么?
    第三章:JMeter 常用的测试元件——线程组
    第二章:JMeter 目录结构分析
    第二章:JMeter 工作原理
    第二章:JMeter 测试结果的名词解释
    第二章:JMeter 中常见 的术语
    第二章:JMeter 的介绍
    第一章:性能测试的常见指标
    第一章:性能测试的常见分类
  • 原文地址:https://www.cnblogs.com/utank/p/4634627.html
Copyright © 2011-2022 走看看