English
Language : 

PDIUSBD12 Datasheet, PDF (19/35 Pages) NXP Semiconductors – USB interface device with parallel bus
Philips Semiconductors
PDIUSBD12
USB interface device with parallel bus
9397 750 09238
Product data
Table 10: Error codes…continued
Error
code (Binary)
Description
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
11.3.5 Read buffer
Code (Hex) — F0
Transaction — read multiple bytes (max. 130)
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 top of the buffer by the Read Buffer command.
This means that reading or writing a buffer can be interrupted by any other command
(except for Select Endpoint).
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
• etc.
The first two bytes will be skipped in the DMA read operation. Thus, the first read will
get Data byte 1, the second read will get Data byte 2, etc. The PDIUSBD12 can
determine the last byte of this packet through the EOP termination of the USB packet.
11.3.6 Write buffer
Code (Hex) — F0
Transaction — write multiple bytes (max. 130)
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’.
During DMA write operation, the first two bytes will be bypassed. Thus, the first write
will write into Data byte 1, the second write will write into Data byte 2, etc. For
non-isochronous transfer (bulk or interrupt), the buffer should be completely filled
before the data is sent to the host and a switch to the next buffer occurs. The
exception is at the end of DMA transfer indicated by activation of EOT_N, when the
current buffer content (completely full or not) will be sent to the host.
Remark: 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
Rev. 08 — 20 December 2001
© Koninklijke Philips Electronics N.V. 2001. All rights reserved.
19 of 35