9397 750 XXXXX
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual
Rev. 01 — 15 August 2005
237
Philips Semiconductors
UM10139
Volume 1
Chapter 14: USB Device Controller
shows a typical OUT transfer, where the host concatenates two DMA transfer
lengths of 160 bytes and 100 bytes respectively. As seen on USB, there would be four
packets of 64 bytes (MPS = 64) and a short packet of 4 bytes in ATLE mode unlike Normal
mode with five packets of 64, 64, 32, 64, 36 bytes in the given order.
It is now responsibility of the DMA engine to separate these two transfers and put them in
proper memory locations as pointed by the "DMA_buffer_start_address" field of DMA
Descriptor 1 (DD1) and DMA Descriptor 2 (DD2).
There are two things in OUT transfer of ATLE mode, which differentiate it from the OUT
transfer in Normal mode of DMA operation. The first one is that the Device software does
not know the "DMA_buffer_length" of the incoming transfer and hence this field in DD is
programmed to 0. But by the NDIS protocol, device driver does know at which location in
the incoming data transfer, will the transfer length be stored. This value is programmed in
the field "Message_length_position" of the DD.
It is responsibility of the hardware to read the two byte wide "DMA_buffer_length" at the
offset (from start of transfer) specified by "Message_length_position", from incoming data
and write it in "DMA_buffer_length" field of the DD. Once this information is extracted from
the incoming data and updated in the DD, the transfer continues as in Normal mode of
operation.
It may happen that the message length position points to the last byte in the USB packet,
which means that out of two bytes of buffer length, first (LS) byte is available in the current
packet, and the second (MS) byte would follow in the next packet. To deal with such
situations, the flags "LS_byte_extracted" and "MS_byte_extracted" are used by hardware.
When the hardware reads the LS byte (which is the last byte of USB packet), it writes the
contents of LS byte in position (23:16) of "DMA_buffer_length" field, sets the flag
"LS_byte_extracted" to 1 and updates the DD in System memory (since the packet
transfer is over).
Fig 54. Data transfer in ATLE mode
DMA_buffer_start_
address of DD1
DMA_buffer_start_
address of DD2
Data to be sent
by Host Driver
Data in packets
as seen on USB
Data to be stored in USB
RAM by DMA Engine
160 bytes
100 bytes
64 bytes
64 bytes
32 bytes
32 bytes
64 bytes
4 bytes
160 bytes
100 bytes