16
FX3 Programmers Manual, Doc. # 001-64707 Rev. *C
Introduction to USB
STALL means that something is wrong (probably as a result of miscommunication or lack of
cooperation between the host and device software). A device sends the STALL handshake to
indicate that it does not understand a device request, that something went wrong on the peripheral
end, or that the host tried to access a resource that was not there. It is similar to HALT, but better,
because USB provides a way to recover from a stall. NYET (Not Yet) has the same meaning as ACK
- the data was received error-free - but also indicates that the endpoint is not yet ready to receive
another OUT transfer. NYET PIDs occur only in high-speed mode. A PRE (Preamble) PID precedes
a low-speed (1.5 Mbps) USB transmission.
One notable feature of the USB 2.0 protocol is the data toggle mechanism. There are two DATA
PIDs (DATA0 and DATA1) in
. As mentioned previously, the ACK handshake is an
indication to the host that the peripheral received data with-out error (the CRC portion of the packet
is used to detect errors). However, the handshake packet can get garbled during transmission. To
detect this, each side (host and device) maintains a 'data toggle' bit, which is toggled between data
packet transfers. The state of this internal toggle bit is compared with the PID that arrives with the
data, either DATA0 or DATA1. When sending data, the host or device sends alternating DATA0-
DATA1 PIDs. By comparing the received Data PID with the state of its own internal toggle bit, the
receiver can detect a corrupted handshake packet.
The PING protocol was introduced in the USB 2.0 specification to avoid wasting bus bandwidth
under certain circumstances. When operating at full speed, every OUT transfer sends the OUT data,
even when the device is busy and cannot accept the data. Such unsuccessful repetitive bulk data
transfers resulted in significant wastage of bus bandwidth. Realizing that this could get worse at high
speed, this issue was remedied by using the new 'Ping' PID. The host first sends a short PING token
to an OUT endpoint, asking if there is room for OUT data in the peripheral device. Only when the
PING is answered by an ACK does the host send the OUT token and data.
The protocol for the interrupt, bulk, isochronous and control transfers are illustrated in the following
figures.
Figure 2-2. Two Bulk Transfers, IN and OUT
Figure 2-3. Interrupt Transfer
Figure 2-4. Isochronous Transfer
Содержание EX-USB FX3
Страница 8: ...8 FX3 Programmers Manual Doc 001 64707 Rev C Contents...
Страница 12: ...12 FX3 Programmers Manual Doc 001 64707 Rev C Introduction...
Страница 48: ...48 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Overview...
Страница 74: ...74 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Firmware...
Страница 76: ...76 FX3 Programmers Manual Doc 001 64707 Rev C FX3 APIs...
Страница 84: ...84 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Application Examples...
Страница 98: ...98 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Application Structure...
Страница 148: ...148 FX3 Programmers Manual Doc 001 64707 Rev C FX3 P Port Register Access...
Страница 153: ...FX3 Programmers Manual Doc 001 64707 Rev C 153 FX3 Development Tools 2 Select General Existing projects into Workspace...
Страница 165: ...FX3 Programmers Manual Doc 001 64707 Rev C 165 FX3 Development Tools Click next...
Страница 178: ...178 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools Click on Apply...
Страница 180: ...180 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools d Start the GDB server...
Страница 185: ...FX3 Programmers Manual Doc 001 64707 Rev C 185 FX3 Development Tools...
Страница 186: ...186 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools...
Страница 187: ...FX3 Programmers Manual Doc 001 64707 Rev C 187 FX3 Development Tools...
Страница 188: ...188 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools...
Страница 192: ...192 FX3 Programmers Manual Doc 001 64707 Rev C GPIF II Designer...