Information
42.3 Functional description
The USB-FS 2.0 full-speed/low-speed module communicates with the processor core
through status registers, control registers, and data structures in memory.
42.3.1 Data Structures
The function of the device operation is to transfer a request in the memory image to and
from the Universal Serial Bus. To efficiently manage USB endpoint communications the
USB-FS implements a Buffer Descriptor Table (BDT) in system memory. See Figure
42-3.
42.4 Programmers interface
This section discusses the major components of the programming model for the USB
module.
42.4.1 Buffer Descriptor Table
To efficiently manage USB endpoint communications the USB-FS implements a Buffer
Descriptor Table (BDT) in system memory. The BDT resides on a 512-byte boundary in
system memory and is pointed to by the BDT Page Registers. Every endpoint direction
requires two 8-byte Buffer Descriptor (BD) entries. Therefore, a system with 16 fully
bidirectional endpoints would require 512 bytes of system memory to implement the
BDT. The two BD entries allows for an EVEN BD and ODD BD entry for each endpoint
direction. This allows the microprocessor to process one BD while the USB-FS is
processing the other BD. Double buffering BDs in this way allows the USB-FS to
transfer data easily at the maximum throughput provided by USB.
The software API intelligently manages buffers for the USB-FS by updating the BDT
when needed. This allows the USB-FS to efficiently manage data transmission and
reception, while the microprocessor performs communication overhead processing and
other function dependent applications. Because the buffers are shared between the
microprocessor and the USB-FS, a simple semaphore mechanism is used to distinguish
who is allowed to update the BDT and buffers in system memory. A semaphore, the
OWN bit, is cleared to 0 when the BD entry is owned by the microprocessor. The
microprocessor is allowed read and write access to the BD entry and the buffer in system
Functional description
K20 Sub-Family Reference Manual, Rev. 1.1, Dec 2012
1032
Preliminary
Freescale Semiconductor, Inc.
General Business Information
