
CD2431 — Advanced Multi-Protocol Communications Controller
52
Datasheet
6. The CD2431 sets the EOB and EOF bits. This notifies the host that the end of the buffer and
frame have been reached. The CD2431 also clears the 2431own bit to return the buffer to the
host.
Example 2
Receive a frame on channel 0, which consists of three buffers chained together. The frame is 240
bytes long, and the maximum buffer size is 100.
1. The host checks the Nrbuf bit (DMABSTS[1]) for channel 0 to determine which buffer is next.
In this example, Nrbuf set to ‘1’ indicates that buffer B is used next.
2. The host sets up the starting address (BRBADR). Buffer size is set to ‘100’ in this example.
Thus, the host sets BRBCNT to ‘100’.
3. The host then sets the 2431own bit to give ownership to the CD2431.
4. The host should know the amount of time it takes to receive 100 bytes, because this is the
minimum time the host has to set up the next buffer link. If the host fails to do this in time,
there is a receiver overrun, and the received frame is lost.
5. Suppose that the CD2431 starts receiving data into buffer B of channel 0. When this is started,
the Nrbuf bit is cleared to ‘0’ by the CD2431 to help the host keep track of which buffer is
next. (During this time or prior, the host has made buffer A ready.)
6. After the CD2431 has received the first link of the frame into buffer B, it sets the EOB and
SOB bits and clears the EOF bit. This indicates that the first link in a chain has been received.
Also, the CD2431 clears the 2431own bit, and returns ownership of the buffer to the host.
For the first received link, the received byte count (BRBCNT) remains unchanged at 100,
since the received data filled the buffer.
7. The CD2431 optionally interrupts the host with the EOF bit clear (RISRh[6]) and the EOB bit
set (RISRh[5]) to indicate that the received buffer is complete, and that there was chaining.
8. The ARBSTS register indicates that the CD2431 has ownership of buffer A for transmission of
the next link.
9. As the frame continues to be received, the data goes into 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.
10. After the CD2431 has received the second link into buffer A, the CD2431 sets the EOB bit and
clears the 2431own bit in the ARBSTS. This returns ownership of the buffer to the host.
As with the first link, the received byte count (ARBCNT) remains unchanged at 100 since the
received data filled the buffer.
11. The CD2431 optionally interrupts the host with the EOF bit clear and the EOB bit set in the
RISR to indicate that the received buffer is complete and that there was chaining.
12. By this time the host has set up a new buffer for buffer B.
13. The CD2431 receives data into buffer B in the same manner as previously explained.
14. In this example, the third link does not fill the buffer. Thus, when the end-of-frame delimiter is
detected by the CD2431, the value of 40 (for 40 received bytes) is written into the received
byte count (BRBCNT).
15. Next, the CD2431 sets the EOB and EOF bits to show that the buffer is complete, and that this
is the last link in the chain.