
UM10375
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 3 — 14 June 2011
159 of 368
NXP Semiconductors
UM10375
Chapter 10: LPC13xx USB device controller
10.11.9 Get Error Code (Command: 0xFF, Data: read 1 byte)
Different error conditions can arise inside the SIE. The Get Error Code command returns
the last error code that occurred. The 4 least significant bits form the error code.
10.11.10 Select Endpoint (Command: 0x00 - 0x09 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 182. Get Error Code command description
Bit
Symbol
Value
Description
Reset
value
3:0
EC
Error Code.
0x0
0000
No Error.
0001
PID Encoding Error.
0010
Unknown PID.
0011
Unexpected Packet - any packet sequence violation from the
specification.
0100
Error in Token CRC.
0101
Error in Data CRC.
0110
Time Out Error.
0111
Babble.
1000
Error in End of Packet.
1001
Sent/Received NAK.
1010
Sent Stall.
1011
Buffer Overrun Error.
1100
Sent Empty Packet (ISO Endpoints only).
1101
Bitstuff Error.
1110
Error in Sync.
1111
Wrong Toggle Bit in Data PID, ignored data.
4
EA
-
The Error Active bit will be reset once this register is read.
7:5
-
Reserved, user software should not write ones to reserved bits.
The value read from a reserved bit is not defined.
NA
Table 183. Select Endpoint command 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.