Protocol analysis
R&S
®
RTO6
816
User Manual 1801.6687.02 ─ 05
The PID's length is 8 bit, beginning (LSB) with the fields PID0, PID1, PID2 and
PID3. Those 4 bits are repeated in PID4, PID5, PID6 and PID7, but in complemen-
tary form (for integrity checking). The PID is the only part of a packet not to be cov-
ered by the CRC (see below). Packets with invalid or non-supported PID fields are
rejected. For valid PIDs, see
●
ADDR
(address): contains the USB address of the target device. The length of this
field is 7 bits, resulting in addresses 0 through 127 (with 0 reserved as the default
address after reset).
●
ENDP
(endpoint): number of the endpoint. The length of this field is 4 bits, resulting
in a maximum of 16 different endpoints.
●
Frame number
: this field with a length of 11 bits specifies the current frame num-
ber 0 to 2047. It is only sent in SOF packets.
●
Data field
(or "payload data"): the length of this field is not fixed, it can contain
between 0 bytes and 1024 bytes.
●
CRC
(cyclic redundancy check): Finally, the CRC field ensures that the received
data is correct. If an error is detected in the CRC calculation, the packet is rejected.
Packets (in this case: IN, OUT, SOF, SETUP, PING, SPLIT) are followed by a
CRC5 (which is 5 bits long) over ADDR and ENDP (or the frame number field, in
case of SOF); data packets (DATA0, DATA1, MDATA, DATA2) are followed by a
CRC16 (which is 16 bits long) over the data field. No CRC is used for handshake
packets.
●
EOP
(end of package): the devices determine the length of the data field with the
EOP signal, which indicates the end of a packet. In low and full speed, it consists
of two SE0 bits, followed by a J state. For high speed, the current state is inverted
and kept for 7-bit times, leading to a Bitstuff error that is used as an EOP indicator.
This corresponds to the bit sequence 01111111 ahead of NRZI; for the SOF token,
the bit sequence 0111111111111111111111111111111111111111 is transmitted (five
NRZI bytes), which is used to recognize disconnects (since high-speed devices
normally do not apply voltage to D+/D-). If no device is present, a higher voltage is
measured. After that, the idle state (SE0) is occupied.
Table 13-33: Valid PIDs for different packet types
Packet
type
Name
PID
value
Meaning
Token
OUT
0xE1
Starts data transfer towards a device
IN
0x69
Starts data transfer towards the host
SOF
0xA5
Indicates start of frame
SETUP
0x2D
Starts a setup transfer and sends information on this to the device
Data
DATA0
0xC3
Data packet with data-toggle bit 0
DATA1
0x4B
Data packet with data-toggle bit 1
DATA2
0x87
Data packet for high speed IN isochronous transfers that require high
bandwidth
MDATA
0x0F
Data packet for high-speed OUT isochronous transfers that require
high bandwidth
Handshake
ACK
0xD2
Acknowledgement of a packet received without error
USB (option R&S
RTO6-K570)