
Intelligent Two-Channel LAN and WAN Communications Controller — CD2231
Datasheet
47
count. In this case, ATBCNT should be written as a 16-bit word to avoid confusion between two
byte operations. The ATBADR[0–3] should not be reprogrammed during the Append mode. If the
memory space has to be moved, the Append mode must be disabled first. When the final data is
added to the append buffer and ATBCNT has been updated, the host should set the AppdCmp bit
(STCR[5]). When the CD2231 has completed the final transmission, it clears the 2231own bit in
the ATBSTS register, and generates an end-of-buffer interrupt.
5.4.6
Synchronous Transmitter Examples
In
Figure 7, buffers A and B are contained in RAM external to the CD2231. All others
(DMABSTS, ATBADR, TCBADR, ATBCNT, ATBSTS, BTBADR, BTBCNT, and BTBSTS) are
inside the CD2231.
Example 1
Transmit a frame out of channel 1, with no chaining.
1. The host checks the Ntbuf bit in the DMABSTS register for channel 1 to determine which
buffer is next. In this example, Ntbuf is set to ‘0’ indicating that Buffer A is used next.
2. The host sets up the buffer data, the starting address — ATBADR, and the buffer byte count
— ATBCNT.
3. The host sets up the ATBSTS (‘A’ Buffer Status) register. The EOF bit is set to indicate that
there is no chaining. The 2231own bit is set to give ownership to the CD2231. By setting
2231own, the host commands the CD2231 to start transmission. Thus, everything must be
ready (starting address, buffer data, and byte count) prior to setting 2231own.
4. The CD2231 starts frame transmission out of channel 1. When transmission is started, the
CD2231 sets Tbusy bit in DMABSTS. As transmission progresses, the current buffer pointer
(TCBADR) is updated by the CD2231. Also, at the start of transmission, the Ntbuf bit (Next
Buffer) is set to ‘1’ to notify the host that Buffer B is next.
Figure 7. Transmitter A and B Buffers
CD2231 Transmit
DMA Registers
Physical
Memory
Transmit
Buffer
A
Transmit
Buffer
B
ATBADR (32)
ATBCNT (16)
ATBSTS (8)
(Status register)
TABADR (32)
(Currently using Buffer A)
BTBADR (32)
BTBCNT (16)
BTBSTS (8)
(Status register)
Starting Address
Buffer Byte Count
Current Count
Starting Address
Buffer Byte Count
NOTE: Number of bits in each register is shown in parentheses ( ). Buffer
A and Buffer B do not need to be the same length.