Nxp Semiconductors UM10237 用户手册

下载
页码 792
UM10237_2
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 02 — 19 December 2008 
368 of 792
NXP Semiconductors
UM10237
Chapter 13: LPC24XX USB device controller
11.10 Select Endpoint (Command: 0x00 - 0x1F, Data: read 1 byte (optional))
The Select Endpoint command initializes an internal pointer to the start of the selected 
buffer in EP_RAM. Optionally, this command can be followed by a data read, which 
returns some additional information on the packet(s) in the endpoint buffer(s). The 
command code of the Select Endpoint command is equal to the physical endpoint 
number. In the case of a single buffered endpoint the B_2_FULL bit is not valid.
 
Table 354. Select Endpoint Register bit description
Bit
Symbol
Value Description
Reset 
value
0
FE
Full/Empty.  This bit indicates the full or empty status of the 
endpoint buffer(s).  For IN endpoints, the FE bit gives the 
ANDed result of the B_1_FULL and B_2_FULL bits. For OUT 
endpoints, the FE bit gives ORed result of the B_1_FULL and 
B_2_FULL bits.  For single buffered endpoints, this bit simply 
reflects the status of B_1_FULL.
0
0
For an IN endpoint, at least one write endpoint buffer is empty. 
1
For an OUT endpoint, at least one endpoint read buffer is full. 
1
ST
Stalled endpoint indicator.
0
0
The selected endpoint is not stalled.
1
The selected endpoint is stalled.
2
STP
SETUP bit: the value of this bit is updated after each 
successfully received packet (i.e. an ACKed package on that 
particular physical endpoint). 
0
0
The STP bit is cleared by doing a Select Endpoint/Clear 
Interrupt on this endpoint.
1
The last received packet for the selected endpoint was a 
SETUP packet.
3
PO
Packet over-written bit.
0
0
The PO bit is cleared by the ‘Select Endpoint/Clear Interrupt’ 
command.
1
The previously received packet was over-written by a SETUP 
packet. 
4
EPN
EP NAKed bit indicates sending of a NAK. If the host sends an 
OUT packet to a filled OUT buffer, the device returns NAK. If 
the host sends an IN token packet to an empty IN buffer, the 
device returns NAK.
0
0
The EPN bit is reset after the device has sent an ACK after an 
OUT packet or when the device has seen an ACK after sending 
an IN packet.
1
The EPN bit is set when a NAK is sent and the interrupt on NAK 
feature is enabled. 
5
B_1_FULL
The buffer 1 status.
0
0
Buffer 1 is empty.
1
Buffer 1 is full.