UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
223 of 362
NXP Semiconductors
UM10208
Chapter 17: LPC2800 USB Device
8.17 USB Endpoint Control Register (USBECtrl - 0x8004 1028)
Note: Reading from a empty buffer or writing to a full buffer are prohibited, and will result
in undefined behavior. This warning applies only to software: a DMA channel is
hardware-controlled not to do this.
Table 247. USB Endpoint Control Register (USBECtrl - 0x8004 1028)
Bit
Symbol
Description
Master
Reset
value
Bus
Reset
value
0
STALL
A 1 in this bit stalls the endpoint selected by the USBEIX
register.
0
0
1
TO_STATUS This bit only applies to Control Endpoint 0. If this bit is 0, the
USB controller sends a NAK in response to an IN or OUT
token. This bit is cleared by Master or Bus Reset, after
completion of the status phase, and on receipt of a SETUP
token. Write a 1 to this bit to move to the status phase of the
control transfer. A 1 in this bit causes the USB controller
send an empty packet in response to an IN token, and an
ACK in response to an OUT token.
0
0
2
TO_DATA
This bit only applies to Control Endpoint 0. When a SETUP
token is received for this endpoint, write a 1 to this bit to
move to the data phase of the control transfer.
0
0
3
-
Reserved, software should not write ones to reserved bits.
The values read from reserved bits is not defined.
-
-
4
CLRBUF
Select an OUT endpoint in the USBEIX register, then write a
1 to this bit to clear its RX buffer. The RX buffer is cleared
automatically when software or a DMA channel has read all
the data from it, so this bit is used only to “forcefully” clear
the buffer.
0
0
5
BUFFULL
A 1 in this read-only bit indicates that the buffer of the
endpoint selected by the USBEIX register is full. For IN (TX)
endpoints, this bit is set when the buffer is validated, and
cleared when the packet is sent and a ACK is received.
For OUT (RX) endpoints, the USB controller sets this bit
when it sends an ACK for a received packet, and cleared
when software or a DMA channel has read all the data from
the buffer.
For double-buffered OUT (RX) endpoints, this bit is 1 if
either or both of the buffer(s) is (are) full. For
double-buffered IN (TX) endpoints, this bit is 1 if both buffers
are full.
0
0
31:6 -
Reserved, software should not write ones to reserved bits.
The values read from reserved bits is not defined.
-
-