DMA Controller
Am186™CC/CH/CU Microcontrollers User’s Manual
8-33
d. Set to 1 the OWN bit in Word 1 to indicate the descriptor entry is owned by the
SmartDMA channel.
e. To force a poll of the OWN bit of the current buffer descriptor, set to 1 the POLL bit in
the SDxCON register. This has no effect if the SmartDMA is not currently waiting for
a buffer to become available.
5. In the Am186CC microcontroller, when using SmartDMA channel 2 or 3, select one of
two alternate sources by clearing the DSEL bit in the SDxCON register to 0 to select
HDLC or to 1 to select USB.
In the Am186CH HDLC microcontroller, the DSEL bit in the SDxCON register must be
cleared to 0.
In the Am186CU USB microcontroller, the DSEL bit in the SDxCON register must be
set to 1.
Enable the Transmit Channel
Enable the transmit channel by setting the TXST bit in the SDxCON register to 1. At this
point, the SmartDMA transmit channel does not transmit any data because there are no
valid buffers in the descriptor ring. As transmit data becomes available, software should
modify entries in the ring to point to the data to be transmitted. Buffers are added to the
ring at the first ring location following the Current Transmit Buffer Descriptor value that has
an OWN bit set to 0.
8.5.7.4.2
Enabling the Receive Channel
To enable a SmartDMA receive channel, software must perform the following tasks:
1. Create the receive 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 receive channel.
5. Replace used data buffers.
Create the Receive Buffer Descriptor Ring
1. Disable the receive channel by clearing the RXST bit in the SDxCON register to 0.
2. Allocate the memory for the receive buffer descriptor ring (see “SmartDMA Channel
Descriptor Format” on page 8-38 for the descriptor ring data structure).
3. Set the OWN bit for each descriptor to 1 (owned by hardware).
4. Program the address and size of the receive buffer descriptor ring into the SmartDMA
channel registers.
a. Program the RRA bits in the SDxRRCAL 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 RRA bits in the SDxRRAH 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 RRC bits in the SDxRRCAL register to the number of entries in the receive
descriptor ring (the ring count). Valid values are 1, 2, 4, 8, 16, 32, 64, or 128 descriptors.
For information about 3-bit encoding, see the
Am186™CC/CH/CU Microcontrollers
CC
CH
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...