USB Device Controller
1563
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
Universal Serial Bus (USB)
29.3.1.2 Endpoint Selection Register (EP_NUM)
This read/write register selects and enables the endpoint that can be accessed by the USB device
controller.
Figure 29-29. Endpoint Selection Register (EP_NUM) [address = FCF78A02h]
15
8
Reserved
R-0
7
6
5
4
3
0
Reserved
SETUP_SEL
EP_SEL
EP_DIR
EP_NUM
R-0
RW-0
RW-0
RW-0
RW-0
LEGEND: R/W = Read/Write; R = Read only; -
n
= value at reset
Table 29-32. Endpoint Selection Register (EP_NUM) Field Descriptions
Bit
Field
Value
Description
15-7
Reserved
0
Reserved. Reads return zeros, writes have no effect.
6
SETUP_SEL
Set by the CPU in response to a Setup general USB Interrupt, to access the EP0 read-only Setup
FIFO when reading the DATA register. Setting this bit will clear the IRQ_SRC.Setup bit. When this
bit is set, other EP_NUM register bits must be 0.
Note: After having read the Setup FIFO, the CPU must clear this bit by writing 0 to it.
0
No access
1
Access permitted
The value after system reset or USB reset is low.
5
EP_SEL
Set by the CPU to access the status (STAT_FLG, RXFSTAT) and data (DATA) registers for the
endpoint selected. If the EP_NUM.EP_DIR bit is set to 0, the CPU can read data from endpoint RX
FIFO by reading the DATA register. If the EP_NUM.EP_DIR bit is set to 1, the CPU can write data
into endpoint TX FIFO by writing into the DATA register. After each access to an endpoint during
interrupt handling, the CPU must absolutely clear this bit.
Note: When the CPU sets this bit, it must set the SETUP_SEL bit to 0. After having accessed the
endpoint's FIFO for either read or write access, the CPU must clear this bit by writing a 0 to it.
0
No access
1
Access permitted.
Value after system reset or USB reset is low.
4
EP_DIR
The endpoint direction bit gives the direction associated with the endpoint number selected in
EP_NUM.EP_NUM:
0
OUT endpoint
1
IN endpoint
Value after system reset or USB reset is low.
3-0
EP_NUM
The endpoint number binary encoded in these four bits, associated with the direction given by
EP_NUM.EP_DIR bit, is the current endpoint selected. All reads and writes to the endpoint status
and the control and data locations are for this endpoint.
0
EP0
1h
EP1
:
:
Fh
EP15
Value after system reset or USB reset is low.