IoT

USB Electrical USB Electrical
20 四 2017 Joseph 0 評論

USB Host 端如何區別 Low Speed, Full Speed , High Speed ?

USB Host 端如何區別 Low Speed, Full Speed , High Speed ?

 
  • USB 1.0 Low Speed: 1.5Mbps : D- 接一個上拉電阻
  • USB 1.1 Full Speed : 12Mbps : D+ 接一個上拉電阻
  • USB 2.0 High Speed: 480Mbps : D+ 接一個上拉電阻

USB Electrical

其中, R2, R3 接15K (下拉)電阻到GND(在晶片內控制)。


Full Speed 為例, 如下圖 , 當USB Device 插入USB Host 端時, USB_D+ 可以查覺到High (1.5K和15K分壓的結果), Host 便知道有USB Device 插入了, 並且知道這是Full Speed的狀置。若是USB_D- 接上拉電阻, 則知這是插入了Low Speed設備。

usb fullspeed

 
 
 
如何知道是Full Speed 或  High Speed ?

要知道一個設備是否支援High Speed,需使用兩個特殊的信號狀態。

 
USB 2.0 devices use a special protocol during reset, called chirping, to negotiate the high bandwidth mode with the host/hub. 
 
  • A device that is USB 2.0 High Speed capable first connects as an Full Speed device (D+ pulled high), but upon receiving a USB RESET (both D+ and D− driven LOW by host for 10 to 20 ms) it pulls the D− line high, known as chirp K.This indicates to the host that the device is high bandwidth. 
  • If the host/hub is also HS capable, it chirps (returns alternating J and K states on D− and D+ lines) letting the device know that the hub operates at high bandwidth. The device has to receive at least three sets of KJ chirps before it changes to high bandwidth terminations and begins high bandwidth signaling. 
  • Because USB 3.0 uses wiring separate and additional to that used by USB 2.0 and USB 1.x, such bandwidth negotiation is not required.

在Reset期間,支援High Speed的設備會送出一個 Chirp K。支援High Speed的Hub檢測到該 Chirp 後,會送出交替的 Chirp K 與 J。當設備檢測到 KJKJKJ 的樣式後,它會移除它的Full Speed上升電阻,然後在High Speed執行所有的通信。如果集線器沒有對設備的 Chirp K 做出相應,設備知道它必須 繼續使用Full Speed通信。

Signalling 

 

USB 1.1 full-speed

  • D+ high :is J;  and K is inverse of J state
  • Sync --> Line Transitions: KJKJKJKK
  • End of Packet (EOP): Line Transitions: SE0 + SE0 (D+, D+ are low) + J

Line transition pattern

 

Example of a Negative Acknowledge packet transmitted by USB 1.1 full-speed device when there is no more data to read. It consists of the following fields: clock synchronization byte, type of packet and end of packet. Data packets would have more information between the type of packet and end of packet.

 

USB Packet Format


Each USB transaction consists of a

    • Token Packet (Header defining what it expects to follow), an
    • Optional Data Packet, (Containing the payload) and a
    • Status Packet (Used to acknowledge transactions and to provide a means of error correction)


Each USB transaction consists of a

    • Token Packet (Header defining what it expects to follow), an
    • Optional Data Packet, (Containing the payload) and a
    • Status Packet (Used to acknowledge transactions and to provide a means of error correction)

 

 

 

 參考

 

 

  1. https://en.wikipedia.org/wiki/USB
  2.  USB-IF
  3. http://www.ittraining.com.tw/ittraining/course/firmware/usb
閱讀 647 次數 最後修改於 週四, 20 四月 2017 11:04
给本項目評分
(0 得票數)

留下評論

確定已填寫了標有星號(*)的必填資訊。不允許 HTML 代碼。