![](http://datasheet.mmic.net.cn/Maxim-Integrated-Products/DS34T102GN-_datasheet_97090/DS34T102GN-_130.png)
____________________________________________________ DS34T101, DS34T102, DS34T104, DS34T108
130 of 366
Register Name
Description
Functions
Page
Rx HDLC Packet Bytes Available Register
Rx real-time byte in FIFO status
Rx HDLC FIFO Register
Rx FIFO read register
Rx Real-Time Status Register 5
Rx FIFO fill and packet status
Rx Latched Status Register 5
Rx FIFO and packet latched status
Rx Interrupt Mask 5
Rx interrupt mask bits
Transmit HDLC Control 1
Tx HDLC configuration bits
Transmit HDLC Bit Suppress
Tx bit suppress within the channel
Transmit HDLC Control 2
Tx HDLC mapping to DS0, etc.
Transmit HDLC FIFO Control
Tx FIFO low water mark
Transmit HDLC Status
Tx FIFO fill and packet status
Transmit HDLC Latched Status
Tx FIFO and packet latched status
Transmit Interrupt Mask Register 2
Tx interrupt mask bits
Transmit HDLC FIFO Buffer Available
Tx real-time buffer available status
Transmit HDLC FIFO
Tx FIFO write register
10.12.1 Receive HDLC Controller
The receive HDLC controller is always enabled. A low-to-high transition on
RHC.RHR resets the receive HDLC
controller and flushes the receive HDLC FIFO. In T1 ESF mode, the receive HDLC controller can be connected to
the FDL
(RHC.RHMS=1) or to any DS0 channel (RHMS=0). In E1 mode, it can be connected to an Sa bit channel
(RHMS=1) or to any DS0 channel (RHMS=0). The
RHC.RHCS field specifies the DS0 channel when RHMS=0.
When
RHC.RCRCD=1, the received CRC-16 (the frame check sequence or FCS) is written to the FIFO after the
last byte of the packet. When RCRCD=0, the CRC-16 is not written to the FIFO. When the receive HDLC controller
is connected to a DS0 channel, it can be configured to look at or ignore individual bit positions of the DS0 channel
by setting the bit fields of the
RHBSE register appropriately.
The CPU can read the receive HDLC FIFO one byte at a time by reading the
RHF register. When the receive
FIFO’s fill status transitions from empty to not-empty,
RLS5.RNES is set to one to inform the CPU that something is
available to be read from the receive FIFO. The lower seven bits of the
RHPBA register (RPBA[6:0]) are a real-time
field that indicates the number of bytes available to be read from the receive FIFO. The MSb of
RHPBA (the
message status bit, MS) indicates whether the bytes indicated by the RPBA field are the end of a message or not.
The CPU must take into account the value of the
RHPBA.RPBA field when reading the FIFO to prevent FIFO
underrun. There is no underrun indication available from the Rx HDLC controller.
If software reads the FIFO more slowly than the Rx HDLC controller writes it, the fill level of the FIFO rises. When
the HDLC fills above the receive high watermark set in
RHFC.RFHWM, the
RLS5.RHWMS latched status bit is set.
If the FIFO overruns, the current packet being processed is dropped, the FIFO is emptied, and the latched status
bit
RLS5.ROVR is set to indicate the overrun.
The real-time status bits in
RRTS5 and the latched status bits in
RLS5 plus the message status bit (MS) in
RHPBAprovide message delineation information to the system. In
RRTS5 the packet status field PS[2:0] indicates the real-
time status of the packet currently being received: in-progress, OK (i.e. ended without error), CRC error, aborted,
terminated because of overrun. In
RLS5, the RHOBT latched status bit indicates when the next byte available in
the FIFO is the first byte of a message, while the RPS and RPE bits indicate that the Rx HDLC controller has
detected the start of packet or the end of a packet, respectively.
The latched status bits in
RLS5 cause interrupt requests if enabled by the associated interrupt enable bits in
RIM5.
10.12.1.1 Receive HDLC Controller Example
The receive HDLC controller status and control fields provide flexibility to support various software implementations
for receive HDLC servicing. Polling, interrupt-driven or combination approaches are all feasible. A flowchart of an