May 8, 20012 USB 2.0 Signal Protocols Jon Lueker Intel Corporation.

14

Transcript of May 8, 20012 USB 2.0 Signal Protocols Jon Lueker Intel Corporation.

May 8, 2001 2

USB 2.0 Signal Protocols

USB 2.0 Signal Protocols

Jon LuekerJon LuekerIntel CorporationIntel Corporation

May 8, 2001 3

Protocol Requirements Similar to USB 1.1Protocol Requirements Similar to USB 1.1

Data encodingData encoding Packet Start/End delimitersPacket Start/End delimiters Connect/Disconnect detectionConnect/Disconnect detection Suspend/ResumeSuspend/Resume ResetReset Speed detectionSpeed detection

May 8, 2001 4

NRZI Data EncodingNRZI Data Encoding

Same data encoding as LS and FS modesSame data encoding as LS and FS modes 0 is encoded as a transition, 1 as no transition0 is encoded as a transition, 1 as no transition Bit stuffing inserts a 0 after every 6 consecutive 1’sBit stuffing inserts a 0 after every 6 consecutive 1’s Maximum number of symbols without transition is Maximum number of symbols without transition is

7 (except EOP)7 (except EOP) Bit stuffing assures sufficient transitions to keep Bit stuffing assures sufficient transitions to keep

DLL locked onto data streamDLL locked onto data stream

May 8, 2001 5

High-Speed SOPHigh-Speed SOP

HS Idle K J K J K J K J K J K K DataHS Idle K J K J K J K J K J K K Data

Receiver squelched - Differential envelope

below 100mV

Receiver squelched - Differential envelope

below 100mVDifferential envelope

exceeds 150mV - reception enabled within

four symbol times

Differential envelope exceeds 150mV -

reception enabled within four symbol times

Clock recovery circuit must lock in time to detect end of SYNC

Clock recovery circuit must lock in time to detect end of SYNC

End of SYNCdetected, receiver

begins datarecovery

End of SYNCdetected, receiver

begins datarecovery

HS SYNC Field - 32 bitsHS SYNC Field - 32 bits

May 8, 2001 6

High-Speed EOPHigh-Speed EOP

Data Bit Stuff Error SE0Data Bit Stuff Error SE0

Normal HS data transmission with

NRZI encodingand bit stuffing

Normal HS data transmission with

NRZI encodingand bit stuffing

First bit of the EOPfield is a transitionFirst bit of the EOPfield is a transition

EOP field is a bitstuff violation

EOP field is a bitstuff violation

After EOP, lines return to Idle

state and receiver is squelched

After EOP, lines return to Idle

state and receiver is squelched

HS EOP FieldHS EOP Field

May 8, 2001 7

Disconnect DetectionDisconnect Detection

Basic idea is to check for higher than normal signal voltages on the Basic idea is to check for higher than normal signal voltages on the differential pair differential pair

Higher voltages will result when device terminations are removed - Higher voltages will result when device terminations are removed - nominal increase is a jump from 400mV to 800mVnominal increase is a jump from 400mV to 800mV

Check is performed during last 8 bits of EOP of uSOF framesCheck is performed during last 8 bits of EOP of uSOF frames uSOF EOP is lengthened to 40 bits to make this mechanism reliable uSOF EOP is lengthened to 40 bits to make this mechanism reliable

- duration must be longer than round-trip time of- duration must be longer than round-trip time ofmaximum length cablemaximum length cable

DeviceDisconnection

DeviceDisconnection

DisconnectionVoltage

Threshold

DisconnectionVoltage

Threshold

DisconnectDetected

DisconnectDetected

May 8, 2001 8

Suspend from HSSuspend from HS

HS device suspend is initiated when a deviceHS device suspend is initiated when a devicesees no activity from upstream port for 3.0mssees no activity from upstream port for 3.0ms

Between 3.0 – 3.125ms, device transitions from HS to FSBetween 3.0 – 3.125ms, device transitions from HS to FS Device must differentiate between SE0 (reset)Device must differentiate between SE0 (reset)

and Idle (suspend)and Idle (suspend) 100 – 875us after reversion to FS, device tests line for 100 – 875us after reversion to FS, device tests line for

SE0 (Reset) vs. FS J (Suspend)SE0 (Reset) vs. FS J (Suspend) If FS J, device goes into Suspend followingIf FS J, device goes into Suspend following

FS behaviorsFS behaviors

May 8, 2001 9

Timeline for SuspendTimeline for Suspend

FS idle (J)FS idle (J)HS Idle (device still in HS)HS Idle (device still in HS)

100-875 μs3.0-3.125 ms

Devicerevertsto FS

Start ofInactivity

μSOFμSOF

HS

Hub

HS

Dev

ice

D–

D+

Device tests bus for FS J and then goes

into suspend

Start of Suspend Signaling(Hub port goes to FS Idle)

May 8, 2001 10

ResumeResume

For a device suspended while in HS, ResumeFor a device suspended while in HS, Resumeis a FS K asserted for a minimum of 20ms is a FS K asserted for a minimum of 20ms followed by a transition to SE0followed by a transition to SE0

At end of Resume (while port issuing resume At end of Resume (while port issuing resume asserts SE0) hub and device transitionasserts SE0) hub and device transitionto HS operationto HS operation

Since SE0 and HS Idle are equivalent on the bus, Since SE0 and HS Idle are equivalent on the bus, there is no “glitching” during this transitionthere is no “glitching” during this transition

uSOF’s commence in time to prevent a returnuSOF’s commence in time to prevent a returnto suspendto suspend

May 8, 2001 11

Timeline for ResumeTimeline for Resume

< 3.0 ms

Hub Drives SE0 for Two LSBit Times, Enters HS

HS

Hub

HS

Dev

ice

FS KFS K HS idleHS idle μSOFμSOF

D+

Device seesfirst activity

Start ofResume

Signaling

D–

FS idleFS idle

> 20 ms

Device ResumedIn HS

< 1.33 μs

SE0SE0

< 1.33 μs

May 8, 2001 12

Reset/Speed Detection ProtocolReset/Speed Detection Protocol

High-speed capable devices are reset by 10msHigh-speed capable devices are reset by 10msof continuous SE0 (same as USB 1.1)of continuous SE0 (same as USB 1.1)

During Reset, a high-speed capable deviceDuring Reset, a high-speed capable device“chIRPs” to the hub“chIRPs” to the hub

If a USB 2.0 hub detects this chIRP, it completesIf a USB 2.0 hub detects this chIRP, it completesthe handshake by chIRPing back to the devicethe handshake by chIRPing back to the devicewithin the Resetwithin the Reset

If the handshake is completed during Reset,If the handshake is completed during Reset,both hub and device come out of Reset inboth hub and device come out of Reset inhigh-speed modehigh-speed mode

May 8, 2001 13

Reset Handshake SignalingReset Handshake Signaling

Device chIRP is a ChIRP K (detected with hub’sDevice chIRP is a ChIRP K (detected with hub’shigh-speed receiver)high-speed receiver)

Device chIRPs by driving current in D- line while Device chIRPs by driving current in D- line while leaving D+ pullup in place and leavingleaving D+ pullup in place and leavingterminations inactiveterminations inactive

Hub chIRP is a series of alternating ChIRP J’sHub chIRP is a series of alternating ChIRP J’sand K’sand K’s

Hub chIRPs by driving current into D+ or D- lineHub chIRPs by driving current into D+ or D- line Reference state machines included in Appendix CReference state machines included in Appendix C

May 8, 2001 14

Timeline for ResetTimeline for Reset

μSOFμSOF Device ChIRPDevice ChIRP Hub ChIRPHub ChIRP

D+

D–

3.0-3.125 ms 100-875 μs > 1.0 ms

< 7.0 ms

< 100 μs 100-500 μs

> 10 ms

Device ChIRP

Start ofReset

Device EntersHS < 500 UsAfter DetectingHub ChIRP

Start ofReset

End ofReset

End ofHub ChIRP

Start ofHub ChIRP

μSOFμSOF

Hub

Dev

ice

SE0SE0 SE0SE0SE0SE0 HS idleHS idle

Devicegoes

into FS

Devicetests for

SE0