最終更新:2015-04-07 (火) 04:45:47 (3305d)
bInterval
Top / bInterval
インタラプト転送とアイソクロナス転送で使われるポーリング間隔。
単位
- 1ms(フレーム)か125us(マイクロフレーム)
インタラプト転送
- ポーリング間隔
- ハイスピードだと最高8000Hz
MSDN
- bIntervalとポーリング間隔の対応が書いてある。
- https://msdn.microsoft.com/en-us/library/windows/hardware/ff539317(v=vs.85).aspx
ロースピード
- 10~255
bInterval 0~15 16~35 36~255 Windowsのポーリング(ms) 8 16 32
フルスピード
ハイスピード
- 1~16。2のn-1乗 x125
n (bInterval) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 フレーム数 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 インターバル(ms) 1/8 1/4 1/2 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 Windowsのポーリング(ms) 1/8 1/4 1/2 1 2 4 4 4 4 4 4 4 4 4 4 4
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.
Value Maximum Interrupt Interval 00h Reserved 01h 1 micro-frame 02h 2 micro-frames 04h 4 micro-frames 08h 8 micro-frames (default, equates to 1 ms) 10h 16 micro-frames (2 ms) 20h 32 micro-frames (4 ms) 40h 64 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単位