User Manual
BCM1250/BCM1125/BCM1125H
10/21/02
B r o a d c o m C o r p o r a t i o n
Document
1250_1125-UM100CB-R
Section 10: Serial Interfaces Page
325
The transmit interrupt can be generated either by there being at least one free entry in the fifo (i.e. when the
duart_tx_rdy status bit is set) or when the fifo is empty. The tx_irq_sel bit in the
duart_mode_reg_1
is used to
select between them. The isr status bit is cleared by the write of the
duart_rx_hold
register that removes the
condition (causes the fifo to go full or not-empty depending on the mode).
The receive interrupt can be generated either by there being at least one character in the fifo (i.e. when the
duart_rx_rdy status bit is set) or when the fifo is full (or almost full). The rx_irq_sel bit in the
duart_mode_reg_1
is used to select between them. The isr status bit is cleared by the read of the
duart_rx_hold
register that
removes the condition (causes the fifo to go empty or not-full depending on the mode).
If the “FIFO full” interrupt source is selected the duart_sig_full field in the
duart_full_ctl
register can be used
to set the number of characters that must be in the receive fifo for the interrupt to be raised. The interrupt is
asserted when the fifo contains more than this number of characters. By default this field is 15, causing the
interrupt when the fifo is completely full. With this setting software must respond to the interrupt and read from
the fifo within one character time to avoid the fifo overflowing and characters being lost. The level at which the
interrupt is raised can be lowered to provide more character times of interrupt latency.
If the duart_int_time field in the
duart_full_ctl
register is non-zero and the uart is set to interrupt on rx full
(duart_rx_irq_sel bit =1) then an interrupt will be raised if the rx fifo is not empty and the link has been idle for
duart_int_time*16 bit times. If duart_int_time is zero then there is no timeout. This timeout ensures that
characters received when the fifo is below threshold will not suffer long latencies before being serviced.
If either the threshold or timeout mechanism are used the receive interrupt status bit in the
duart_isr
register
will be set based on the threshold or timeout. However the duart_rx_ffull bit in the
duart_status
register will
continue to reflect the real full state of the fifo. The fifo will continue to accept characters until it is really full
regardless of threshold and timeout settings.
The change in break interrupt status is set by the detection of the start of a break and by the detection of the
end of a break. It will remain set until the CPU issued a reset break change command to the
duart_cmd
register.
The input line transition detector interrupt combines the state change information for both input lines of the
channel. They are individually enabled in the
duart_aux_ctrl
registers. The interrupt status is cleared by
reading the
duart_inport_chng
register.
L
OOPBACK
There are two loopback modes for diagnostics. They are enabled by setting the duart_chan_mode bits in the
duart_mode_reg_2
.
In local loopback mode the transmitter data output is internally connected to the receiver data input, so any
character transmitted will be received. In this mode the DOUT pin is held idle (high) and the DIN pin is ignored.
During local loopback the transmit module will not check the CTS_TCLKIN pin and the receive module will not
set the RTS_TSTROBE pin even if their enable bits (duart_tx_cts_ena in
duart_mode_reg_2
and
duart_rx_rts_ena in
duart_mode_reg_1
) are set. While the interface is in local loopback mode the receiver
will be active even if it has not been enabled. The transmitter must still be enabled for characters to be sent.
In remote loopback mode data received on the DIN pin is re-clocked and transmitted on the DOUT, the
received character is not put in to the FIFO and no error checking is done. In remote loopback mode received
data is always sent out, the transmit module does not check the CTS_TCLKIN pin even if duart_tx_cts_ena bit
is set in the
duart_mode_reg_2
.