English
Language : 

UPSD3422_06 Datasheet, PDF (145/293 Pages) STMicroelectronics – Turbo Plus Series Fast Turbo 8032 MCU with USB and Programmable Logic
uPSD34xx
USB interface
25.1.2
25.1.3
Endpoints
Each USB device contains a collection of independent endpoints, with an endpoint being the
destination of a communication flow between client software and the device. By design,
each USB device’s endpoints are given specific unique identifiers called endpoint numbers.
In addition, each endpoint has an associated direction for the data flow, either in (from
device to host) or out (from host to device). At the time a device is connected to the USB, it
is assigned a unique address. The combination of the device address, endpoint number,
and direction allows each endpoint to be uniquely referenced.
Each endpoint has some associated characteristics for the communication flow with the
client software running on the host. Those characteristics include:
● Endpoint number;
● Frequency and latency requirements;
● Bandwidth requirements;
● Maximum packet size capability;
● Error handling requirements;
● Data transfer direction; and
● Transfer type.
All USB devices are required to implement a default control method that uses both the input
and output endpoints with Endpoint zero. The USB System Software uses this default
control method to initialize and generically manipulate the logical device as the Default
Control Pipe. Endpoint zero is always accessible and provides access to the device’s
configuration and status information as well as some basic control access.
Additional (non-zero) endpoints provide the communication flow required for the
functionality of the device. The non-zero endpoints are available for use only after the device
is configured per the normal device configuration process (see Chapter 9 of the USB
specification, http://www.usb.org).
Packets
USB transactions consist of data packets that contain special codes called Packet IDs
(PIDs). A PID signifies the kind of packet that is being transmitted. While there are more
types of PIDs in a USB system, the uPSD34xx responds to the three types shown in
Table 67
Table 67. Types of packet IDs
PID Type
Token
IN, OUT, SETUP
Data
DATA0, DATA1
Handshake
ACK, NAK, STALL
PID Name
Figure 50 shows an example of packets sent during a USB transfer. The first packet is a
Token Packet with an OUT PID. The OUT PID indicates that the host is going to send data to
the addressed device’s endpoint. The ADDR field contains the address of the device and the
ENDP field contains the endpoint within the addressed device. The CRC5 is a Cyclic
Redundancy Check for error checking.
145/293