9397 750 XXXXX
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual
Rev. 01 — 15 August 2005
228
Philips Semiconductors
UM10139
Volume 1
Chapter 14: USB Device Controller
14.9.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 in the buffer. The command code of
‘select endpoint’ is equal to the physical endpoint number. In the case of single buffer,
B_2_FULL bit is not valid.
Table 232: Select Endpoint Register bit description
Bit
Symbol
Value Description
Reset
value
0
F/E
The F/E bit gives the ORed result of B_1_FULL and B_2_FULL
bits.
0
0
For IN endpoint if the next write buffer is empty this bit is 0.
1
For OUT endpoint if the next read buffers is full this bit is 1.
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 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.
6
B_2_FULL
The buffer 2 status.
0
0
Buffer 2 is empty.
1
Buffer 2 is full.
7
-
-
Reserved, user software should not write ones to reserved bits.
The value read from a reserved bit is not defined.
NA