
XRT86L30
SINGLE T1/E1/J1 FRAMER/LIU COMBO
REV. P1.0.1
PRELIMINARY
165
6.0
The purpose of the HDLC controllers is to allow messages to be stored for transport in the outbound transmit
framer block or extracted from the receive framer block through the LAPD interface. The Framer has 3 inde-
pendent HDLC controllers. Each HDLC controller has two 96-Byte buffers for Transmit and two 96-Byte buff-
ers for Receive. The buffers are used to insert messages into the out going data stream for Transmit or to ex-
tract messages from the incoming data stream from the Receive path. Total, there are twelve 96-Byte buffers
per channel. This allows multiple HDLC messages to be transported to and from EXAR’s framing device.
HDLC CONTROLLERS AND LAPD MESSAGES
F
IGURE
34. HDLC C
ONTROLLERS
6.1
Once the data link source and the type of message has been chosen, the following programming sequence
can be followed to send (in this example) a 15-bye LAPD message.
P
ROGRAMMING
S
EQUENCE
FOR
S
ENDING
L
ESS
T
HAN
96-B
YTE
M
ESSAGES
N
OTE
:
To send more than 96-Bytes, the programming sequence is slightly modified, which is described in the next section.
1.
Read the Transmit Data Link Byte Count Register to determine which buffer is available.
2.
Enable TxSOT in the Data Link Interrupt Enable Register.
3.
Write 0x0F into the transmit byte count register (assuming buffer 0 was available).
4.
Write the 15-byte message contents into register 0x0600 (automatically incremented).
5.
Enable the LAPD transmission by writing to register 0x0113.
6.
Once TxEOT occurs, the message has been transmitted.
6.2
P
ROGRAMMING
S
EQUENCE
FOR
S
ENDING
L
ARGE
M
ESSAGES
1.
Read the Transmit Data Link Byte Count Register to determine which buffer is available.
2.
Enable TxSOT in the Data Link Interrupt Enable Register.
3.
Write 0x60 into the transmit byte count register (assuming buffer 0 was available).
4.
Write the first 96-bytes into register 0x0600 (buffer 0, automatically incremented).
5.
Enable the LAPD transmission by writing to register 0x0113.
6.
Wait for the TxSOT before writing the next 96-bytes.
7.
Re-initiate the TxSOT interrupt enable.
8.
Write 0xE0 into the transmit byte count register (buffer 1).
9.
Write the next 96-bytes into 0x0700 (buffer 1, automatically incremented).
10.
Enable the LAPD transmission by writing to register 0x0113.
11.
Wait for the TxSOT before writing the next 96-bytes.
12.
Continue until the entire message is sent.
6.3
P
ROGRAMMING
S
EQUENCE
FOR
R
ECEIVING
LAPD M
ESSAGES
Buffer 0
Buffer 1
Transmit
Receive
96-Bytes
96-Bytes
96-Bytes
96-Bytes
Transmit
Receive
96-Bytes
96-Bytes
96-Bytes
96-Bytes
Transmit
Receive
96-Bytes
96-Bytes
96-Bytes
96-Bytes
HDLC1
HDLC2
HDLC3
Buffer 0
Buffer 1
Buffer 0
Buffer 1
Channel N