DMA Controller
8-22
Am186™CC/CH/CU Microcontrollers User’s Manual
Software must ensure that this buffer is aligned on a multiple of its size. This is easily done
for statically allocated buffers with a good linker/locator; for dynamically allocated buffers,
the software must waste the size of one buffer. This waste can usually be reduced or
eliminated by allocating and deallocating additional buffers; this is highly dependent on the
operating system and memory allocation library.
Transmitting using DMA and circular buffers is easy and does not require interrupt support.
Note that using DMA for transmission for the UART is not required for data integrity reasons,
so DMA should only be used for UART transmissions if one of the following applies:
■
CPU throughput can be improved by reducing the time spent in the UART interrupt
handler.
■
Transmission throughput can be improved by reducing the latency between transmitted
characters. Note that it is easy to measure intercharacter latency to determine the
maximum possible improvement available by improving UART transmission.
Table 8-9 gives typical register values for using circular buffers with the UARTs.
Table 8-9
Example Register Settings for UARTs and Circular Buffers
General-Purpose DMA
Register
Bit(s) in Register
Value for
Transmit DMA
Value for
Receive DMA
GDxCON0
(Control 0)
ST (Start/Stop)
Clear (is set by load of
GDxTC register)
Set after all other fields
and UART set correctly
AST (Auto Start)
Set
Clear
TC (Terminal Count)
Set
Typically clear
INT (Interrupt)
Clear for single-tasking;
set for multitasking
Set
P (Relative Priority)
Depends on rest of
system
Depends on rest of
system; higher than
transmit
TS (Transfer Size)
0 for 8 bit, 1 for 9 bit
0 for 8 bit, 1 for 9 bit or
extended status
DSEL (DMA Request Select)
(High-Speed) UART
Transmitter
(High-Speed) UART
Receiver
GDxCON
(Control 1)
SM/IO (Source Address Space
Select)
Set (memory)
Clear (I/O)
SAW (Source Address Wrap)
Set to size of buffer
Clear
SINC (Source Increment)
1 for 8 bit, 2 for 9 bit
0
DM/IO (Destination Address
Space Select)
Clear (I/O)
Set (memory)
DAW (Destination Address Wrap) Clear
Set to size of buffer
DINC (Destination Increment)
0
1 for 8 bit, 2 for 9 bit or
extended status
GDxSRCL
(Source Address Low)
DSA[15–0]
Buffer address
MOD 64K
(H)SPRXD
Содержание 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...