DMA Controller
8-12
Am186™CC/CH/CU Microcontrollers User’s Manual
8.5.6.1
General-Purpose DMA Usage
Note: Before using the general-purpose DMA channels, ensure multiplexed signals are
configured to reflect the use of DMA and not other functionality (see Table 8-1 on page 8-4).
To use any of the four general-purpose DMA channels, software must perform the following
steps. Note that while the source, destination, and count registers can be set in any order,
the control registers must be set last.
1. Specify the source address in the GDxSRCL and GDxSRCH source address registers
for the corresponding DMA channel.
2. Specify the destination address in the GDxDSTL and GDxDSTH destination address
registers for the corresponding DMA channel.
3. Specify the transfer count in the GDxTC count register for the corresponding DMA
channel.
4. When performing a DMA transfer to or from a peripheral, configure the DMA before
enabling the peripheral. For configuration of peripherals, see the applicable chapter.
5. Configure the DMA transfer options in the GDxCON0 and GDxCON1 control registers
for the corresponding DMA channel.
6. Enable DMA transfer in the GDxCON0 and GDxCON1 control registers for the
corresponding DMA channel.
All DMA registers except the GDxCON0 and GDxCON1 registers can be modified while
the channel is operating. Any changes made to these registers affect the current DMA
transfer.
8.5.6.2
General-Purpose DMA Cycle
The four general-purpose DMA channels on the Am186CC/CH/CU microcontrollers are
completely interchangeable, and the register sets are identical. From the programmer’s
point of view, a DMA cycle proceeds as follows:
1. The DMA channel receives a DMA request. Each DMA channel can service requests
from Timer 2, an external peripheral, or the internal UARTs.
DMA channels on the Am186CC and Am186CU microcontrollers can also service
requests from the USB peripheral controller.
DMA channels can also be set to unsynchronized, which causes the DRQ to be
continuously asserted. This is used for memory-to-memory transfers.
2. The DMA controller reads a byte or word from the programmed source address, which
can be in I/O space or in memory, and then writes that byte or word to the programmed
destination address, which can also be in I/O space or memory. Unless the channel is
set to unsynchronized or to accept requests from Timer 2, the channel should be
programmed so that either reading from the source or writing to the destination clears
the request. For example, reading from the Serial Port Receive Data (SPRXD) register
clears a UART receive DMA request.
3. The source and destination address pointers are then adjusted by independently
programmable amounts. The adjustment increment for each pointer can be 0 (e.g., for
a peripheral address that does not change), +1, +2, –1, or –2. (Unpredictable results
may occur when the transfer size is a word (two bytes) and the adjustment increment is
1 or –1; when the transfer size is one byte and the adjustment increment is +2 or –2,
the high byte is ignored.) To implement circular buffers, the pointers can also wrap on
1-, 2-, 4-, 8-, 16-, 32-, or 64-Kbyte boundaries.
CU
CC
Содержание 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...