English
Language : 

PDIUSBD11 Datasheet, PDF (9/20 Pages) NXP Semiconductors – USB device with serial interface
Philips Semiconductors
USB device with serial interface
Product specification
PDIUSBD11
Read Last Transaction Status
Command
Data
: 40–4Dh
: Read 1 byte
The Read Last Transaction Status command is followed by one data
read that returns the status of the last transaction of the endpoint.
This command also resets the corresponding interrupt flag in the
interrupt register, and clears the status, indicating that it was read.
This command is useful for debugging purposes. Since it keeps
track of every transaction, the status information is overwritten for
each new transaction.
76 54 32 1 0
00 00 00 00
POWER ON VALUE
DATA RECEIVE/TRANSMIT SUCCESS
ERROR CODE (SEE TABLE)
SETUP PACKET
DATA 0/1 PACKET
PREVIOUS STATUS NOT READ
SV00832
Data Receive/
Transmit Success
Error Code
Setup Packet
Data 0/1 Packet
Previous Status not Read
A ‘1’ indicates data has been received
or transmitted successfully.
See Table 1, Error Codes.
A ‘1’ indicates the last successful
received packet had a SETUP token
(this will always read ‘0’ for IN buffers).
A ‘1’ indicates the last successful
received or sent packet had a DATA1
PID.
A ‘1’ indicates a second event occurred
before the previous status was read.
Table 1. ERROR CODES
ERROR
CODE
RESULT
0000 No Error
0001
PID encoding Error; bits 7–4 are not the inversion of
bits 3–0
0010 PID unknown; encoding is valid, but PID does not exist
0011
Unexpected packet; packet is not of the type expected
(= token, data or acknowledge), or SETUP token to a
non-control endpoint
0100 Token CRC Error
0101 Data CRC Error
0110 Time Out Error
0111 Babble Error
1000 Unexpected End-of-packet
1001 Sent or received NAK
1010
Sent Stall, a token was received, but the endpoint was
stalled
1011
Overflow Error, the received packet was longer than
the available buffer space
1101 Bitstuff Error
1111
Wrong DATA PID; the received DATA PID was not the
expected one
Read Endpoint Status
Command
Data
: 80–8Dh
: Read 1 byte
76 54 32 1 0
XX 0 0 0 0 XX
POWER ON VALUE
Setup Packet
STALL
Data 0/1 Packet
Buffer Full
RESERVED
SETUP PACKET
STALL
DATA 0/1 PACKET
BUFFER FULL
RESERVED
SV00833
A ‘1’ indicates the last received packet had a
SETUP token.
A ‘1’ indicates the endpoint is stalled.
A ‘1’ indicates if the last received or sent packet
had a DATA1 PID.
A ‘1’ indicates that the buffer is full.
Read Buffer
Command
Data
: F0h
: Read multiple bytes (max 10)
The Read Buffer command is followed by a number of data reads,
which return 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 or writing a buffer can be
interrupted by any other command (except for Select Endpoint), or
can be done by more than one I2C transaction (read the first 2 bytes
to get the number of data bytes, then read the rest in other
transactions).
The data in the buffer are organized as follows:
• byte 0: Reserved: can have any value
• byte 1: Number/length of data bytes
• byte 2: Data byte 1
• byte 3: Data byte 2
......
Write Buffer
Command
Data
: F0h
: Write multiple bytes (max 10)
The Write Buffer command is followed by a number of data writes,
which load the endpoints buffer. The data must be organized in the
same way as described in the Read Buffer command. The first byte
(reserved) should always be ‘0’. As in the Read Buffer command,
the data can be split up into different I2C data transactions.
WARNING:
There is no protection against writing or reading over a buffer’s
boundary or against writing into an OUT buffer or reading from an IN
buffer. Any of these actions could cause an incorrect operation. Data
in an OUT buffer are only meaningful after a successful transaction.
1999 Jul 22
9