
1999 May 10
33
Philips Semiconductors
Preliminary specification
Universal Serial Bus (USB) CODEC
UDA1325
Table 26
Error codes
Table 27
ERROR
CODE
RESULT
0000
0001
no error
PID encoding error; bits 7 to 4 in the PID
token are not the inversion of bits 3 to 0
PID unknown; PID encoding is valid, but PID
does not exist
unexpected packet; packet is not of the type
expected (token, data or acknowledge), or
SETUP token received on non-control
endpoint
token CRC error
data CRC error
time out error
babble error
unexpected end-of-packet
sent or received NAK
sent stall, a token was received, but the
endpoint was stalled
overflow error, the received data packet was
larger then the buffer size of the selected
endpoint
sent empty packet (ISO only)
bitstuff error
error in sync
wrong data PID
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
BIT
DESCRIPTION
Data receive/transmit
a ‘1’ indicates data has
been received or
transmitted successfully
see Table 26
a ‘1’ indicates the last
received packet had a
SETUP token (this will
always read ‘0’ for IN
buffers)
a ‘1’ indicates the last
received packet had a
DATA 1 PID
a ‘1’ indicates a second
event occurred before the
previous status was read
Error code
Setup packet
Data 0/1 packet
Previous status not read
S
ET ENDPOINT STATUS
Command: 40h + endpoint index.
Data: write 1 byte.
This command is used to stall or unstall an endpoint. Only
the least significant bit has a meaning. When the stalled bit
is equal to 1, the endpoint is stalled, when equal to 0, the
endpoint is unstalled. There is one command for every
endpoint.
A stalled control endpoint is automatically unstalled when
it receives a SETUP token, regardless of the contents of
the packet. If the endpoint should stay in stalled state, the
microcontroller should restall it.
When a stalled endpoint is unstalled, it is also re-initialized.
This means that its buffer is flushed and the next DATA
PID that will be sent or expected (depending on the
direction of the endpoint) is DATA0.
R
EAD BUFFER
Command: F0h.
Data: read n bytes (max. 10).
The read buffer command is followed by a number of data
reads, which returns the contents of the selected endpoint
data buffer. After each read, the internal buffer pointer is
incremented by 1.
The buffer pointer is not reset to the buffer start by the read
buffer command. This means that reading a buffer can be
interrupted by any other command (except for select
endpoint).
X
Stalled
Reserved
0
1
2
3
4
5
6
7
X
X
X
X
X
X
Power On Value
0