Philips LPC214 Series User Manual page 238

Table of Contents

Advertisement

Philips Semiconductors
Volume 1
On reception of the next packet, looking at "LS_byte_extracted" field 1 and
"MS_byte_extracted" field 0, hardware knows that it has to read the first incoming byte as
MS byte of buffer length, update the position (31:24) of "DMA_buffer_length" with the read
contents and set the flag "MS_byte_extracted". After the extraction of MS byte of DMA
buffer length, the transfer continues as in Normal mode of operation.
The second thing, which differentiates the ATLE mode OUT transfer from Normal mode
OUT transfer, is the behavior in case when DD is retired in between a USB packet
transfer.
As can be seen in the figure earlier, the first 32 bytes of the 3rd packet correspond to DD1
and the remaining 32 bytes correspond to DD2. In such a situation, on reception of first 32
bytes, the first DD (i.e. DD1) is retired and updated in the system memory, the new DD
(pointed by "next_DD_pointer") is fetched and the remaining 32 bytes are transferred to
the location in system memory pointed by "DMA_buffer_start_address" of new DD (i.e.
DD2).
It should be noted that in ATLE mode, the software will always program the
"LS_byte_extracted" and "MS_byte_extracted" fields to 0 while preparing a DD, and hence
on fetching the DD2 in above situation, the Buffer Length Extraction process will start
again as described earlier.
In case if the first DD is retired in between the packet transfer and the next DD is not
programmed, i.e. "next_DD_valid" field in DD1 is 0, then the first DD is retired with the
status "data over run" (DD_status = 1000), which has to be treated as an err or condition
and the DMA channel for that particular endpoint is disabled by the hardware. Otherwise
the first DD is retired with status "normal completion" (DD_status = 0010).
Please note that in this mode the last buffer length to be transferred would always end with
a short packet or empty packet indicating that no more concatenated data is coming on
the way. If the concatenated transfer lengths are such that the last transfer ends on a
packet boundary, the (NDIS) host will send an empty packet to mark the End Of Transfer.
IN Transfer in ATLE mode
The operation in IN transfers is relatively simple than the OUT transfer in ATLE mode
since device software knows the buffer length to be transferred and it is programmed in
"DMA_buffer_length" field while preparing the DD, thus avoiding any transfer length
extraction mechanism.
The only difference for IN transfers between ATLE mode and Normal mode of DMA
operation is that the DDs can get retired in the middle of the USB packet transfer. In such
a case, the hardware will update the first DD in system memory, fetch the new DD pointed
by "next_DD_pointer" field of the first DD and fetch the remaining bytes from system
memory pointed by "DMA_buffer_start_address" of second DD to complete the packet
before sending it on USB.
In the above situation, if the next DD is not programmed, i.e. "next_DD_valid" field in DD is
0, and the buffer length for current DD has completed before the packet boundary, then
the available bytes from current DD are sent as a short packet on USB, which marks the
End Of Transfer for the Host.
9397 750 XXXXX
User manual
Rev. 01 — 15 August 2005
UM10139
Chapter 14: USB Device Controller
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
238

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2148Lpc2141Lpc2142Lpc2144Lpc2146

Table of Contents