
Advanced Multi-Protocol Communications Controller — CD2431
Datasheet
49
7. The CD2431 optionally interrupts the host, with EOF and EOB in the TISR both set to indicate
that the transmission is complete and there was no chaining.
Example 2
Transmit out of channel 0 and chain three buffers into one frame. The frame is 240 bytes long, and
the maximum buffer size is 100.
1. The host checks the Ntbuf bit in the DMABSTS register for channel 0 to determine which
buffer is next. In this example, Ntbuf is set to ‘1’ indicating that buffer B is used next.
2. The host sets up the buffer data, the starting address (BTBADR), and the buffer byte count
(BTBCNT) for the first ‘link’ of the chain to be transmitted. For this example, BTBCNT is set
to ‘100’.
3. The host sets up the BTBSTS (B Buffer Status) register. The EOF bit is cleared to indicate that
this buffer is the first link in a chain. The 2431own bit is set to give ownership to the CD2431.
By setting 2431own, the host commands the CD2431 to start transmission. Thus, everything
must be ready (starting address, buffer, and data count) prior to setting 2431own.
4. At this point, the host has enough time to transmit 100 bytes to set up the next buffer link. If
the host fails to do this in time, there is a transmitter underrun, and the frame is aborted in
HDLC.
5. The CD2431 starts transmitting buffer B from channel 0. When this is started, the Ntbuf bit is
cleared to ‘0’ to indicate that buffer A is next. This helps the host keep track of which buffer is
next. As transmission progresses, the current buffer pointer, TCBADR, is updated by the
CD2431. During this or prior, the host has readied buffer A. For buffer A, the EOF bit in the
ATBSTS register is cleared by the host, indicating that the buffer is not at the end of the chain.
6. At the end of transmission of this buffer, the CD2431 does not add any CRCs or end of frame
delimiters because there is more data for the current frame.
7. After the CD2431 has completed transmission of the first link out of buffer B, the CD2431 sets
the EOB bit and clears the 2431own bit in the BTBSTS. This notifies the host that the
transmission is complete, and returns ownership of the buffer back to the host.
8. The CD2431 optionally interrupts the host with EOF clear and EOB set in the TISR to indicate
that the transmission is complete and chaining occurred.
9. The ATBSTS register indicates that the CD2431 has ownership of buffer A for transmission of
the next ‘link’. The EOF is cleared so that this link is not the last link in the transmitted chain.
10. The CD2431 continues transmission of the current frame, but now transmission is from buffer
A. This is the second link, which is 100 bytes long. During this time, the host must set up a
new buffer B for the third and final link. The BTBCNT for the last link is set to 40 bytes.
11. After the CD2431 has completed transmission of the second link out of buffer A, it sets the
EOB bit and clears the 2431own bit in the ATBSTS. This notifies the host that the
transmission has completed, and returns ownership of the buffer back to the host. As with the
first link, the CD2431 does not add CRCs or ending frame delimiters to this link.
12. The CD2431 optionally interrupts the host with the EOF bit cleared, and the EOB bit set
(TISR[6:5]) to indicate that the transmission is complete and chaining occurred.
13. By this time, the host has set up a new buffer for buffer B. The EOF bit in the BTBSTS is set
to indicate that this is the last link in the chain.
14. The CD2431 transmits buffer B in the same manner as explained earlier. As before, the
CD2431 transmits the number of bytes indicated in the BTBCNT, which is 40 bytes for the
third segment.