最終更新:2015-04-07 (火) 04:45:47 (3305d)  

bInterval
Top / bInterval

インタラプト転送アイソクロナス転送で使われるポーリング間隔。

単位

  • 1ms(フレーム)か125us(マイクロフレーム)

インタラプト転送

  • ポーリング間隔
    転送ロースピードフルスピードハイスピードスーパースピード
    インタラプト転送10~255 [ms]1~255 [ms]1~16。2のn-1乗 x125 [μs] (125μs〜4.096s)
    アイソクロナス転送-1~16。2のn-1乗 [ms] (1ms〜32.768s)1~16。2のn-1乗 x125 [μs] (125μs〜4.096s)
  • ハイスピードだと最高8000Hz

MSDN

ロースピード

  • 10~255
    bInterval0~1516~3536~255
    Windowsのポーリング(ms)81632

フルスピード

  • OHCI
  • 1~255
    bInterval12~34~78~1516~3132~255
    Windowsのポーリング(ms)12481632

ハイスピード

  • 1~16。2のn-1乗 x125
    n (bInterval)12345678910111213141516
    フレーム数124816326412825651210242048409681921638432768
    インターバル(ms)1/81/41/21248163264128256512102420484096
    Windowsのポーリング(ms)1/81/41/21244444444444

USB/スケジューリング

  • The host can begin each transaction at any time up to the specified maximum latency since the previous transaction began. So, for example, on a full-speed bus with a 10 ms maximum latency, five transfers could take as long as 50 ms or as little as 5 ms.
  • OHCI host controllers for low and full speeds schedule transactions in periods of 1, 2, 4, 8, 16, or 32 ms.
    • For a full-speed device that requests a maximum anywhere from 8 to 15 ms, an OHCI host will begin a transaction every 8 ms, while a maximum latency from 32 to 255 will cause a transaction attempt every 32 ms.
  • However, devices shouldn’t rely on behavior that is specific to a type of host controller and should assume only that the host complies with the specification.
  • An OHCI controller can schedule more than one stage of a control transfer in a single frame, while a UHCI controller always schedules each stage in a different frame. For bulk endpoints with a maximum packet size less than 64 bytes, a UHCI driver attempts no more than one transaction per frame, while an OHCI driver may schedule additional transactions in a frame.
  • An OHCI controller will poll an interrupt endpoint at least once every 32 ms even if the endpoint descriptor requests a maximum latency of 255 ms, while UHCI controllers can, but don’t have to, support less-frequent polling.
  • Developers who use UHCI hosts are sometimes surprised when their devices fail when connected to an OHCI host. The failure occurs because the device isn’t expecting to see multiple stages of a control transfer in a frame. Every device should work with both controller types.

EHCI

  • USBCMD 23:16 - Interrupt Threshold Control  R/W. Default 08h.
    • This field is used by system software to select the maximum rate at which the host controller will issue interrupts. The only valid values are defined below. If software writes an invalid value to this register, the results are undefined.
    ValueMaximum Interrupt Interval
    00hReserved
    01h1 micro-frame
    02h2 micro-frames
    04h4 micro-frames
    08h8 micro-frames (default, equates to 1 ms)
    10h16 micro-frames (2 ms)
    20h32 micro-frames (4 ms)
    40h64 micro-frames (8 ms)

ハイスピードバルク転送/コントロール転送のOUTエンドポイント

  • 最大NAKレート。どれくらいのフレームごとにNAKを返すかを入れておく。
  • 0~255
  • 0:NAKしない (通例)

その他

  • 使用しないので予約。

メモ

  • Interval for polling endpoint for data transfers.
  • Expressed in frames or microframes depending on the device operating speed (i.e., either 1 millisecond or 125 μs units).
  • For full-/high-speed isochronous endpoints, this value must be in the range from 1 to 16. The bInterval value is used as the exponent for a 2bInterval-1 value; e.g., a bInterval of 4 means a period of 8 (24-1).
  • For full-/low-speed interrupt endpoints, the value of this field may be from 1 to 255.
  • For high-speed interrupt endpoints, the bInterval value is used as the exponent for a 2bInterval-1 value; e.g., a bInterval of 4 means a period of 8 (2^4-1). This value must be from 1 to 16.
  • For high-speed bulk/control OUT endpoints, the bInterval must specify the maximum NAK rate of the endpoint. A value of 0 indicates the endpoint never NAKs.
  • Other values indicate at most 1 NAK each bInterval number of microframes. This value must be in the range from 0 to 255.

Linux

  • HS
    • bInterval:2~7 - 1uF単位
    • bInterval:8~ - n/8uF単位

関連