
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Serial Data Link Module SDLM
User’s Manual
22-13
V2.2, 2004-01
SDLM_X, V2.0
22.2.5
Block Mode
In Block Mode, the SDLM supports transfer of frames of unlimited length (application
specific). Block mode is selected by BMEN = 1. In this case, only one receive buffer and
the transmit buffer are available. The swap functionality between the two RxBuffers is no
longer supported.
In Block Mode, the receive and the transmit buffers are built as circular buffers of eight
bytes length (transmit buffer) and 16 bytes length (receive buffer, see figures below).
Access in random mode not being useful (but still supported), FIFO mode is
automatically enabled (not depending on RxINCE/TxINCE). During transmission, a
transmit interrupt can be generated each time TxCPU == TxCNT is detected after
transmission of a byte. During reception, a receive interrupt can be generated if
RxCNT0 != RxCPU0 after reception of a byte.
The counting sequence for the transmit buffer is … 6, 7, 0, 1, 2, … representing a circular
buffer of 8 bytes length. The counting sequence for the receive buffer is … 14, 15, 0, 1,
2, … representing a circular buffer of 16 bytes length.
Figure 22-8
Transmit in Block Mode
Note: The SW has to take care that the condition TxCPU == TxCNT after writing a byte
to the transmit buffer in block mode does not become true, otherwise the
transmission will be finished.
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
TxCPU=0
TxCNT=0
Buffer before
CPU loading
Tx circular buffer
TxCNT=0
CPU load TxBuffer
TxCP
U=
3
Block Mode transmission
byte 4 currently
transmitted
interrupt is
generated when
TxCNT=TxCPU
Tx initiated by
setting TxRQ
Tx
CNT=5
CPU continues
loading TxBuffer
TxC
PU=3
TxCNT
=3
end of Block Mode
transmission
MSGTRA
time
time
TxCPU=0
TxCNT=0
Buffer after
Block Mode transmission
TxCP
U=
5
7
6
5
4
3
2
1
0
Tx
CNT=5
TxCP
U=5