Addressing Bdt Entries; Buffer Descriptors (Bds) - NXP Semiconductors MKL27Z128VFM4 Reference Manual

Table of Contents

Advertisement

Programmers interface

33.4.3 Addressing BDT entries

An understanding of the addressing mechanism of the Buffer Descriptor Table is useful
when accessing endpoint data via USBFS 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 fewer 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 USBFS or MCU core.
When a USB token on an enabled endpoint is received, USBFS uses its integrated DMA
controller to interrogate the BDT. USBFS reads the corresponding endpoint BD entry to
determine whether it owns the BD and corresponding buffer in system memory.
To compute the entry point into the BDT, the BDT_PAGE registers are concatenated
with the current endpoint and the TX and ODD fields to form a 32-bit address. This
address mechanism is shown in the following tables:
31:24
BDT_PAGE_03
Field
BDT_PAGE
ENDPOINT
TX
ODD
Maintained within the USBFS SIE. It corresponds to the buffer currently in use. The buffers are used

33.4.4 Buffer Descriptors (BDs)

A buffer descriptor provides endpoint buffer control information for USBFS and the
processor. The Buffer Descriptors have different meaning based on whether it is USBFS
or the processor reading the BD in memory.
536
Table 33-2. BDT Address Calculation
23:16
BDT_PAGE_02
BDT_PAGE_01[7:1]
Table 33-3. BDT address calculation fields
BDT_PAGE registers in the Control Register Block
ENDPOINT field from the USB TOKEN
1 for transmit transfers and 0 for receive transfers
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
15:9
8:5
Endpoint
Description
in a ping-pong fashion.
4
3
2:0
TX
ODD
000
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents