Register Map
13-13
USB Function Module
13.2.2.3
Endpoint Direction (EP_Dir)
This bit gives the direction associated with the endpoint number selected in
EP_Num.
0: OUT endpoint
1: IN endpoint
Value after local host or USB reset is low.
13.2.2.4
Endpoint Number (EP_Num)
The endpoint number binary encoded in these four bits, associated to the
direction given by EP_Dir bit, is the current endpoint selected. All reads and
writes to the endpoint status, control, and data locations are for this endpoint.
0000: EP0
0001: EP1
…
.
1111: EP15.
Value after local host or USB reset is low.
13.2.3 Data Register (DATA)
The data register (DATA) is the entry point to write into a selected TX endpoint,
to read data from a selected RX endpoint, or to read data from the setup FIFO.
If selected endpoint direction is OUT, this register is read-only and a write into
it is forbidden. If selected endpoint direction is IN, this register is write-only and
a read of this register is forbidden.
Table 13–4. Data Register (DATA)
Bit
Name
Description
15–0
DATA
Transmit/receive FIFO data
13.2.3.1
Transmit/Receive FIFO Data (DATA)
EP_Dir = 0: This register contains the data received by the USB core from USB
host out or setup transactions. Data can only be read successfully if the
EP_Sel bit is asserted, or if Setup_Sel bit is asserted (for setup data).
EP_Dir = 1: This register contains the data written by the local host to be sent
to the USB host during the next IN transaction. Data can only be written
successfully if the EP_Sel bit is asserted.