Information
40.3.3 Addressing BDT entries
An understanding of the addressing mechanism of the Buffer Descriptor Table is useful
when accessing endpoint data via the USB-FS or microprocessor. Some points of interest
are:
• The BDT occupies up to 512 bytes of system memory.
• 16 bidirectional endpoints can be supported with a full BDT of 512 bytes.
• 16 bytes are needed for each USB endpoint direction.
• Applications with less than 16 endpoints require less RAM to implement the BDT.
• The BDT Page Registers (BDT_PAGE) point to the starting location of the BDT.
• The BDT must be located on a 512-byte boundary in system memory.
• All enabled TX and RX endpoint BD entries are indexed into the BDT to allow easy
access via the USB-FS or MCU core.
When a USB token on an enabled endpoint is received, the USB-FS uses its integrated
DMA controller to interrogate the BDT. The USB-FS reads the corresponding endpoint
BD entry to determine whether it owns the BD and corresponding buffer in system
memory.
To compute the entry point in to the BDT, the BDT_PAGE registers is concatenated with
the current endpoint and the TX and ODD fields to form a 32-bit address. This address
mechanism is shown below:
Table 40-2. BDT address calculation fields
Field Description
BDT_PAGE BDT_PAGE registers in the Control Register Block
END_POINT END POINT field from the USB TOKEN
TX 1 for transmit transfers and 0 for receive transfers
ODD Maintained within the USB-FS SIE. It corresponds to the buffer currently in use. The buffers are
used in a ping-pong fashion.
40.3.4 Buffer Descriptors (BDs)
A buffer descriptor provides endpoint buffer control information for the USB-FS and
processor. The Buffer Descriptors have different meaning based on whether it is the
USB-FS or processor reading the BD in memory.
The USB-FS Controller uses the data stored in the BDs to determine:
Programmers interface
K20 Sub-Family Reference Manual, Rev. 2, Feb 2012
888 Freescale Semiconductor, Inc.
