DMA Controller
Am186™CC/CH/CU Microcontrollers User’s Manual
8-31
8.5.7.3.2
Receive Descriptor Ring
If Figure 8-6 is a receive descriptor ring, then the OWN bit in the current buffer descriptor
was 1 when the receive channel began to receive packet x. The packet was not completely
received before reaching the terminal count for buffer 1, so the channel cleared the owner
semaphore for descriptor 1, releasing it for processing by software, and advanced to 2 for
continued reception of the packet. Descriptor 3 has the OWN bit set, indicating that it is
available for use by the receiver either for a continuation of packet x or for the next packet.
Software is currently processing the data in buffer 4 and will set the OWN bit in the descriptor
when it has completed.
8.5.7.4
SmartDMA Channel Usage
Note: Before using the SmartDMA channels, ensure multiplexed pins 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 eight SmartDMA channels (four pairs), the following must be programmed.
Note that this must be done for both the transmitter and the receiver (because SmartDMA
channels must be used in pairs) as well as for each channel pair used. The transmit and
receive channels do not have to be enabled at the same time, but the SmartDMA channel
should be initialized before the request source device is enabled. This allows the controller
to fetch data about the initial receive and transmit buffers before receiving any DRQs. In
addition, because the SmartDMA channel works off of requests from the device, it is always
safe to enable the DMA before the device. Enabling the device before the DMA may result
in data loss or an initial error condition being reported.
8.5.7.4.1
Enabling the Transmit Channel
To enable a SmartDMA transmit channel, software must perform the following tasks:
1. Create the transmit buffer descriptor ring.
2. Program the interrupt channel and configure the SmartDMA channel for interrupts.
3. Add data buffers to the ring.
4. Enable the transmit channel.
Create the Transmit Buffer Descriptor Ring
1. Disable the transmit channel by clearing the TXST bit in the SDxCON register to 0.
2. Allocate the memory for the transmit buffer descriptor ring (see “SmartDMA Channel
Descriptor Format” on page 8-38 for the descriptor ring data structure).
3. Clear the OWN bit for each descriptor to 0 (owned by software).
4. Program the address and size of the transmit buffer descriptor ring into the SmartDMA
channel registers.
a. Program the TRA bits in the SDxTRCAL register to the 12 low-address bits
(bits 15–4) of the descriptor ring address, which is the start location in memory of the
buffer descriptor ring.
b. Program the TRA bits in the SDxTRAH register to the four high-address bits (19–16)
of the descriptor ring address. Because the base address of the ring must be paragraph
aligned (aligned to a 16-byte physical memory boundary), address bits 3–0 are always
zeroes.
c. Program the TRC bits in the SDxTRCAL register to the number of entries in the transmit
descriptor ring (the ring count). Valid values are 1, 2, 4, 8, 16, 32, 64, or 128 descriptors.
For more information about 3-bit encoding, see the
Am186™CC/CH/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...