DMA Controller
Am186™CC/CH/CU Microcontrollers User’s Manual
8-9
8.5.1
When to Use DMA
Using DMA is appropriate under certain circumstances. In general, using DMA means
trading programming simplicity for efficient data movement between peripherals. For most
devices, using DMA does not mean that interrupt handlers are no longer needed, although
the interrupt handlers perform differently than when DMA is not used.
Using DMA can produce the following benefits:
■
Reduced system interrupt latency, thereby helping to guarantee data integrity
Note that this is often a second-order effect (e.g., if system interrupt latency is too long
for device A, it may be useful to use DMA with device B to rectify it).
■
Reduced bus or CPU cycles
DMA code consumes fewer bus and CPU cycles than interrupt or polling code.
■
Improved communications performance
Some peripheral devices require DMA for proper operation. For example, the USB
peripheral controller in the Am186CC and Am186CU microcontrollers requires DMA to
transmit or receive packets which are larger than an endpoint’s FIFO size.
8.5.2
DMA Priority
DMA channels can be programmed to three levels of priority (a single value applies to both
the transmit and receive channels for one SmartDMA channel pair). Higher priority DMA
channels are granted the bus before lower priority channels and can effectively hold off
lower priority DMA requests for multiple transfers. When two DMA requests of the same
programmed priority have transfers pending, they alternate transfers. When three or more
requests of equal priority have transfers pending, they take turns (i.e., 123123123...).
DMA cycles always have priority over internal CPU cycles except between internally locked
memory accesses or word accesses to odd memory locations. However, an external bus
hold or a refresh cycle takes priority over a DMA cycle.
Because an interrupt request cannot suspend a DMA operation and the CPU cannot access
memory during a DMA cycle, interrupt latency time suffers during sequences of continuous
DMA cycles. However, an NMI request causes all internal DMA activity to halt. This allows
Table 8-5
Am186CU USB Microcontroller DMA Channel Use
DMA Channel
Associated Peripheral
General-Purpose DMA Channels 0–3
Memory-to-memory transfers (note I/O space
can be used in addition to memory space),
Timer 2, external peripherals (via the DRQ
signals), internal UART or High-Speed UART, or
any USB data endpoint (A–D) configured in
either direction
SmartDMA Pair 2 Transmit Channel
USB data endpoint B if configured as a USB IN
endpoint
SmartDMA Pair 2 Receive Channel
USB data endpoint A if configured as a USB
OUT endpoint
SmartDMA Pair 3 Transmit Channel
USB data endpoint D if configured as a USB IN
endpoint
SmartDMA Pair 3 Receive Channel
USB data endpoint C if configured as a USB
OUT endpoint
CU
Содержание 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...