DMA Controller
8-32
Am186™CC/CH/CU Microcontrollers User’s Manual
Microcontrollers Register Set Manual, order #21916. Even when the ring size is set
to 1, that entry is still interpreted as a descriptor, not as the memory buffer itself.
5. Point to the first buffer descriptor by clearing the SDxCBD register to 0.
Program the Interrupt Conditions
The interrupt conditions are typically configured only once.
1. Write the interrupt handler address to the vector table. See Chapter 7, “Interrupts.”
2. To generate an interrupt after transmitting the last byte of the packet, set the TEPI bit in
the SDxCON register to 1.
3. To generate an interrupt after detecting an unavailable buffer during transmission, set
the TBUI bit in the SDxCON register to 1.
4. To generate an interrupt after transmitting the last byte of the current buffer, set the TTCI
bit in the SDxCON register to 1. (Note that the TTCE bit in Word 2 of the transmit buffer
descriptor ring must also be set to 1.)
5. Program the priority of this channel relative to other channels during simultaneous
transfers using the P bit in the SDxCON register (this is typically configured only once).
A 00b is a low priority; a 01b, medium; and a 10b, high.
Software clears the status bits in SDxSTAT after receiving an interrupt. Software can
use the SDxCBD register to monitor the transmit and receive buffers. Software can also
use the SDxCTAD register to determine the address in memory where the DMA transmit
process was interrupted.
Add Data Buffers to the Transmit Descriptor Ring
To place a data buffer in an entry in the transmit buffer descriptor ring:
1. Find the first buffer descriptor for which the OWN bit is clear (bit = 0). This must be done
in a circular manner relative to the current buffer descriptor index. In systems where the
TXS0 or RXS0 bits are set, thereby inhibiting clearing of the OWN bits, software must
determine when it is safe to modify a descriptor ring entry.
2. Program the data buffer address.
a. Program the LADR bits in Word 0 to the low-order 16 address bits of the data buffer
pointed to by the descriptor.
b. Program the HADR bits in Word 1 to the high-order eight address bits of the data
buffer pointed to by the descriptor. The highest four bits of the address must be set to
0000b. These address bits do not exist on the Am186CC/CH/CU microcontrollers’
20-bit address but are provided for LANCE compatibility.
3. Program the data buffer size by setting the BCNT bits in Word 2 to the length in bytes
of the data buffer pointed to by the descriptor.
4. Initialize the transmit buffer descriptor ring entries.
a. Set to 1 the TTCE bit in Word 2 to enable interrupt on terminal count; or clear to 0 to
disable terminal count interrupt. (Note that the TTCI bit in the SDxCON register must
also be set to 1.)
b. Set to 1 the STP bit in Word 1 to indicate that this is the first buffer of the packet, or
clear to 0 if the buffer contains a continuation of a packet from another buffer.
c. Set to 1 the ENP bit in Word 1 to indicate that this is the last buffer of the packet, or
clear to 0 if the packet does not fit in one buffer and is continued in another.
Содержание 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...