DMA Controller
Am186™CC/CH/CU Microcontrollers User’s Manual
8-43
The following facilities aid in SmartDMA channel circular buffer management:
■
When receiving transparent HDLC data, no buffer status is transferred to the SmartDMA
channel. The received data is simply a continuous stream of samples, and the
SmartDMA controller keeps cycling through buffers without ever storing an EOP.
■
The TXSO and RXSO bits in the SDxCON registers can be set to keep the DMA controller
from returning buffer descriptors to the software. If the OWN bit is never updated, the
DMA controller can run through the descriptor ring multiple times without software
intervention.
■
The SDxCTAD and SDxCRAD registers can be read to determine the current buffer
position, to enable a software PLL to be able to control the rate of buffer filling/emptying.
■
If an error occurs, the SDxCBD registers can restart the DMA at any arbitrary point in
the buffer.
In the simplest instance, a circular buffer can be formed by using a ring with a single
descriptor. The descriptor contains the starting address and length of the circular buffer,
and the STP and OWN bits must be set so that the DMA controller uses the buffer.
If code is to allow for adjustment of the buffer pointer (e.g., in case a USB isochronous
transfer has an error or is missing), then the ring should have two descriptors in it. Each
descriptor points to a portion of the physical buffer, and the DMA can be started at any
arbitrary point by adjusting the descriptors’ starting addresses and lengths, and setting the
SDxCBD registers to point to the correct descriptor.
8.5.8
DMA and USB
The integrated USB peripheral controller is the only Am186CC and Am186CU
microcontroller peripheral capable of using either general-purpose DMA or a SmartDMA
channel. Each of the four USB data endpoints is connected to a single SmartDMA channel,
and can be connected to any of the general-purpose DMA channels. DMA is a powerful
tool when used with the USB peripheral controller. In addition to providing increased
throughput and responsiveness to USB requests, it allows the use of larger packets, and
it enables the USB peripheral controller’s automatic rate control feature for isochronous
transfers based on the PCM highway frame clock or an external frame clock source.
For more information about using DMA with the USB peripheral controller, see Chapter 18,
“Universal Serial Bus (USB).”
8.5.9
Software-Related Considerations
Software must stop DMA operation before writing to the GDxCON1 register, or the results
are unpredictable. Stopping the SmartDMA channel has no effect while a request is pending
on the channel. Before stopping the channel, make sure the requesting peripheral (HDLC
channel or USB endpoint) is stopped.
8.5.10
Comparison to Other Devices
■
The general-purpose DMA channels are the same as on other Am186 controllers.
■
SmartDMA channels are compatible with the Am79C90 C-LANCE DMA.
CC
CU
Summary of Contents for Am186 CC
Page 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Page 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Page 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Page 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Page 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Page 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Page 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Page 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Page 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...