Universal Serial Bus (USB)
18-20
Am186™CC/CH/CU Microcontrollers User’s Manual
automatically between the endpoint’s FIFO and memory (or I/O), possibly using even less
overhead than general-purpose DMA. Software interaction is still required to handle FIFO
and USB packet errors.
Selection of what type (if any) of DMA to use for a particular type of USB data pipe should
take into account several issues:
■
SmartDMA channels may be better for some tasks. For example, SmartDMA channels
can transition from one FIFO to the next without incurring any interrupt overhead or
latency.
■
General-purpose DMA is simpler to program and understand for many tasks.
■
Each SmartDMA channel is only capable of operation in a single direction. Because
each endpoint is associated with a particular SmartDMA channel, a given system can
have a maximum of two endpoints for any direction (IN or OUT).
When selecting DMA channels to use, be sure to consider other microcontroller functions
(such as HDLC or UARTS) that might be using DMA. See “DMA Trade-Offs” on page 18-6.
18.5.6.2
DMA/FIFO Interaction
Unlike the polled I/O or interrupt methods, in DMA mode the maximum packet size can be
programmed to a value greater than the physical size of the FIFO. Because of this, the
protocol for filling or emptying a FIFO is different than when using polled I/O or interrupts.
The FIFO in the endpoint operates in a circular fashion while in DMA mode.
For a receive (OUT) endpoint, the USB peripheral controller issues a DMA request
whenever the FIFO is not empty. It continues to assert the DMA request until the FIFO is
empty. The USB peripheral controller detects that a receive transaction has completed;
either successfully or unsuccessfully. If a SmartDMA channel is configured to store packet
status to the FIFO descriptor, it handles packet errors automatically and places the error
status in the last three bytes sent. If general-purpose DMA is used, or if a SmartDMA
channel is configured to not store packet status in the FIFO descriptor, bits in the endpoint’s
status register can cause an interrupt when an error occurs.
For a transmit (IN) endpoint, a DMA request is asserted whenever the FIFO is not full. The
request assertion continues until the FIFO is full. Data bytes can be marked either as the
last byte of the transfer or as a null byte. If the endpoint is configured to use a general-
purpose DMA channel, it can indicate the last byte upon reaching the terminal count. If the
Table 18-4
USB Endpoints Used with DMA
USB Endpoint
DMA Channel
USB data Endpoint (A–D) configured in either direction
Any General-Purpose DMA Channel, 0–3
USB data Endpoint A if configured as a USB OUT (receive) endpoint
1
Notes:
1. SmartDMA Channels 2 and 3 Transmit and Receive cannot be assigned to different peripherals. For example, if
SmartDMA Channel 2 Receive is assigned to USB data endpoint A, then SmartDMA Channel 2 Transmit can be
used for USB data endpoint B, but cannot be used with the HDLC controller on the Am186CC microcontroller.
SmartDMA Pair 2 Receive Channel
USB data Endpoint B if configured as a USB IN (transmit) endpoint. SmartDMA Pair 2 Transmit Channel
USB data Endpoint C if configured as a USB OUT endpoint
SmartDMA Pair 3 Receive Channel
USB data Endpoint D if configured as a USB IN endpoint
SmartDMA Pair 3 Transmit Channel
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...