SPI/I2C UART with 128-Word FIFOs in WLP
MAX3108
22
Maxim Integrated
Auto Hardware Flow Control
The MAX3108 is capable of auto hardware (RTS and
CTS) flow control without the need for host proces-
sor intervention. When AutoRTS control is enabled,
the MAX3108 automatically controls the RTS hand-
shake without the need for host processor intervention.
AutoCTS flow control separately turns the MAX3108’s
transmitter on and off based on the CTS input. AutoRTS
and AutoCTS flow control modes are independently
enabled by the FlowCtrl[1:0] bits.
AutoRTS Control
AutoRTS flow control ensures that the receive FIFO
does not overflow by signaling to the far-end UART to
stop data transmission. The MAX3108 does this auto-
matically by controlling the RTS output. AutoRTS flow
control is enabled by setting the FlowCtrl[0]: AutoRTS
bit high. The HALT and RESUME programmable values
determine the threshold RxFIFO fill levels at which RTS
is asserted and deasserted. Set the HALT and RESUME
levels in the FlowLvl register. With differing HALT and
RESUME levels, hysteresis of the RxFIFO level can be
defined for RTS transitions.
When the RxFIFO is filled to a level higher than the HALT
level, the MAX3108 deasserts RTS and stops the far-end
UART from transmitting any additional data. RTS remains
deasserted until the RxFIFO is emptied enough so that
the number of words falls to below the RESUME level.
Interrupts are not generated when the HALT and
RESUME levels are reached. This allows the host con-
troller to be completely disengaged from RTS flow con-
trol management.
AutoCTS Control
When AutoCTS flow control is enabled, the UART auto-
matically starts transmitting data when the CTS input
is logic-low and stops transmitting data when CTS is
logic-high. This frees the host processor from manag-
ing this time-critical flow-control task. AutoCTS flow
control is enabled by setting the FlowCtrl[1]: AutoCTS
bit high. The ISR[7]: CTSInt interrupt works normally dur-
ing AutoCTS flow control. Set the IRQEn[7]: CTSIntEn
bit low to disable routing of CTS interrupts to IRQ and
ensure that the host does not receive interrupts from
CTS transitions. If CTS transitions from low to high during
transmission of a data word, the MAX3108 completes the
transmission of the current word and halts transmission
afterwards.
Turn the transmitter off by setting the MODE1[1]: TxDisabl
bit high before enabling AutoCTS control.
Auto Software (XON/XOFF) Flow Control
When auto software flow control is enabled, the MAX3108
recognizes and/or sends predefined XON/XOFF charac-
ters to control the flow of data across the asynchronous
serial link. The XON character signifies that there is
enough room in the receive FIFO and transmission of
data should continue. The XOFF character signifies that
the receive FIFO is nearing overflow and that the trans-
mission of data should stop. Auto software flow control
works autonomously and does not require host interven-
tion, similar to auto hardware flow control. To reduce the
chance of receiving corrupted data that equals a single-
byte XON or XOFF character, the MAX3108 allows for
double-wide (16-bit) XON/XOFF characters. The XON
and XOFF characters are programmed into the XON1,
XON2 and XOFF1, XOFF2 registers.
The FlowCtrl[7:3] bits are used for enabling and config-
uring auto software flow control. An interrupt is generated
in ISR[1]: SpCharInt whenever an XON or XOFF charac-
ter is received and details are stored in the SpclCharInt
register. Set the IRQEn[1]: SpclChrIEn bit low to disable
routing of the interrupt to IRQ.
Software flow control consists of transmit flow control
and receive flow control, which operate independently
of each other.
Receiver Flow Control
When auto receive flow control is enabled by the
FlowCtrl[7:6] bits, the MAX3108 automatically controls
the transmission of data by the far-end UART by send-
ing XOFF and XON control characters. The HALT and
RESUME levels determine the threshold RxFIFO fill levels
at which the XOFF and XON characters are sent. HALT
and RESUME are programmed in the FlowLvl register.
With differing HALT and RESUME levels, hysteresis can
be defined in the RxFIFO fill level for the receiver flow
control activity.
When the RxFIFO is filled to a level higher than the HALT
level, the MAX3108 sends an XOFF character to stop
data transmission. An XON character is sent when the
RxFIFO is emptied enough so that the number of words
falls to below the RESUME level.
If double-wide (16-bit) XON/XOFF characters are select-
ed by setting the FlowCtrl[7:6] bits to 11, then XON1/
XOFF1 are transmitted before XON2/XOFF2 whenever a
control character is transmitted.