
Universal Serial Bus Interface – On-The-Go Module
21-58
Freescale Semiconductor
21.5.3.3
Managing Endpoints
The USB 2.0 specification defines an endpoint (also called a device endpoint or an address endpoint) as a
uniquely addressable portion of a USB device that can source or sink data in a communications channel
between the host and the device. Combination of the endpoint number and the endpoint direction specifies
endpoint address.
The channel between the host and an endpoint at a specific device represents a data pipe. Endpoint 0 for a
device is always a control type data channel used for device discovery and enumeration. Other types of
endpoints are supported by USB include bulk, interrupt, and isochronous. Each endpoint type has specific
behavior related to packet response and error managing. Find more detail on endpoint operation in the USB
2.0 specification.
The USB OTG supports up to four endpoint specified numbers. The DCD can enable, disable, and
configure each endpoint.
Each endpoint direction is essentially independent and can have differing behavior in each direction. For
example, the DCD can configure endpoint 1-IN to be a bulk endpoint and endpoint 1-OUT to be an
isochronous endpoint. This helps to conserve the total number of endpoints required for device operation.
The only exception is that control endpoints must use both directions on a single endpoint number to
function as a control endpoint. Endpoint 0, for example, is always a control endpoint and uses both
directions.
Each endpoint direction requires a queue head allocated in memory. If the maximum is four endpoint
numbers (one for each endpoint direction used by the device controller), eight queue heads are required.
The operation of an endpoint and use of queue heads are described later in this document.
21.5.3.3.1
Endpoint Initialization
After hardware reset, all endpoints except endpoint 0 are uninitialized and disabled. The DCD must
configure and enable each endpoint by writing to the appropriate EPCR
n
register. Each EPCR
n
is split into
an upper and lower half. The lower half of EPCR
n
configures the receive or OUT endpoint, and the upper
half configures the corresponding transmit or IN endpoint. Control endpoints must be configured the same
in the upper and lower half of the EPCR
n
register; otherwise, behavior is undefined.
how to construct a configuration word for endpoint initialization.
Table 21-49. Device Controller Endpoint Initialization
Field
Value
Data Toggle Reset (TXR, RXR)
1 Synchronize the data PIDs
Data Toggle Inhibit (TXI, RXI)
0 PID sequencing disabled
Endpoint Type (TXT, RXT)
00 Control
01 Isochronous
10 Bulk
11 Interrupt
Endpoint Stall (TXS, RXS)
0 Not stalled
MCF5329 Reference Manual, Rev 3
Summary of Contents for MCF5329
Page 106: ...ColdFire Core 3 32 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 148: ...Cache 5 22 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 154: ...Static RAM SRAM 6 6 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 184: ...Power Management 8 18 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 204: ...Reset Controller Module 10 8 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 220: ...System Control Module SCM 11 16 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 228: ...Crossbar Switch XBS 12 8 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 268: ...General Purpose I O Module 13 40 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 392: ...SDRAM Controller SDRAMC 18 30 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 436: ...Fast Ethernet Controller FEC 19 44 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 594: ...FlexCAN 23 30 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 678: ...Pulse Width Modulation PWM Module 26 22 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 684: ...Watchdog Timer Module 27 6 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 704: ...DMA Timers DTIM0 DTIM3 29 12 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 754: ...UART Modules 31 34 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 770: ...I2 C Interface 32 16 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 866: ...Debug Module 36 50 Freescale Semiconductor MCF5329 Reference Manual Rev 3...