Freescale Semiconductor MCF52277 Reference Manual page 427

Table of Contents

Advertisement

20.5.3.6
Managing Transfers with Transfer Descriptors
20.5.3.6.1
Software Link Pointers
It is necessary for the DCD software to maintain head and tail pointers for the linked list of dTDs for each
respective queue head. This is necessary because the dQH only maintains pointers to the current working
dTD and the next dTD executed. The operations described in the next section for managing dTDs assumes
DCD can reference the head and tail of the dTD linked list.
To conserve memory, the reserved fields at the end of the dQH can be used
to store the head and tail pointers, but DCD must continue maintaining the
pointers.
Head Pointer
Check the status of each dTD to determine completed status.
20.5.3.6.2
Building a Transfer Descriptor
Before a transfer can be executed from the linked list, a dTD must be built to describe the transfer. Use the
following procedure for building dTDs.
Allocate an 8-longword dTD block of memory aligned to 8-longword boundaries. The last 5 bits of the
address must equal 00000.
Write the following fields:
1. Initialize the first 7 longwords to 0.
2. Set the terminate bit.
3. Fill in total bytes with transfer size.
4. Set the interrupt on complete bit if desired.
5. Initialize the status field with the active bit set, and all remaining status bits cleared.
6. Fill in buffer pointer page 0 and the current offset to point to the start of the data buffer.
7. Initialize buffer pointer page 1 through page 4 to be one greater than each of the previous buffer
pointers.
Freescale Semiconductor
NOTE
Endpoint QH
Completed dTDs
Figure 20-43. Software Link Pointers
NOTE
MCF52277 Reference Manual, Rev. 1
Universal Serial Bus Interface – On-The-Go Module
current
next
Queued dTDs
Tail Pointer
20-69

Advertisement

Table of Contents
loading

Table of Contents