XR17D158 [EXAR]

UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART; 通用( 3.3V和5V ) PCI总线八进制UART
XR17D158
型号: XR17D158
厂家: EXAR CORPORATION    EXAR CORPORATION
描述:

UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART
通用( 3.3V和5V ) PCI总线八进制UART

PC
文件: 总72页 (文件大小:1666K)
中文:  中文翻译
下载:  下载PDF数据表文档文件
xr  
XR17D158  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
NOVEMBER 2004  
REV. 1.2.1  
FEATURES  
GENERAL DESCRIPTION  
High Performance Octal PCI UART  
Universal PCI Bus Buffers - Auto-sense 3.3V or 5V  
Operation  
1
The XR17D158 (D158) is an octal PCI Bus  
Universal Asynchronous Receiver and Transmitter  
(UART) with support for PCI Bus universal VIO  
buffers in the same package and pin-out as the  
XR17C158, XR17C154 and XR17D154. The device  
is designed to meet the 32-bit PCI Bus and high  
bandwidth requirement in communication systems. A  
global interrupt source register provides a complete  
interrupt status indication for all 8 channels to speed  
up interrupt parsing. Each UART has its own 16C550  
compatible set of configuration registers, transmit and  
receive FIFOs of 64 bytes, fully programmable  
transmit and receive FIFO level trigger levels,  
transmit and receive FIFO level counters, automatic  
RTS/CTS or DTR/DSR hardware flow control with  
programmable hysteresis levels, automatic software  
(Xon/Xoff) flow control, IrDA (Infrared Data  
32-bit PCI Bus 2.3 Target Signalling Compliance  
A Global Interrupt Source Register for all 8 UARTs  
Data Transfer in Byte, Word and Double-word  
Data Read/Write Burst Operation  
Each UART is independently controlled with:  
16C550 Compatible 5G Register Set  
64-byte Transmit and Receive FIFOs  
Transmit and Receive FIFO Level Counters  
Programmable TX and RX FIFO Trigger Level  
Automatic RTS/CTS or DTR/DSR Flow Control  
Automatic Xon/Xoff Software Flow Control  
RS485 HDX Control Output with Selectable  
Association) encoder/decoder,  
inputs/outputs and a 16-bit general purpose timer/  
counter.  
8
multi-purpose  
Turn-around Delay  
Infrared (IrDA 1.0) Data Encoder/Decoder  
Programmable Data Rate with Prescaler  
Up to 6.25 Mbps Serial Data Rate  
NOTE: 1 Covered by U.S. Patents #5,649,122 and #5,949,787  
APPLICATIONS  
Eight Multi-Purpose Inputs/outputs  
Universal Form Factor PCI Bus Add-in Card  
Remote Access Servers  
Network Management  
Factory Automation and Process Control  
Point-of-Sale Systems  
Multi-port RS-232/RS-422/RS-485 Cards  
A General Purpose 16-bit Timer/counter  
Sleep Mode with Automatic Wake-up  
EEPROM Interface for PCI Configuration  
Same Package and Pin-out as the XR17C158,  
XR17C154 and XR17D154  
FIGURE 1. BLOCK DIAGRAM  
5V VCC  
(Core Logic)  
3.3V or 5V  
VIO  
GND  
UART Channel 0  
CLK  
64 Byte TX FIFO  
TX0, RX0, DTR0#,  
UART  
Regs  
RST#  
AD[31:0]  
IR  
DSR0#, RTS0#,  
CTS0#, CD0#, RI0#  
TX & RX  
ENDEC  
BRG  
64 Byte RX FIFO  
C/BE[3:0]#  
FRAME#  
IRDY#  
UART Channel 1  
PCI Local  
Bus  
Interface  
TRDY#  
UART Channel 2  
UART Channel 3  
UART Channel 4  
UART Channel 5  
Device  
Configuration  
Registers  
DEVSEL#  
STOP#  
INTA#  
IDSEL  
PERR#  
SERR#  
PAR  
UART Channel 6  
Configuration  
Space  
TX7, RX7, DTR7#,  
DSR7#, RTS7#,  
UART Channel 7  
Registers  
CTS7#, CD7#, RI7#  
16-bit  
Timer/Counter  
Multi-purpose  
Inputs/Outputs  
EECK  
EEDI  
EEDO  
EECS  
MPIO0- MPIO7  
EEPROM  
Interface  
XTAL1  
XTAL2  
Crystal Osc/Buffer  
TMRCK  
Exar Corporation 48720 Kato Road, Fremont CA, 94538 (510) 668-7000 FAX (510) 668-7017 www.exar.com  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
FIGURE 2. PIN OUT OF THE DEVICE  
XTAL2  
XTAL1  
109  
110  
72  
71  
CTS5#  
RX5  
ENIR  
TEST# 111  
70  
69  
VCC  
112  
113  
114  
115  
116  
117  
TMRCK  
MPIO4  
MPIO5  
MPIO6  
EEDO  
EEDI  
EECS  
68  
67  
66  
EECK  
TX1  
65  
64  
63  
62  
61  
60  
59  
58  
57  
56  
MPIO7  
VCC  
DTR1# 118  
RTS1# 119  
GND  
TX6  
DTR6#  
120  
121  
RI1#  
RTS6#  
RI6#  
CD1#  
DSR1# 122  
CTS1# 123  
CD6#  
DSR6#  
CTS6#  
RX6  
RX1  
TX0  
124  
125  
DTR0# 126  
RTS0# 127  
55  
54  
53  
52  
51  
XR17D158  
TX7  
RI0#  
DTR7#  
RTS7#  
RI7#  
128  
129  
CD0#  
DSR0# 130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
CTS0#  
RX0  
50 CD7#  
49 DSR7#  
CTS7#  
RX7  
48  
47  
INTA#  
RST#  
CLK  
46  
45  
GND  
VIO  
GND  
VIO  
44 AD0  
43  
42  
AD1  
AD2  
AD31  
AD30  
AD29  
41 AD3  
AD28 141  
40 AD4  
39 AD5  
38 AD6  
AD27  
AD26  
142  
143  
144  
37  
AD25  
AD7  
ORDERING INFORMATION  
PART NUMBER  
PACKAGE  
OPERATING TEMPERATURE RANGE  
0°C to +70°C  
DEVICE STATUS  
Active  
XR17D158CV  
XR17D158IV  
144-Lead TQFP  
144-Lead TQFP  
-40°C to +85°C  
Active  
2
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
PIN DESCRIPTIONS  
NAME  
PIN #  
TYPE  
DESCRIPTION  
PCI LOCAL BUS INTERFACE  
RST#  
134  
135  
I
PCI bus reset input (active low). It resets the PCI local bus configuration  
space registers, device configuration registers and UART channel registers to  
the default condition.  
CLK  
I
PCI bus clock input of up to 33.34MHz.  
Address data lines [31:0] (bidirectional).  
AD31-AD25,  
AD24,  
138-144,  
1,  
IO  
AD23-AD16,  
AD15-AD8,  
AD7-AD0  
6-13,  
26-33,  
37-44  
FRAME#  
15  
I
I
Bus transaction cycle frame (active low). It indicates the beginning and dura-  
tion of an access.  
C/BE0#-  
C/BE3#  
36,25,14,2  
Bus Command/Byte Enable [3:0] (active low). This line is multiplexed for bus  
Command during the address phase and Byte Enables during the data  
phase.  
IRDY#  
16  
I
Initiator Ready (active low). During a write, it indicates that valid data is  
present on data bus. During a read, it indicates the master is ready to accept  
data.  
TRDY#  
STOP#  
IDSEL  
17  
21  
3
O
O
Target Ready (active low).  
Target request to stop current transaction (active low).  
Initialization device select (active high).  
I
DEVSEL#  
INTA#  
18  
133  
24  
22  
O
Device select to the XR17D158 (active low).  
OD  
IO  
O
Device interrupt from XR17D158 (open drain, active low).  
Parity is even across AD[31:0] and C/BE[3:0]# (bidirectional, active high).  
PAR  
PERR#  
Data Parity error indicator, except for Special Cycle transactions (active low).  
Optional in bus target application.  
SERR#  
23  
OD  
System error indicator, Address parity or Data parity during Special Cycle  
transactions (open drain, active low). Optional in bus target application.  
MODEM OR SERIAL I/O INTERFACE  
UART channel 0 Transmit Data or infrared transmit data. Normal TXD output  
idles HIGH while infrared TXD output idles LOW.  
TX0  
RX0  
125  
132  
O
I
UART channel 0 Receive Data or infrared receive data. Normal RXD input  
idles HIGH. The infrared pulses typically idle LOW but can be inverted inter-  
nally prior the decoder by FCTR[4].  
RTS0#  
CTS0#  
DTR0#  
DSR0#  
CD0#  
127  
131  
126  
130  
129  
O
I
UART channel 0 Request to Send or general purpose output (active low).  
UART channel 0 Clear to Send or general purpose input (active low).  
UART channel 0 Data Terminal Ready or general purpose output (active low).  
UART channel 0 Data Set Ready or general purpose input (active low).  
UART channel 0 Carrier Detect or general purpose input (active low).  
O
I
I
3
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
PIN DESCRIPTIONS  
NAME  
RI0#  
TX1  
PIN #  
128  
TYPE  
DESCRIPTION  
I
UART channel 0 Ring Indicator or general purpose input (active low).  
UART channel 1 Transmit Data or infrared transmit data. Normal TXD output  
idles HIGH while infrared TXD output idles LOW.  
117  
O
UART channel 1 Receive Data or infrared receive data. Normal RXD input  
idles HIGH. The infrared pulses typically idle LOW but can be inverted inter-  
nally prior the decoder by FCTR[4].  
RX1  
124  
I
RTS1#  
CTS1#  
DTR1#  
DSR1#  
CD1#  
RI1#  
119  
123  
118  
122  
121  
120  
106  
O
I
UART channel 1 Request to Send or general purpose output (active low).  
UART channel 1 Clear to Send or general purpose input (active low).  
UART channel 1 Data Terminal Ready or general purpose output (active low).  
UART channel 1 Data Set Ready or general purpose input (active low).  
UART channel 1 Carrier Detect or general purpose input (active low).  
UART channel 1 Ring Indicator or general purpose input (active low).  
O
I
I
I
UART channel 2 Transmit Data or infrared transmit data. Normal TXD output  
idles HIGH while infrared TXD output idles LOW.  
TX2  
O
UART channel 2 Receive Data or infrared receive data. Normal RXD input  
idles HIGH. The infrared pulses typically idle LOW but can be inverted inter-  
nally prior the decoder by FCTR[4].  
RX2  
99  
I
RTS2#  
CTS2#  
DTR2#  
DSR2#  
CD2#  
RI2#  
104  
100  
105  
101  
102  
103  
98  
O
I
UART channel 2 Request to Send or general purpose output (active low).  
UART channel 2 Clear to Send or general purpose input (active low).  
UART channel 2 Data Terminal Ready or general purpose output (active low).  
UART channel 2 Data Set Ready or general purpose input (active low).  
UART channel 2 Carrier Detect or general purpose input (active low).  
UART channel 2 Ring Indicator or general purpose input (active low).  
O
I
I
I
UART channel 3 Transmit Data or infrared transmit data. Normal TXD output  
idles HIGH while infrared TXD output idles LOW.  
TX3  
O
UART channel 3 Receive Data or infrared receive data. Normal RXD input  
idles HIGH. The infrared pulses typically idle LOW but can be inverted inter-  
nally prior the decoder by FCTR[4].  
RX3  
91  
I
RTS3#  
CTS3#  
DTR3#  
DSR3#  
CD3#  
RI3#  
96  
92  
97  
93  
94  
95  
88  
O
I
UART channel 3 Request to Send or general purpose output (active low).  
UART channel 3 Clear to Send or general purpose input (active low).d.  
UART channel 3 Data Terminal Ready or general purpose output (active low).  
UART channel 3 Data Set Ready or general purpose input (active low).  
UART channel 3 Carrier Detect or general purpose input (active low).  
UART channel 3 Ring Indicator or general purpose input (active low).  
O
I
I
I
UART channel 4 Transmit Data or infrared transmit data. Normal TXD output  
idles HIGH while infrared TXD output idles LOW.  
TX4  
O
UART channel 4 Receive Data or infrared receive data. Normal RXD input  
idles HIGH. The infrared pulses typically idle LOW but can be inverted inter-  
nally prior the decoder by FCTR[4].  
RX4  
81  
I
4
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
PIN DESCRIPTIONS  
NAME  
RTS4#  
CTS4#  
DTR4#  
DSR4#  
CD4#  
RI4#  
PIN #  
86  
TYPE  
DESCRIPTION  
O
I
UART channel 4 Request to Send or general purpose output (active low).  
UART channel 4 Clear to Send or general purpose input (active low).  
UART channel 4 Data Terminal Ready or general purpose output (active low).  
UART channel 4 Data Set Ready or general purpose input (active low).  
UART channel 4 Carrier Detect or general purpose input (active low).  
UART channel 4 Ring Indicator or general purpose input (active low).  
82  
87  
O
I
83  
84  
I
85  
I
UART channel 5 Transmit Data or infrared transmit data. Normal TXD output  
idles HIGH while infrared TXD output idles LOW.  
TX5  
80  
O
UART channel 5 Receive Data or infrared receive data. Normal RXD input  
idles HIGH. The infrared pulses typically idle LOW but can be inverted inter-  
nally prior the decoder by FCTR[4].  
RX5  
71  
I
RTS5#  
CTS5#  
DTR5#  
DSR5#  
CD5#  
RI5#  
78  
72  
79  
75  
76  
77  
62  
O
I
UART channel 5 Request to Send or general purpose output (active low).  
UART channel 5 Clear to Send or general purpose input (active low).  
UART channel 5 Data Terminal Ready or general purpose output (active low).  
UART channel 5 Data Set Ready or general purpose input (active low).  
UART channel 5 Carrier Detect or general purpose input (active low).  
UART channel 5 Ring Indicator or general purpose input (active low).  
O
I
I
I
UART channel 6 Transmit Data or infrared transmit data. Normal TXD output  
idles HIGH while infrared TXD output idles LOW.  
TX6  
O
UART channel 6 Receive Data or infrared receive data. Normal RXD input  
idles HIGH. The infrared pulses typically idle LOW but can be inverted inter-  
nally prior the decoder by FCTR[4].  
RX6  
55  
I
RTS6#  
CTS6#  
DTR6#  
DSR6#  
CD6#  
RI6#  
60  
56  
61  
57  
58  
59  
54  
O
I
UART channel 6 Request to Send or general purpose output (active low).  
UART channel 6 Clear to Send or general purpose input (active low).  
UART channel 6 Data Terminal Ready or general purpose output (active low).  
UART channel 6 Data Set Ready or general purpose input (active low).  
UART channel 6 Carrier Detect or general purpose input (active low).  
UART channel 6 Ring Indicator or general purpose input (active low).  
O
I
I
I
UART channel 7 Transmit Data or infrared transmit data. Normal TXD output  
idles HIGH while infrared TXD output idles LOW.  
TX7  
O
UART channel 7 Receive Data or infrared receive data. Normal RXD input  
idles HIGH. The infrared pulses typically idle LOW but can be inverted inter-  
nally prior the decoder by FCTR[4].  
RX7  
47  
I
RTS7#  
CTS7#  
DTR7#  
DSR7#  
52  
48  
53  
49  
O
I
UART channel 7 Request to Send or general purpose output (active low).  
UART channel 7 Clear to Send or general purpose input (active low).  
UART channel 7 Data Terminal Ready or general purpose output (active low).  
UART channel 7 Data Set Ready or general purpose input (active low).  
O
I
5
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
PIN DESCRIPTIONS  
NAME  
CD7#  
RI7#  
PIN #  
50  
TYPE  
DESCRIPTION  
I
I
UART channel 7 Carrier Detect or general purpose input (active low).  
UART channel 7 Ring Indicator or general purpose input (active low).  
51  
ANCILLARY SIGNALS  
MPIO0  
108  
107  
74  
I/O  
I/O  
I/O  
I/O  
I/O  
I/O  
I/O  
I/O  
O
Multi-purpose input/output 0. The function of this pin is defined thru the Con-  
figuration Register MPIOSEL, MPIOLVL, MPIOINV, MPIO3T and MPIOINT  
MPIO1  
MPIO2  
MPIO3  
MPIO4  
MPIO5  
MPIO6  
MPIO7  
EECK  
Multi-purpose input/output 1. The function of this pin is defined thru the Con-  
figuration Register MPIOSEL, MPIOLVL, MPIOINV, MPIO3T and MPIOINT.  
Multi-purpose input/output 2. The function of this pin is defined thru the Con-  
figuration Register MPIOSEL, MPIOLVL, MPIOINV, MPIO3T and MPIOINT.  
73  
Multi-purpose input/output 3. The function of this pin is defined thru the Con-  
figuration Register MPIOSEL, MPIOLVL, MPIOINV, MPIO3T and MPIOINT.  
68  
Multi-purpose input/output 4. The function of this pin is defined thru the Con-  
figuration Register MPIOSEL, MPIOLVL, MPIOINV, MPIO3T and MPIOINT.  
67  
Multi-purpose input/output 5. The function of this pin is defined thru the Con-  
figuration Register MPIOSEL, MPIOLVL, MPIOINV, MPIO3T and MPIOINT.  
66  
Multi-purpose input/output 6. The function of this pin is defined thru the Con-  
figuration Register MPIOSEL, MPIOLVL, MPIOINV, MPIO3T and MPIOINT.  
65  
Multi-purpose input/output 7. The function of this pin is defined thru the Con-  
figuration Register MPIOSEL, MPIOLVL, MPIOINV, MPIO3T and MPIOINT.  
116  
Serial clock to EEPROM. An internal clock of CLK divide by 256 is used for  
reading the vendor and sub-vendor ID during power up or reset. However, it  
can be manually clocked thru the Configuration Register REGB.  
EECS  
115  
O
Chip select to a EEPROM device like 93C46. It is manually selectable thru  
the Configuration Register REGB. Requires a pull-up 4.7K ohm resistor for  
external sensing of EEPROM during power up. See DAN112 for further  
details.  
EEDI  
114  
113  
O
I
Write data to EEPROM device. It is manually accessible thru the Configura-  
tion Register REGB.  
EEDO  
Read data from EEPROM device. It is manually accessible thru the Configu-  
ration Register REGB.  
XTAL1  
XTAL2  
TMRCK  
ENIR  
110  
109  
69  
I
O
I
Crystal or external clock input.  
Crystal or buffered clock output.  
16-bit timer/counter external clock input.  
70  
I
Infrared mode enable (active high). This pin is sampled during power up, fol-  
lowing a hardware reset (RST#) or soft-reset (register RESET). It can be  
used to start up all 8 UARTs in the infrared mode. The sampled logic state is  
transferred to MCR bit-6 in the UART.  
TEST#  
111  
I
Factory Test. Connect to VCC for normal operation.  
VCC  
64, 90,112  
Power supply for the UART core logic - 5V ONLY. This power supply deter-  
mines the VOH level of the non-PCI bus interface outputs. See Table 1 for  
valid combinations of VCC and VIO that can be used for the XR17D158.  
6
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
PIN DESCRIPTIONS  
NAME  
PIN #  
TYPE  
DESCRIPTION  
VIO  
4, 19, 34, 45,  
137  
PCI Bus I/O Power supply - 3.3V or 5V, detected by the auto-sense circuitry  
of the XR17D158. This power supply determines the VOH level of the PCI  
bus interface outputs.  
(PCI 2.3 signalling compliant at both 3.3V and 5V operation, suitable for uni-  
versal form factor add-in card application)  
GND  
5,20,35,46,63,  
89,136  
Power supply common, ground.  
NOTE: Pin type: I=Input, O=Output, IO= Input/output, OD=Output Open Drain.  
7
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
FUNCTIONAL DESCRIPTION  
The XR17D158 (D158) integrates the functions of 8 enhanced 16550 UARTs with the PCI Local Bus interface  
and a non-volatile memory interface for PCI bus’s plug-and-play auto-configuration, a 16-bit timer/counter, 8  
multi-purpose inputs/outputs, and an on-chip oscillator. The PCI local bus is a synchronous timing bus where  
all bus transactions are associated to the bus clock of up to 33MHz. The D158 supports 32-bit wide read and  
write data transfer operations including data burst mode through the PCI Local Bus interface. Read and write  
data operations may be in byte, word or double-word (DWORD) format. A single 32-bit interrupt status register  
provides interrupts status for all 8 UARTs, timer/counter, multipurpose inputs/outputs, and a special sleep wake  
up indicator. There are three sets of register in the device. First, the PCI local bus configuration registers for  
PCI auto configuration. A set of device configuration registers for overall control, 32-bit wide transmit and  
receive data transfer, and monitoring of the 8 UART channels. Lastly, each UART channel has its own 16550  
UART compatible configuration register set for individual channel control, status, and byte wide data transfer.  
Each UART has 64-byte FIFOs, automatic RTS/CTS or DTR/DSR hardware flow control with hysteresis  
control, automatic Xon/Xoff and special character software flow control, programmable transmit and receive  
FIFO trigger level, FIFO level counters, infrared encoder and decoder (IrDA ver. 1.0), programmable baud rate  
generator with a prescaler of 1X or 4X, and data rate up to 6.25 Mbps at 8X sampling clock.The XR17D158 is  
available in a thin 144-pin TQFP (20x20x1.4mm) package in commercial and industrial temperature ranges.  
PCI LOCAL BUS INTERFACE  
This is the host interface and it meets the PCI Local Bus Specification revision 2.3. The PCI local bus  
operations are synchronous meaning each transaction is associated to the bus clock. The XR17D158 can  
operate with the bus clock of up to a 33.34MHz. Data transfers operation can be formatted in 8-bit, 16-bit, 24-  
bit or 32-bit wide. With 32-bit data operations, it pushes the data transfer rate on the bus up to 132 MByte/sec.  
This increases the overall system’s communication performance up to 16 times better than the 8-bit ISA bus.  
See PCI local bus specification revision 2.3 for bus operation details.  
PCI LOCAL BUS CONFIGURATION SPACE REGISTERS  
A set of PCI local bus configuration space register is provided. These registers provide the PCI local bus  
operating system with the card’s vendor ID, device ID, sub-vendor ID, product model number, and resources  
and capabilities. The PCI local bus operating system collects this data from all the cards on the bus during the  
auto configuration phase that follows immediately after a power up or system reset/reboot. After it has sorted  
out all devices on the bus, it defines and download the operating conditions to the cards. One of the definitions  
is the base address loaded into the Base Address Register (BAR) where the card will be operating in the PCI  
local bus memory space.  
EEPROM INTERFACE  
An external 93C46 EEPROM is only used to store the vendor’s ID and model number, and the sub-vendor’s ID  
and product model number. This information is only used with the plug-and-play auto configuration of the PCI  
local bus. These data provide automatic hardware installation onto the PCI bus. The EEPROM interface  
consists of 4 signals, EEDI, EEDO, EECS, and EECK. The EEPROM is not needed when auto configuration is  
not required in the application. However, If your design requires non-volatile memory for other purpose. It is  
possible to store and retrieve data on the EEPROM through a special PCI device configuration register. See  
application note DAN112 for its programming details.  
8
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
1.0 APPLICATION EXAMPLES  
The XR17D158 is designed to operate with VCC (voltage to the UART Core Logic) at 5V only, irrespective of  
whether the PCI bus is at 3.3V or 5V. Table 1 below shows the valid combinations of VCC and the PCI Bus  
Voltage, VIO that can be used for the device..  
TABLE 1: VALID COMBINATIONS OF VCC AND VIO SUPPLY VOLTAGES  
VCC  
5.0V  
5.0V  
3.3V  
3.3V  
VIO  
5.0V  
3.3V  
5.0V  
3.3V  
Valid  
Valid  
Invalid  
Invalid  
A typical application for a universal add-in card (VCC must be 5V) is shown in Figure 3. In an embedded  
system, the designer must still choose 5V power supply for the VCC regardless of VIO (3.3 or 5V). In Figure 4,  
examples 1 and 2 show valid applications of the XR17D158 in an embedded system.  
FIGURE 3. TYPICAL APPLICATION FOR A UNIVERSAL ADD-IN CARD  
VIO  
(3.3V or 5V)  
VCC = 5V  
CLK  
UART Core Logic  
(up to 33.34 MHz)  
UART Channel 0  
UART Channel 1  
PCI  
Local  
UART Channel 2  
Bus  
UART Channel 3  
Interface  
UART Channel 4  
UART Channel 5  
UART Channel 6  
UART Channel 7  
Max Crystal Frequency = 24MHz  
Max External Clock = 50MHz  
9
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
FIGURE 4. TYPICAL APPLICATIONS IN AN EMBEDDED SYSTEM  
VIO = 3.3V  
VCC = 5V  
Example 1  
VIO = 3.3V, VCC = 5V  
CLK  
UART Core Logic  
(up to 33.34MHz)  
UART Channel 0  
UART Channel 1  
UART Channel 2  
UART Channel 3  
UART Channel 4  
UART Channel 5  
UART Channel 6  
PCI  
Local  
Bus  
Interface  
UART Channel 7  
Max Crystal Frequency = 24MHz  
Max External Clock = 50MHz  
VIO = 5V  
Example 2  
VCC = 5V  
VIO = 5V, VCC = 5V  
CLK  
UART Core Logic  
(up to 33.34MHz)  
UART Channel 0  
UART Channel 1  
UART Channel 2  
UART Channel 3  
UART Channel 4  
UART Channel 5  
UART Channel 6  
PCI  
Local  
Bus  
Interface  
UART Channel 7  
Max Crystal Frequency = 24MHz  
Max External Clock = 50MHz  
10  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
2.0 XR17D158 REGISTERS  
The XR17D158 UART has three different sets of registers as shown in Figure 5. The PCI local bus  
configuration space registers are for plug-and-play auto-configuration when connecting the device to a the PCI  
bus. This auto-configuration feature makes installation very easy into a PCI system and it is part of the PCI  
local bus specification. The second register set is the device configuration registers that are accessible directly  
from the PCI bus for programming general operating conditions of the device and monitoring the status of  
various functions. These registers are mapped into 4K of the PCI bus memory address space. These functions  
include all 8 channel UART’s interrupt control and status, 16-bit general purpose timer control and status,  
multipurpose inputs/outputs control and status, sleep mode, soft-reset, and device identification and revision.  
And lastly, each UART channel has its own set of internal UART configuration registers for its own operation  
control and status reporting. All 8 sets of channel registers are embedded inside the device configuration  
registers space, which provides faster access. The following paragraphs describe all 3 sets of registers in  
detail.  
FIGURE 5. THE XR17D158 REGISTER SETS  
PC I Local Bus  
C onfig uration  
Space  
Vendor and Sub-vendor ID  
and Product M odel N umber  
in External EEPR OM  
R eg isters for Plug -  
and-Play Auto  
C onfig uration  
D evice C onfig uration and  
U AR T[7:0] C onfig uration  
R eg isters are mapped on  
to the Base Address  
R eg ister (BAR ) in a 4K-  
byte of memory address  
space  
0 x0 0 0 0  
0 x0 0 8 0  
C hannel  
0
D evice C onfig uration R eg isters  
IN T, M PIO,  
TIM ER ,R EG  
8
channel Interrupts,  
M ultipurpose I/Os,  
16-bit Timer/C ounter,  
Sleep, R eset, D VID , D R EV  
C hannel  
C hannel  
C hannel  
C hannel  
C hannel  
C hannel  
C hannel  
C hannel  
0
1
0 x0 2 0 0  
0 x0 4 0 0  
0 x0 6 0 0  
0 x0 8 0 0  
PC I Local Bus  
Interface  
2
3
4
5
6
7
U AR T[7:0] C onfig uration  
R eg isters  
16550 C ompatible and EXAR  
Enhanced R eg isters  
0 x0 A 0 0  
0x0C 00  
0x0E00  
0x0FFF  
PCIREG S-1  
2.1  
PCI LOCAL BUS CONFIGURATION SPACE REGISTERS  
The PCI local bus configuration space registers are responsible for setting up the device’s operating  
environment in the PCI local bus. The pre-defined operating parameters of the device is read by the PCI bus  
plug-and-play auto-configuration manager in the operating system. After the PCI bus has collected all data  
from every device/card on the bus, it defines and downloads the memory mapping information to each device/  
card about their individual operation memory address location and conditions. The operating memory mapped  
address location is downloaded into the Base Address Register (BAR) register, 0x10. The plug-and-play auto  
configuration feature is only available when an external 93C46 EEPROM is used. The EEPROM contains the  
device vendor and sub-vendor data required by the auto-configuration setup.  
11  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
TABLE 2: PCI LOCAL BUS CONFIGURATION SPACE REGISTERS  
RESET VALUE  
(HEX)  
ADDRESS  
BITS  
TYPE  
DESCRIPTION  
RWR1  
RWR1  
0x00  
31:16  
15:0  
Device ID (Exar device ID number)  
0x0158  
0x13A8  
0000  
Vendor ID (Exar) specified by PCISIG  
0x04  
31  
RWC  
RWC  
RO  
Parity error detected. Cleared by writing a logic 1.  
System error detected. Cleared by writing a logic 1.  
Unused  
30  
29:28  
27  
R-Reset Target Abort. Set whenever D158 terminates with a target abort.  
0
26:25  
24  
RO  
RO  
RO  
RO  
RO  
DEVSEL# timing.  
00  
Unemployments bus master error reporting bit  
Fast back to back transactions are supported  
Reserved Status bits  
0
1
23  
22:16  
000 0000  
0x0000  
15:9,7,  
5,4,3,2  
Command bits (reserved)  
8
RWR  
SERR# driver enable. Logic 1=enable driver and 0=disable  
driver  
0
6
1
RWR  
RWR  
Parity error enable. Logic 1=respond to parity error and 0=ignore  
0
0
Command controls a device’s response to mem space accesses:  
0=disable mem space accesses, 1=enable mem space accesses  
0
RO  
Device’s response to I/O space accesses is disabled.  
(0 = disable I/O space accesses)  
0
0x08  
0x0C  
31:8  
7:0  
RO  
RO  
RO  
RO  
RO  
RO  
RWR  
RO  
RO  
RO  
RO  
RO  
RO  
RO  
Class Code (Simple 550 Communication Controller).  
Revision ID (Exar device revision number)  
BIST (Built-in Self Test)  
0x070002  
Current Rev. value  
0x00  
31:24  
23:16  
15:8  
7:0  
Header Type (a single function device with one BAR)  
Unimplemented Latency Timer (needed only for bus master)  
Unimplemented Cache Line Size  
0x00  
0x00  
0x00  
0x10  
31:12  
11:0  
31:0  
31:0  
31:0  
31:0  
31:0  
31:0  
Memory Base Address Register (BAR)  
0x00  
Claims a 4K address space for the memory mapped UARTs  
Unimplemented Base Address Register (returns zeros)  
Unimplemented Base Address Register (returns zeros)  
Unimplemented Base Address Register (returns zeros)  
Unimplemented Base Address Register (returns zeros)  
Unimplemented Base Address Register (returns zeros)  
Reserved  
0x000  
0x14  
0x18h  
0x1C  
0x20  
0x24  
0x28  
0x00000000  
0x00000000  
0x00000000  
0x00000000  
0x00000000  
0x00000000  
12  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
TABLE 2: PCI LOCAL BUS CONFIGURATION SPACE REGISTERS  
RESET VALUE  
(HEX)  
ADDRESS  
BITS  
TYPE  
DESCRIPTION  
RWR1  
RWR1  
0x2C  
31:16  
15:0  
0x0000  
0x0000  
Subsystem ID (write from external EEPROM by customer)  
Subsystem Vendor ID (write from external EEPROM by cus-  
tomer)  
0x30  
0x34  
0x38  
0x3C  
31:0  
31:0  
31:0  
31:24  
23:16  
15:8  
7:0  
RO  
RO  
Expansion ROM Base Address (Unimplemented)  
Reserved (returns zeros)  
Reserved (returns zeros)  
Unimplemented MAXLAT  
Unimplemented MINGNT  
Interrupt Pin, use INTA#.  
Interrupt Line.  
0x00000000  
0x00000000  
0x00000000  
0x00  
RO  
RO  
RO  
0x00  
RO  
0x01  
RWR  
0xXX  
NOTE: RWR1=Read/Write from external EEPROM. RWR=Read/Write from AD[31:0]. RO= Read Only. RWC=Read/Write-  
Clear.  
2.2  
Device Configuration Register Set  
The device configuration registers and a special way to access each of the UART’s transmit and receive data  
FIFOs are accessible directly from the PCI data bus. This provides easy programming of general operating  
parameters to the D158 UART and for monitoring the status of various functions. The registers occupy 4K of  
PCI bus memory address space. These addresses are offset onto the basic memory address, a value loaded  
into the Memory Base Address Register (BAR) in the PCI local bus configuration register set. These registers  
control or report on all 8 channel UARTs functions that include interrupt control and status, 16-bit general  
purpose timer control and status, multipurpose inputs/outputs control and status, sleep mode control, soft-reset  
control, and device identification and revision, and others.  
The registers set is mapped into 8 address blocks where each UART channel occupies 512 bytes memory  
space for its own 16550 compatible configuration registers. The device configuration and control registers are  
embedded inside the UART channel zero’s address space between 0x0080 to 0x0093. All these registers can  
be accessed in 8, 16, 24 or 32 bit width depending on the starting address given by the host at beginning of the  
bus cycle. Transmit and receive data may be loaded or unloaded in 8, 16, 24 or 32 bit format to the register’s  
address. Every time a read or write operation is made to the transmit or receive register, its FIFO data pointer  
is automatically bumped to the next sequential data location either in byte, word or dword. One special case  
applies to the receive data unloading when reading the receive data together with its LSR register content. The  
host must read them in 16 or 32 bits format in order to maintain integrity of the data byte with its associated  
error flags.  
13  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
TABLE 3: XR17D158 DEVICE CONFIGURATION REGISTERS  
READ/WRITE  
OFFSET ADDRESS  
0x000 - 0x00F  
0x010 - 0x07F  
0x080 - 0x093  
MEMORY SPACE  
DATA WIDTH  
COMMENT  
UART channel 0 Regs (Table 12 & Table 13) 8/16/24/32 First 8 regs are 16550 compatible  
Reserved  
DEVICE CONFIG.  
REGISTERS  
(Table 4)  
8/16/24/32  
0x094 - 0x0FF  
0x100 - 0x13F  
0x100 - 0x13F  
0x140 - 0x17F  
0x180 - 0x1FF  
Reserved  
UART 0 – Read FIFO  
UART 0 – Write FIFO  
Reserved  
Read-Only  
Write-Only  
8/16/24/32 64 bytes of RX FIFO data  
8/16/24/32 64 bytes of TX FIFO data  
UART 0 – Read FIFO  
with errors  
Read-Only  
16/32  
64 bytes of RX FIFO data + LSR  
0x200 - 0x20F  
0x210 - 0x2FF  
0x300 - 0x33F  
0x300 - 0x33F  
0x340 - 0x37F  
0x380 - 0x3FF  
UART channel 1 Regs (Table 12 & Table 13) 8/16//24/32 First 8 regs are 16550 compatible  
Reserved  
UART 1 – Read FIFO  
UART 1 – Write FIFO  
Reserved  
Read-Only  
Write-Only  
8/16/24/32 64 bytes of RX FIFO data  
8/16/24/32 64 bytes of TX FIFO data  
UART 1 – Read FIFO  
with errors  
Read-Only  
16/32  
64 bytes of RX FIFO data + LSR  
0x400 - 0x40F  
0x410 - 0x4FF  
0x500 - 0x53F  
0x500 - 0x53F  
0x540 - 0x57F  
0x580 - 0x5FF  
UART channel 2 Regs (Table 12 & Table 13) 8/16/24/32 First 8 regs are 16550 compatible  
Reserved  
UART 2 – Read FIFO  
UART 2 – Write FIFO  
Reserved  
Read-Only  
Write-Only  
8/16/24/32 64 bytes of RX FIFO data  
8/16/24/32 64 bytes of TX FIFO data  
UART 2 – Read FIFO  
with errors  
Read-Only  
16/32  
64 bytes of RX FIFO data + LSR  
0x600 - 0x60F  
0x610 - 0x6FF  
0x700 - 0x73F  
0x700 - 0x73F  
0x740 - 0x77F  
0x780 - 0x7FF  
UART channel 3 Regs (Table 12 & Table 13) 8/16/24/32 First 8 regs are 16550 compatible  
Reserved  
UART 3 – Read FIFO  
UART 3 – Write FIFO  
Reserved  
Read-Only  
Write-Only  
8/16/24/32 64 bytes of RX FIFO data  
8/16/24/32 64 bytes of TX FIFO data  
UART 3 – Read FIFO  
with errors  
Read-Only  
16/32  
64 bytes of RX FIFO data + LSR  
14  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
TABLE 3: XR17D158 DEVICE CONFIGURATION REGISTERS  
READ/WRITE  
OFFSET ADDRESS  
MEMORY SPACE  
DATA WIDTH  
COMMENT  
0x800 - 0x80F  
0x810 - 0x8FF  
0x900 - 0x93F  
0x900 - 0x93F  
0x940 - 0x97F  
0x980 - 0x9FF  
UART channel 4 Regs (Table 12 & Table 13) 8/16/24/32 First 8 regs are 16550 compatible  
Reserved  
UART 4 – Read FIFO  
UART 4 – Write FIFO  
Reserved  
Read-Only  
Write-Only  
8/16/24/32 64 bytes of RX FIFO data  
8/16/24/32 64 bytes of TX FIFO data  
UART 4 – Read FIFO  
with errors  
Read-Only  
16/32  
64 bytes of RX FIFO data + LSR  
0xA00 - 0xA0F  
0xA10 - 0xAFF  
0xB00 - 0xB3F  
0xB00 - 0xB3F  
0xB40 - 0xB7F  
0xB80 - 0xBFF  
UART channel 5 Regs (Table 12 & Table 13) 8/16/24/32 First 8 regs are 16550 compatible  
Reserved  
ite  
UART 5 – Read FIFO  
UART 5 – Write FIFO  
Reserved  
Read-Only  
Write-Only  
8/16/24/32 64 bytes of RX FIFO data  
8/16/24/32 64 bytes of TX FIFO data  
UART 5 – Read FIFO  
with errors  
Read-Only  
16/32  
64 bytes of RX FIFO data + LSR  
0xC00 - 0xC0F  
0xC10 - 0xCFF  
0xD00 - 0xD3F  
0xD00 - 0xD3F  
0xD40 - 0xD7F  
0xD80 - 0xDFF  
UART channel 6 Regs (Table 12 & Table 13) 8/16/24/32 First 8 regs are 16550 compatible  
Reserved  
UART 6 – Read FIFO  
UART 6 – Write FIFO  
Reserved  
Read-Only  
Write-Only  
8/16/24/32 64 bytes of RX FIFO data  
8/16/24/32 64 bytes of TX FIFO data  
UART 6 – Read FIFO  
with errors  
Read-Only  
16/32  
64 bytes of RX FIFO data + LSR  
0xE00 - 0xE0F  
0xE10 - 0xEFF  
0xF00 - 0xF3F  
0xF00 - 0xF3F  
0xF40 - 0xF7F  
0xF80 - 0xFFF  
UART channel 7 Regs (Table 12 & Table 13) 8/16/24/32 First 8 regs are 16550 compatible  
Reserved  
UART 7 – Read FIFO  
UART 7 – Write FIFO  
Reserved  
Read-Only  
Write-Only  
8/16/24/32 64 bytes of RX FIFO data  
8/16/24/32 64 bytes of TX FIFO data  
UART 7 – Read FIFO  
with errors  
Read-Only  
16/32  
64 bytes of RX FIFO data + LSR  
15  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
TABLE 4: DEVICE CONFIGURATION REGISTERS SHOWN IN BYTE ALIGNMENT  
ADDRESS [A7:A0]  
Ox080  
REGISTER  
INT0 [7:0]  
READ/WRITE COMMENT  
RESET STATE  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Read-only Interrupt [7:0]  
Ox081  
INT1 [15:8]  
INT2 [23:16]  
INT3 [31:24]  
Read-only  
Read-only  
Read-only  
Ox082  
Ox083  
Ox084  
Ox085  
Ox086  
Ox087  
TIMERCNTL  
TIMER  
Read/Write Timer Control  
Reserved  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
TIMERLSB  
TIMERMSB  
Read/Write Timer LSB  
Read/Write Timer MSB  
Ox088  
Ox089  
Ox08A  
Ox08B  
8XMODE  
REGA  
Read/Write  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Reserved  
RESET  
SLEEP  
Write-only Self clear bits after executing Reset  
Read/Write Sleep mode  
Ox08C  
Ox08D  
Ox08E  
Ox08F  
DREV  
DVID  
Read-only Device revision  
Read-only Device identification  
Write-only  
Bits 7-0 = 0x09  
Bits 7-0 = 0x28  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
REGB  
MPIOINT  
Read/Write MPIO interrupt mask  
Ox090  
Ox091  
Ox092  
Ox093  
MPIOLVL  
MPIO3T  
Read/Write MPIO level control  
Read/Write MPIO output control  
Read/Write MPIO input polarity select  
Read/Write MPIO select  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0xFF  
MPIOINV  
MPIOSEL  
TABLE 5: DEVICE CONFIGURATION REGISTERS SHOWN IN DWORD ALIGNMENT  
ADDRESS  
0x080-083  
0x084-087  
0x088-08B  
0x08C-08F  
0x090-093  
REGISTER  
BYTE 3 [31:24] BYTE 2 [23:16]  
BYTE 1 [15:8]  
INT1  
BYTE 0 [7:0]  
INT0  
INTERRUPT (read-only)  
TIMER (read/write)  
INT3  
INT2[  
TIMERLSB  
RESET  
TIMERMSB  
SLEEP  
TIMER (reserved)  
REGA (reserved)  
DVID  
TIMERCNTL  
8XMODE  
DREV  
ANCILLARY1 (read/write)  
ANCILLARY2 (read-only)  
MPIO (read/write)  
MPIOINT  
MPIOSEL  
REGB  
MPIOINV  
MPIO3T  
MPIOLVL  
16  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
2.2.1  
The Interrupt Status Register  
The XR17D158 has a 32-bit wide register [INT0, INT1, INT2 and INT3] to provide interrupt information and  
supports two interrupt schemes. The first scheme uses an 8-bit indicator (INT0) representing each channel  
from 0 to 7. This permits the interrupt routine to quickly vector and serve that UART channel and determine the  
source(s) in each individual routines. INT0 bit-0 represents the interrupt status for UART channel 0 when its  
transmitter, receiver, line status, or modem port status requires service. Other bits in the INT0 register provide  
indication for the other channels with bit-7 representing UART channel 7 respectively.  
The second scheme provides detail about the source of the interrupts for each UART channel. All the interrupts  
are encoded into a 3-bit code. This 3-bit code represents 7 interrupts corresponding to individual UART’s  
transmitter, receiver, line status, modem port status. INT1, INT2 and INT3 registers provide the 24-bit interrupt  
status for all 8 channels. Bits 8, 9 and 10 representing channel 0 and bits 29, 30 and 31 representing channel 7  
respectively. All 8 channel interrupts status are available with a single DWORD read operation. This feature  
allows the host quickly vectors and serves the interrupts, reducing service interval, hence, reduce host  
bandwidth requirement. Figure 6 shows the 4-byte interrupt register and its make up.  
GLOBAL INTERRUPT REGISTER (DWORD)  
[default 0x00-00-00-00]  
INT0 [7:0]  
INT3 [31:24] INT2 [23:16] INT1 [15:87]  
A special interrupt condition is generated by the D158 when it wakes up from sleep mode. This special  
interrupt is cleared by reading the INT0 register. If there are not any other interrupts pending, the value read  
from INT0 would be 0x00.  
INT0 [7:0] Channel Interrupt Indicator  
Each bit gives an indication of the channel that has requested for service. Bit-0 represents channel 0 and bit-7  
indicates channel 7. Logic one indicates that a channel has called for service. The interrupt bit clears after  
reading the appropriate register of the interrupting channel register, see Interrupt Clearing section.  
The INT0 register provides individual status for each channel  
INT0 Register  
Individual UART Channel Interrupt Status  
Ch-7 Ch-6 Ch-5 Ch-4 Ch-3 Ch-2 Ch-1 Ch-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
INT3, INT2 and INT1 [32:8] ]  
Twenty four bit encoded interrupt indicator. Each channel’s interrupt is encoded into 3 bits for receive, transmit,  
and status. Bit [10:8] represent channel 0 and go up to channel 7 with bits [31:29]. The 3 bit encoding and their  
priority order are shown below in Table 6. The Timer and MPIO interrupts are for the device and therefore they  
exist within channel 0 space (bits [10:8]) only.  
17  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
.
FIGURE 6. THE GLOBAL INTERRUPT REGISTER, INT0, INT1, INT2 AND INT3  
Interrupt Registers,  
INT0, INT1, INT2 and INT3  
INT3 Register  
INT2 Register  
INT1 Register  
Channel-7  
Bit  
Channel-6  
Channel-5  
Bit  
Channel-4  
Channel-3  
Channel-2  
Bit  
Channel-1  
Channel-0  
Bit  
Bit  
N
Bit  
Bit  
Bit  
N
Bit  
Bit  
N
Bit  
Bit  
Bit  
N
Bit  
Bit  
Bit  
N
Bit  
Bit  
N
Bit  
Bit  
Bit  
N
Bit  
Bit  
Bit  
N
N+2 N+1  
N+2 N+1  
N+2 N+1  
N+2 N+1  
N+2 N+1  
N+2 N+1  
N+2 N+1  
N+2 N+1  
INT0 Register  
Ch-7 Ch-6 Ch-5 Ch-4 Ch-3 Ch-2 Ch-1 Ch-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
TABLE 6: UART CHANNEL [7:0] INTERRUPT SOURCE ENCODING  
PRIORITY BIT[N+2] BIT[N+1]  
BIT[N]  
INTERRUPT SOURCE(S)  
x
1
2
3
4
5
6
7
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
None  
RXRDY and RX Line Status (logic OR of LSR[4:1])  
RXRDY Time-out  
TXRDY, THR or TSR (auto RS485 mode) empty  
MSR, RTS/CTS or DTR/DSR delta or Xoff/Xon det. or special char. detected  
Reserved.  
MPIO pin(s). Available only within channel 0, reserved in other channels.  
TIMER Time-out. Available only within channel 0, reserved in other chan-  
nels.  
TABLE 7: UART CHANNEL [7:0] INTERRUPT CLEARING:  
RXRDY is cleared by reading data in the RX FIFO until it falls below the trigger level.  
RXRDY Time-out is cleared by reading data until the RX FIFO is empty.  
RX Line Status interrupt clears after reading the LSR register.  
TXRDY interrupt clears after reading ISR register that is in the UART channel register set.  
Modem Status Register interrupt clears after reading MSR register that is in the UART channel register set.  
RTS/CTS or DTR/DSR delta interrupt clears after reading MSR register that is in the UART channel register set.  
Xoff/Xon interrupt clears after reading the ISR register that is in the UART channel register set.  
Special character detect interrupt is cleared by a read to ISR or after the next character is received.  
TIMER Time-out interrupt clears after reading the TIMERCNTL register that is in the Device Configuration register set.  
MPIO interrupt clears after reading the MPIOLVL register that is in the Device Configuration register set.  
18  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
2.2.2  
General Purpose 16-bit Timer/Counter [TIMERMSB, TIMELSB, TIMER, TIMECNTL] (DEFAULT  
0XXX-XX-00-00)  
A 16-bit down-count timer for general purpose timer or counter. Its clock source may be selected from internal  
crystal oscillator or externally on pin TMRCK. The timer can be set to be a single-shot for a one-time event or  
re-triggerable for continue interval. An interrupt may be generated in the INT Register when the timer times out.  
It is controlled through 4 configuration registers [TIMERCNTL, TIMER, TIMELSB, TIMERMSB]. These  
registers provide start/stop and re-triggerable or one-shot operation. The time-out output of the Timer can be  
set to generate an interrupt for system or event alarm.  
FIGURE 7. TIMER/COUNTER CIRCUIT.  
TIMERMSB and TIMERLSB  
(16-bit Value)  
Time-out  
1
TMRCK  
OSC. CLOCK  
Timer Interrupt, Ch-0 INT=7  
1
0
16-Bit  
Timer/Counter  
0
No Interrupt  
Clock  
Select  
Re-trigger  
TIMERCNTL [3]  
0
1
1
Start/Stop  
MPIO[0]  
TIMERCNTL [1]  
TIMERCNTL [2]  
TIMERCNTL [0]  
0
Single-shot  
Single/Re-triggerable  
Timer Interrupt Enable  
MPIOLVL[0]  
TIMERCNTL [4]  
TABLE 8: TIMER CONTROL REGISTERS  
TIMERCNTL [0]  
Logic zero (default) disables Timer-Counter interrupt and logic one enables the interrupt, reading the  
TIMERCNTL clears the interrupt.  
TIMERCNLT [1]  
TIMERCNTL [2]  
TIMERCNTL [3]  
TIMERCNTL [4]  
Logic zero (default) stops/pauses the timer and logic one starts/re-starts the timer/counter.  
Logic zero (default) selects re-trigger timer function and logic one selects one-shot (timer function.  
Logic zero (default) selects internal and logic one selects external clock to the timer/counter.  
Routes the Timer-Counter interrupt to MPIO[0] if MPIOSEL[0]=0 for external event control.  
TIMERCNTL [7:5] Reserved (defaults to zero)  
TIMERCNTL Register  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
MPIO[0] Clock  
Control Select Re-trigger Stop Enable  
Single/  
Start/  
INT  
Rsvd Rsvd Rsvd  
TIMER [15:8] Reserved  
19  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
TIMERMSB [31:24] and TIMERLSB [23:16]  
TIMERMSB and TIMERLSB form a 16-bit value. The least-significant bit of the timer is being bit [0] of the  
TIMERLSB with most-significant-bit being bit [7] in TIMERMSB. Notice that these registers do not hold the  
current counter value when read. Reading the TIMERCNTL register will clear its interrupt. Default value is zero  
(timer disabled) upon powerup and reset.  
16-Bit Timer/Counter Programmable Registers  
TIMERMSB Register  
TIMERLSB Register  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-15 Bit-14 Bit-13 Bit-12 Bit-11 Bit-10 Bit-9 Bit-8  
2.2.3  
8XMODE [7:0] (default 0x00)  
Each bit selects 8X or 16X sampling rate for that UART channel, bit-0 is channel 0. Logic 0 (default) selects  
normal 16X sampling with logic one selects 8X sampling rate. Transmit and receive data rates will double by  
selecting 8X.  
8XMODE Register  
Individual UART Channel 8X Clock Mode Enable  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Ch-7 Ch-6 Ch-5 Ch-4 Ch-3 Ch-2 Ch-1 Ch-0  
2.2.4  
2.2.5  
REGA [15:8] Reserved  
RESET [23:16] (default 0x00)  
The 8-bit Reset register [RESET] provides the software with the ability to reset the UART(s) when there is a  
need. Each bit is self-resetting after it is written a logic 1 to perform a reset to that channel. All registers in that  
channel will be reset to the default condition, see Table 20 for details. Bit-0 =1 resets UART channel 0 with bit-  
7=1 resets channel 7.  
RESET Register  
Individual UART Channel Reset Enable  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Ch-7 Ch-6 Ch-5 Ch-4 Ch-3 Ch-2 Ch-1 Ch-0  
20  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
2.2.6  
SLEEP [31:24] (default 0x00)  
Each UART can be separately enabled to enter Sleep mode through the Sleep register. Sleep mode reduces  
power consumption when the system needs to put the UART(s) to idle. All of these conditions must be satisfied  
for the D158 to enter sleep mode:  
no interrupts pending (INT0 = 0x00)  
divisor is a non-zero value for all channels (ie. DLL = 0x1)  
sleep mode is enabled (SLEEP = 0xFF)  
modem inputs for all channels are not toggling (MSR bits 0-3 = 0)  
RX input pins for all channels are idling HIGH  
The D158 stops its crystal oscillator to conserve power in the sleep mode. User can check the XTAL2 pin for  
no clock output as an indication that the device has entered the sleep mode.  
The D158 resumes normal operation by any of the following:  
a receive data start bit transition (HIGH to LOW)  
a data byte is loaded to the transmitter, THR or FIFO  
a change of logic state on any of the modem or general purpose serial inputs: CTS#, DSR#, CD#, RI#  
If the D158 is awakened by any one of the above conditions, it will return to the sleep mode automatically after  
all interrupting conditions have been serviced and cleared. If the D158 is awakened by the modem inputs, a  
read to the MSR is required to reset the modem inputs. In any case, the sleep mode will not be entered while  
an interrupt is pending from any channel. The D158 will stay in the sleep mode of operation until it is disabled  
by setting Sleep = 0x00. In this case, the octal UART is awaken by any of the UART channel from a receive  
data byte or a change on the serial port. The UART is ready after 32 crystal clocks to ensure full functionality.  
Also, a special interrupt is generated with an indication of no pending interrupt. Reading INT0 will clear this  
special interrupt. Logic 0 (default) is disable and logic 1 is enable to sleep mode.  
Important: The XR17D158 is a versatile device designed to operate with different VCC (core power supply)  
and VIO (PCI bus I/O power supply). However, the VCC and VIO must be equal (VCC = VIO) for the sleep  
mode to reduce power consumption. Any difference in these voltages will result in high currents, when placed  
in sleep mode. If sleep mode is used, it is recommended that both VCC and VIO be powered by the PCI bus  
VIO power pins. If sleep mode is not used, there is no concern about high currents whether VCC = VIO or VCC  
> VIO. In any case, VCC should never be less than VIO.  
SLEEP Register  
Individual UART Channel Sleep Enable  
Ch-7 Ch-6 Ch-5 Ch-4 Ch-3 Ch-2 Ch-1 Ch-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
2.2.7  
Device Identification and Revision  
There are two internal registers that provide device identification and revision, DVID and DREV registers. The  
8-bit content in the DVID register provides device identification. A return value of 0x28 from this register  
indicates the device is a XR17D158. The DREV register returns an 8-bit value of 0x01 for revision A with 0x02  
equals to revision B and so forth. This information is very useful to the software driver for identifying which  
device it is communicating with and to keep up with revision changes.  
21  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
DVID [15:8]  
Device identification for the type of UART. The upper nibble indicates it is a XR17Dxxx series with lower nibble  
indicating the number of channels.  
Examples:  
XR17C158 or XR17D158 = 0x28  
XR17C154 or XR17D154 = 0x24  
XR17C152 or XR17D152 = 0x22  
DREV [7:0]  
Revision number of the XR17D158. A 0x01 represents "revision-A" with 0x02 for rev-B and so forth.  
REGB [23:16] (default 0x00)  
REGB register provides a control for simultaneous write to all 8 UARTs configuration register or individually.  
This is very useful for device initialization in the power up and reset routines. Also, the register provides a  
facility to interface to the non-volatile memory device such as a 93C46 EEPROM. In embedded applications,  
the user can use this facility to store proprietary data.  
2.2.8  
REGB Register  
REGB[16](Read/Write)  
Logic 0 (default) write to each UART configuration registers individually.  
Logic 1 enables simultaneous write to all 8 UARTs configuration register.  
Reserved  
REGB[19:17]  
REGB[20] (Write-Only)  
REGB[21] (Write-Only)  
REGB[22] (Write-Only)  
REGB[23] (Read-Only)  
Control the EECK, clock, output (pin 116) on the EEPROM interface.  
Control the EECS, chips select, output (pin 115) to the EEPROM device.  
EEDI (pin 114) data input. Write data to the EEPROM device.  
EEDO (pin 113) data output. Read data from the EEPROM device.  
2.2.9  
Multi-Purpose Inputs and Outputs  
The D158 provides 8 multi-purpose inputs/outputs [MPIO7:0] for general use. Each pin can be programmed to  
be an input or output function. The input logic state can be set for normal or inverted level, and optionally set to  
generate an interrupt. The outputs can be set to be normal logic 1 or 0 state, or 3-state. Their functions and  
definitions are programmed through 5 registers: MPIOINT, MPIOLVL, MPIO3T, MPIOINV and MPIOSEL. If all  
8 pins are set for inputs, all 8 interrupts would be OR’ed together. The OR’ed interrupt is reported in the  
channel 0 UART interrupt status, see Interrupt Status Register. The pins may also be programmed to be  
outputs and to the 3-state condition for signal sharing.  
2.2.10 MPIO REGISTER  
Bit 7 represents MPIO7 pin and bit 0 represents MPIO0 pin. There are 5 registers that select, control and  
monitor the 8 multipurpose inputs and outputs. Figure 8 shows the internal circuitry.  
22  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
FIGURE 8. MULTIPURPOSE INPUT/OUTPUT INTERNAL CIRCUIT  
MPIOINT [7:0]  
AND  
INT  
Rising Edge  
Detection  
AND  
1
0
MPIO  
Pin [7:0]  
MPIOLVL [7:0]  
Read Input Level  
MPIOINV [7:0]  
(Input Inversion Enable =1)  
MPIOLVL [7:0]  
(Output Level)  
MPIO3T [7:0]  
(3-state Enable =1)  
OR  
MPIOSEL [7:0]  
(Select Input=1, Output=0 )  
MPIOCKT  
MPIOINT [7:0] (default 0x00)  
Enable multipurpose input pin interrupt. If the pin is selected by MPIOSEL as input then bit-0 enables input pin  
0 for interrupt, and bit-7 enables input pin 7. No interrupt is enable if the pin is selected to be an output. The  
interrupt is edge sensing and determined by MPIOINV and MPIOLVL registers. The MPIO interrupt clears after  
a read to register MPIOLVL. The combination of MPIOLVL and MPIOINV determines the interrupt being active  
low or active high, it’s level trigger. Logic 0 (default) disables the pin’s interrupt and logic 1 enables it.  
MPIOINT Register  
Multipurpose Input/Output Interrupt Enable  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
MPIO7 MPIO6 MPIO5 MPIO4 MPIO3 MPIO2 MPIO1 MPIO0  
MPIOLVL [7:0] (default 0x00)  
Output pin level control and input level status. The status of the input pin(s) is read on this register and output  
pins are controlled on this register. A logic 0 (default) sets the output to low and a logic 1 sets the output pin to  
high. The MPIO interrupt will clear upon reading this register.  
23  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
MPIOLVL Register  
Multipurpose Output Level Control  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
MPIO7 MPIO6 MPIO5 MPIO4 MPIO3 MPIO2 MPIO1 MPIO0  
MPIO3T [7:0] (default 0x00)  
Output pin tri-state control. A logic 0 (default) sets the output to active level per register MPIOBIT settling, a  
logic 1 sets the output pin to tri-state.  
MPIO3T Register  
Multipurpose Output 3-state Enable  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
MPIO7 MPIO6 MPIO5 MPIO4 MPIO3 MPIO2 MPIO1 MPIO0  
MPIOINV [7:0] (default 0x00)  
Input inversion control. A logic 0 (default) does not invert the input pin logic. A logic 1 inverts the input logic  
level.  
MPIOINV Register  
Multipurpose Input Signal Inversion Enable  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
MPIO7 MPIO6 MPIO5 MPIO4 MPIO3 MPIO2 MPIO1 MPIO0  
MPIOSEL [7:0] (default 0xFF)  
Multipurpose input/output pin select. This register defines the functions of the pins. A logic 1 (default) defines  
the pin for input and a logic 0 for output.  
MPIOSEL Register  
Multipurpose Input/Output Selection  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
MPIO7 MPIO6 MPIO5 MPIO4 MPIO3 MPIO2 MPIO1 MPIO0  
24  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
3.0 CRYSTAL OSCILLATOR / BUFFER  
The D158 includes an on-chip oscillator (XTAL1 and XTAL2). The crystal oscillator provides the system clock  
to the Baud Rate Generators (BRG) in each of the 8 UARTs, the 16-bit general purpose timer/counter and  
internal logics. XTAL1 is the input to the oscillator or external clock buffer input with XTAL2 pin being the  
output. See Programmable Baud Rate Generator in the UART section for programming details.  
The on-chip oscillator is designed to use an industry standard microprocessor crystal (parallel resonant with  
10-22 pF capacitance load, 100ppm) connected externally between the XTAL1 and XTAL2 pins (see Figure 9).  
Alternatively, an external clock can be connected to the XTAL1 pin to clock the internal 8 baud rate generators  
for standard or custom rates. However, for external clock frequencies greater than 24MHz, a 2K pull-up may be  
necessary on the XTAL2 output (see Figure 10). Typically, the oscillator connections are shown in Figure 9. For  
further reading on oscillator circuit please see application note DAN108 on EXAR’s web site.  
FIGURE 9. TYPICAL OSCILLATOR CONNECTIONS  
R=300K to 400K  
14.7456  
MHz  
XTAL2  
XTAL1  
C1  
C2  
22-47pF  
22-47pF  
FIGURE 10. EXTERNAL CLOCK CONNECTION FOR EXTENDED DATA RATE  
External Clock  
vcc  
XTAL1  
gnd  
VCC  
R1  
2K  
XTAL2  
25  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
4.0 TRANSMIT AND RECEIVE DATA  
There are two methods to load transmit data and unload receive data from each UART channel. First, there is  
a transmit data register and receive data register for each UART channel in the device configuration register  
set to ease programming. These registers support 8, 16, 24 and 32 bits wide format. In the 32-bit format, it  
increases the data transfer rate on the PCI bus. Additionally, a special register location provides receive data  
byte with its associated error flags. This is a 16-bit or 32-bit read operation where the Line Status Register  
(LSR) content in the UART channel register is paired along with the data byte. This operation further facilitates  
data unloading with the error flags without having to read the LSR register separately. Furthermore, the  
XR17D158 supports PCI burst mode for read/write operation of up to 64 bytes of data.  
The second method is through each UART channel’s transmit holding register (THR) and receive holding  
register (RHR). The THR and RHR registers are 16550 compatible so their access is limited to 8-bit format.  
The software driver must separately read the LSR content for the associated error flags before reading the  
data byte.  
4.1  
FIFO DATA LOADING AND UNLOADING THROUGH THE DEVICE CONFIGURATION REGISTERS  
IN 32-BIT FORMAT.  
The XR17D158 supports PCI Burst Read and PCI Burst Write transactions anywhere in the mapped memory  
region (except reserved areas). In addition, to utilize this feature fully, the device provides a separate memory  
location (apart from the 16550 register set) where the RX and the TX FIFO can be read from/written to, as  
shown in Table 3. The following is an extract from the table showing the burstable memory locations:  
Channel N: (for channels 0 through 7) where M = 2N + 1.  
RX FIFO  
:
:
:
0xM00 - 0xM3F (64 bytes)  
TX FIFO  
0xM00 - 0xM3F (64 bytes)  
RX FIFO + status  
0xM80 - 0xMFF (64 bytes data + 64 bytes status)  
For example, the locations for channel 2 are:  
Channel 2:  
RX FIFO  
:
:
:
0x500 - 0x53F (64 bytes)  
TX FIFO  
0x500 - 0x53F (64 bytes)  
RX FIFO + status  
0x580 - 0x5FF (64 bytes data + 64 bytes status)  
4.1.1  
Normal Rx FIFO Data Unloading at locations 0x100, 0x300, 0x500, 0x700  
The RX FIFO data (up to the maximum 64 bytes) can be read out in a single burst 32-bit read operation  
(maximum 16 DWORD reads) at memory locations 0x100 (channel 0), 0x300 (channel 1), 0x500 (channel  
2),......., 0xF00 (channel 7). This operation is at least 16 times faster than reading the data in 64 separate 8-bit  
memory reads of RHR register (0x000 for channel 0, 0x200 for channel 1, 0x400 for channel 2,......, 0xE00 for  
channel 7).  
READ RX FIFO,  
BYTE 3  
BYTE 2  
BYTE 1  
BYTE 0  
WITH NO ERRORS  
Read n+0 to n+3  
Read n+4 to n+7  
Etc.  
FIFO Data n+3  
FIFO Data n+7  
FIFO Data n+2  
FIFO Data n+6  
FIFO Data n+1  
FIFO Data n+5  
FIFO Data n+0  
FIFO Data n+4  
26  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
Channel 0 to 7 ReceiveData in 32-bit alignment through the Configuration Register Address  
0x0100, 0x0300, 0x0500, 0x0700, 0x0900, 0x0B00, 0x0D00 and 0x0F00  
Receive Data Byte n+3  
Receive Data Byte n+2  
Receive Data Byte n+1  
Receive Data Byte n+0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
PCI Bus  
Data Bit-31  
PCI Bus  
Data Bit-0  
4.1.2  
Special Rx FIFO Data Unloading at locations 0x180, 0x380, 0x580, and 0x780  
The XR17D158 also provides the same RX FIFO data along with the LSR status information of each byte side-  
by-side, at locations 0x180 (channel 0), 0x380 (channel 1), 0x580 (channel 2), ....., 0xF80 (channel 3). The  
entire RX data along with the status can be downloaded in a single PCI Burst Read operation of 32 DWORD  
reads. The Status and Data bytes must be read in 16 or 32 bits format to maintain data integrity. The following  
tables show this clearly.  
READ RX FIFO,  
BYTE 3  
BYTE 2  
BYTE 1  
BYTE 0  
WITH LSR ERRORS  
Read n+0 to n+1  
Read n+2 to n+3  
Etc  
FIFO Data n+1  
FIFO Data n+3  
LSR n+1  
LSR n+3  
FIFO Data n+0  
FIFO Data n+2  
LSR n+0  
LSR n+2  
Channel 0 to 7 Receive Data with Line Status Register in a 32-bit alignment through the Configuration  
Register Address 0x0180, 0x0380, 0x0580, 0x0780, 0x0980, 0x0B80, 0x0D80 and 0x0F80  
Receive Data Byte n+1  
Line Status Register n+1  
Receive Data Byte n+0  
Line Status Register n+0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
PCI Bus  
Data Bit-31  
PCI Bus  
Data Bit-0  
4.1.3  
Tx FIFO Data Loading at locations 0x100, 0x300, 0x500, 0x700, 0x900, 0xB00, 0xD00, 0xF00  
The TX FIFO data (up to the maximum 64 bytes) can be loaded in a single burst 32-bit write operation  
(maximum 16 DWORD writes) at memory locations 0x100 (channel 0), 0x300 (channel 1), 0x500 (channel 2),  
............, 0xD00 (channel 6) and 0xF00 (channel 7).  
WRITE TX FIFO  
Write n+0 to n+3  
Write n+4 to n+7  
Etc.  
BYTE 3  
BYTE 2  
BYTE 1  
BYTE 0  
FIFO Data n+3  
FIFO Data n+7  
FIFO Data n+2  
FIFO Data n+6  
FIFO Data n+1  
FIFO Data n+5  
FIFO Data n+0  
FIFO Data n+4  
27  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
Channel 0 to 7 Transmit Data in 32-bit alignment through the Configuration Register Address  
0x0100, 0x0300, 0x0500, 0x0700, 0x0900, 0x0B00, 0x0D00 and 0x0F00  
Transmit Data Byte n+3  
Transmit Data Byte n+2  
Transmit Data Byte n+1  
Transmit Data Byte n+0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
B7 B6 B5 B4 B3 B2 B1 B0  
PCI Bus  
Data Bit-31  
PCI Bus  
Data Bit-0  
4.2  
FIFO DATA LOADING AND UNLOADING THROUGH THE UART CHANNEL REGISTERS, THR  
AND RHR IN 8-BIT FORMAT.  
The THR and RHR register address for channel 0 to channel 7 is shown in Table 9 below. The THR and RHR  
for each channel 0 to 7 are located sequentially at address 0x0000, 0x0200, 0x0400, 0x0600, 0x0800,  
0x0A000, 0x0C00 and 0x0E00. Transmit data byte is loaded to the THR when writing to that address and  
receive data is unloaded from the RHR register when reading that address. Both THR and RHR registers are  
16C550 compatible in 8-bit format, so each bus operation can only write or read in bytes.  
TABLE 9: TRANSMIT AND RECEIVE DATA REGISTER IN BYTE FORMAT, 16C550 COMPATIBLE  
THR and RHR Address Locations For CH0 to CH7 (16C550 Compatible)  
CH0 0x000 Write THR  
CH0 0x000 Read RHR  
CH1 0x200 Write THR  
CH1 0x200 Read RHR  
CH2 0x400 Write THR  
CH2 0x400 Read RHR  
CH3 0x600 Write THR  
CH3 0x600 Read RHR  
CH4 0x800 Write THR  
CH4 0x800 Read RHR  
CH5 0xA00 Write THR  
CH5 0xA00 Read RHR  
CH6 0xC00 Write THR  
CH6 0xC00 Read RHR  
CH7 0xE00 Write THR  
CH7 0xE00 Read RHR  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
Bit-7 Bit-6 Bit-5 Bit-4 Bit-3 Bit-2 Bit-1 Bit-0  
THRRHR1  
28  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
5.0 UART  
There are 8 UARTs [channels 7:0] in the D158. Each has its own 64-byte of transmit and receive FIFO, a set of  
16550 compatible control and status registers, and a baud rate generator for individual channel data rate  
setting. Eight additional registers per UART were added for the EXAR enhanced features.  
5.1  
Programmable Baud Rate Generator  
Each UART has its own Baud Rate Generator (BRG) with a prescaler for the transmitter and receiver. The  
prescaler is controlled by a software bit in the MCR register. The MCR register bit-7 sets the prescaler to divide  
the input crystal or external clock by 1 or 4. The output of the prescaler clocks to the BRG. The BRG further  
16  
divides this clock by a programmable divisor between 1 and (2 -1) to obtain a 16X or 8X sampling clock of  
the serial data rate. The sampling clock is used by the transmitter for data bit shifting and receiver for data  
sampling. The BRG divisor (DLL and DLM registers) defaults to a random value upon power up. Therefore, the  
BRG must be programmed during initialization to the operating data rate.  
FIGURE 11. BAUD RATE GENERATOR  
To Other  
Channels  
DLL and DLM  
Registers  
MCR Bit-7=0  
(default)  
Prescaler  
Divide by 1  
16X or 8X  
Sampling  
Crystal  
Osc/  
Buffer  
XTAL1  
XTAL2  
Baud Rate  
Rate Clock to  
Transmitter  
and Receiver  
Generator  
Logic  
Prescaler  
Divide by 4  
MCR Bit-7=1  
Programming the Baud Rate Generator Registers DLM and DLL provides the capability for selecting the  
operating data rate. Table 10 shows the standard data rates available with a 14.7456 MHz crystal or external  
clock at 16X clock rate. At 8X sampling rate, these data rates would double. When using a non-standard data  
rate crystal or external clock, the divisor value can be calculated with the following equation(s).  
divisor (decimal) = (XTAL1 clock frequency / prescaler) / (serial data rate x 16), WITH 8XMODE [7:0] IS 0  
divisor (decimal) = (XTAL1 clock frequency / prescaler / (serial data rate x 8), WITH 8XMODE [7:0] IS 1  
29  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
TABLE 10: TYPICAL DATA RATES WITH A 14.7456 MHZ CRYSTAL OR EXTERNAL CLOCK AT 16X SAMPLING  
DLM  
PROGRAM  
VALUE (HEX) VALUE (HEX)  
DLL  
PROGRAM  
DATA RATE  
ERROR (%)  
OUTPUT Data Rate OUTPUT Data Rate DIVISOR FOR 16x DIVISOR FOR 16x  
MCR Bit-7=1  
MCR Bit-7=0  
Clock (Decimal) Clock (HEX)  
100  
600  
400  
2304  
384  
192  
96  
48  
24  
12  
6
900  
180  
C0  
60  
09  
01  
00  
00  
00  
00  
00  
00  
00  
00  
00  
00  
80  
C0  
60  
30  
18  
0C  
06  
04  
02  
01  
0
0
0
0
0
0
0
0
0
0
0
2400  
1200  
2400  
4800  
9600  
19.2k  
38.4k  
57.6k  
115.2k  
230.4k  
4800  
9600  
19.2k  
38.4k  
76.8k  
153.6k  
230.4k  
460.8k  
921.6k  
30  
18  
0C  
06  
4
04  
2
02  
1
01  
5.2  
Transmitter  
The transmitter section comprises of a 64 bytes of FIFO, a byte-wide Transmit Holding Register (THR) and an  
8-bit Transmit Shift Register (TSR). THR receives a data byte from the host (non-FIFO mode) or a data byte  
from the FIFO when the FIFO is enabled by FCR bit-0. TSR shifts out every data bit with the 16X or 8X internal  
clock. A bit time is 16 or 8 clock periods. The transmitter sends the start bit followed by the number of data bits,  
inserts the proper parity bit if enable, and adds the stop bit(s). The status of the THR and TSR are reported in  
the Line Status Register (LSR bit-5 and bit-6).  
5.2.1  
Transmit Holding Register (THR) - Write-Only  
The transmit holding register is an 8-bit register providing a data interface to the host processor. The host  
writes transmit data byte to the THR to be converted into a serial data stream including start-bit, data bits,  
parity-bit and stop-bit(s). The least-significant-bit (Bit-0) becomes first data bit to go out. The THR is also the  
input register to the transmit FIFO of 64 bytes when FIFO operation is enabled by FCR bit-0. A THR empty  
interrupt can be generated when it is enabled in IER bit-1.  
5.2.2  
Transmitter Operation in non-FIFO mode  
The host loads transmit data to THR one character at a time. The THR empty flag (LSR bit-5) is set when the  
data byte is transferred to TSR. THR flag can generate a transmit empty interrupt (ISR bit-1) when it is enabled  
by IER bit-1. The TSR flag (LSR bit-6) is set when TSR becomes completely empty.  
30  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
FIGURE 12. TRANSMITTER OPERATION IN NON-FIFO MODE  
Transmit  
Holding  
Register  
(THR)  
Data  
Byte  
THR Interrupt (ISR bit-1)  
Enabled by IER bit-1  
16X or 8X  
Clock  
(8XMODE  
Register)  
M
S
B
L
S
B
Transmit Shift Register (TSR)  
TXNOFIFO1  
5.2.3  
Transmitter Operation in FIFO mode  
The host may fill the transmit FIFO with up to 64 bytes of transmit data. The THR empty flag (LSR bit-5) is set  
whenever the FIFO is empty. The THR empty flag can generate a transmit empty interrupt (ISR bit-1) when the  
amount of data in the FIFO falls below its programmed trigger level (see TXTRG register). The transmit empty  
interrupt is enabled by IER bit-1. The TSR flag (LSR bit-6) is set when TSR becomes completely empty.  
Furthermore, with the RS485 half-duplex direction control enabled (FCTR bit-5=1) the source of the transmit  
empty interrupt changes to TSR empty instead of THR empty. This is to ensure the RTS# output is not  
changed until the last stop bit of the last character is shifted out.  
5.2.4  
Auto RS485 Operation  
The auto RS485 half-duplex direction control changes the behavior of the transmitter when enabled by FCTR  
bit-5. While transmitting, the RTS# or DTR# signal is HIGH. The RTS# or DTR# signal changes from HIGH to  
LOW after a specified delay indicated in MSR[7:4] following the last stop bit of the last character that has been  
transmitted. This helps in turning around the transceiver to receive the remote station’s response. The delay  
optimizes the time needed for the last transmission to reach the farthest station on a long cable network before  
switching off the line driver. This delay prevents undesirable line signal disturbance that causes signal  
degradation. It also changes the transmitter empty interrupt to TSR empty instead of THR empty.  
FIGURE 13. TRANSMITTER OPERATION IN FIFO AND FLOW CONTROL MODE  
Transmit  
Transmit  
FIFO  
THR Interrupt (ISR bit-1) falls  
below Programmed Trigger  
Level (TXTRG) and then  
Data Byte  
(64-Byte)  
when becomes empty. FIFO  
is Enabled by FCR bit-0=1  
Flow Control Characters  
(Xoff1/2 and Xon1/2 Reg.  
Auto Software Flow Control  
16X or 8X Clock  
(8XMODE Register)  
Transmit Data Shift Register  
(TSR)  
Auto CTS Flow Control (CTS# pin)  
TXFIFO1  
31  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
5.3  
Receiver  
The receiver section contains an 8-bit Receive Shift Register (RSR) and Receive Holding Register (RHR). The  
RSR uses the 16X or 8X clock for timing. It verifies and validates every bit on the incoming character in the  
middle of each data bit. On the falling edge of a start or false start bit, an internal receiver counter starts  
counting at the 16X or 8X clock rate. After 8 or 4 clocks the start bit period should be at the center of the start  
bit. At this time the start bit is sampled and if it is still a logic 0 it is validated. Evaluating the start bit in this  
manner prevents the receiver from assembling a false character. The rest of the data bits and stop bits are  
sampled and validated in this same manner to prevent false framing. If there were any error(s), they are  
reported in the LSR register bits 1- 4. Upon unloading the receive data byte from RHR, the receive FIFO  
pointer is bumped and the error flags are immediately updated to reflect the status of the data byte in RHR  
register. RHR can generate a receive data ready interrupt upon receiving a character or delay until it reaches  
the FIFO trigger level. Furthermore, data delivery to the host is guaranteed by a receive data ready time-out  
function when receive data does not reach the receive FIFO trigger level. This time-out delay is 4 word lengths  
as defined by LCR[1:0] plus 12 bits time. The RHR interrupt is enabled by IER bit-0.  
5.3.1  
Receive Holding Register (RHR)  
The receive holding register is an 8-bit register that holds a receive data byte from the receive shift register  
(RSR). It provides the receive data interface to the host processor. The host reads the receive data byte on this  
register whenever a data byte is transferred from the RSR. RHR also part of the receive FIFO of 64 bytes by  
11-bit wide, 3 extra bits are for the error flags to be in LSR register. When the FIFO is enabled by FCR bit-0, it  
acts as the first-out register of the FIFO as new data are put over the first-in register. The receive FIFO pointer  
is bumped after the RHR register is read. Also, the error flags associated with the data byte are immediately  
updated onto the line status register (LSR) bits 1-4.  
5.3.2  
Receiver Operation in non-FIFO Mode  
FIGURE 14. RECEIVER OPERATION IN NON-FIFO MODE  
16X or 8X Clock  
(8XMODE Register)  
Receive Data Shift  
Data Bit  
Register (RSR)  
Validation  
Receive Data Characters  
Error  
Receive  
Data Byte  
Receive Data  
Flags in  
RHR Interrupt (ISR bit-2)  
Holding Register  
LSR bits  
and Errors  
(RHR)  
4:2  
RXFIFO1  
32  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
5.3.3  
Receiver Operation with FIFO  
FIGURE 15. RECEIVER OPERATION IN FIFO AND FLOW CONTROL MODE  
16X or 8X Sampling  
Clock (8XMODE Reg.)  
Receive Data Shift  
Register (RSR)  
Data Bit  
Validation  
Receive Data Characters  
Example:  
- FIFO trigger level set at 48 bytes  
- RTS/DTR hyasteresis set at +/-8 chars.  
64 bytes by 11-  
bit wide FIFO  
RTS#/DTR# re-asserts when data falls below  
Data falls to 40  
FIFO Trigger=48  
Data fills to 56  
the trigger level to restart remote transmitter.  
Enable by EFR bit-6=1, MCR bit-2.  
Receive Data  
FIFO  
(64-byte)  
RHR Interrupt (ISR bit-2) is programmed  
at FIFO trigger level (RXTRG).  
FIFO is Enable by FCR bit-0=1  
RTS#/DTR# de-asserts when data fills above  
the trigger level to suspend remote transmitter.  
Enable by EFR bit-6=1, MCR bit-2.  
Receive  
Data  
Receive Data  
Byte and Errors  
RXFIFO1  
5.4  
Automatic Hardware (RTS/CTS or DTR/DSR) Flow Control Operation  
Automatic hardware RTS/CTS or DTR/DSR flow control is used to prevent data overrun to the local receiver  
FIFO and remote receiver FIFO. The RTS#/DTR# output pin is used to request the remote unit to suspend/  
restart data transmission while the CTS#/DSR# input pin is monitored to suspend/restart the local transmitter.  
The auto RTS/CTS or DTR/DSR flow control features are individually selected to fit specific application  
requirement and enabled through EFR bit-6 and 7 and MCR bit-2 for either RTS/CTS or DTR/DSR control  
signals.  
TABLE 11: AUTO RTS/CTS OR DTR/DSR FLOW CONTROL SELECTION  
MCR BIT-2  
EFR BIT-7  
EFR BIT-6  
HARDWARE FLOW CONTROL SELECTION  
Auto CTS Flow Control Enabled  
Auto RTS Flow Control Enabled  
Auto DSR Flow Control Enabled  
Auto DTR Flow Control Enabled  
No Hardware Flow Control  
0
0
1
1
X
1
X
1
X
1
X
1
0
X
0
Auto RTS flow control must be started by asserting the RTS# output pin LOW (MCR bit-1 = 1). Similarly, Auto  
DTR flow control must be started by asserting the DTR# output pin LOW (MCR bit-0 = 1). Figure 16 shows in  
detail how automatic hardware flow control works.  
33  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
Two interrupts associated with auto RTS/CTS and DTR/DSR flow control have been added to give indication  
when RTS#/DTR# pin or CTS#/DSR# pin are de-asserted during operation. These interrupts are enabled by:  
Setting EFR bit-4 =1 to enable the shaded register bits  
Setting IER bit-7 will enable the CTS#/DSR# interrupt when these pins are de-asserted. The selection of  
CTS# or DSR# is selected via MCR bit-2. See Table 11 above for complete details.  
Setting IER bit-6 will enable the RTS#/DTR# interrupt when these pins are de-asserted. The selection of  
RTS# or DTR# is selected via MCR bit-2. See Table 11 above for complete details.  
Automatic hardware flow control is selected by setting bits 6 (RTS) and 7 (CTS) of the EFR register to logic 1.  
If CTS# pin transitions from LOW to HIGH indicating a flow control request, ISR bit-5 will be set to logic 1, (if  
enabled via IER bit 6-7), and the UART will suspend TX transmissions as soon as the stop bit of the character  
in process is shifted out. Transmission is resumed after the CTS# input returns LOW, indicating more data may  
be sent.  
FIGURE 16. AUTO RTS/DTR AND CTS/DSR FLOW CONTROL OPERATION  
Local UART  
UARTA  
Remote UART  
UARTB  
RXA  
TXB  
Receiver FIFO  
Trigger Reached  
Transmitter  
RTSA#  
TXA  
CTSB#  
RXB  
Auto RTS  
Trigger Level  
Auto CTS  
Monitor  
Receiver FIFO  
Trigger Reached  
Transmitter  
CTSA#  
RTSB#  
Auto CTS  
Monitor  
Auto RTS  
Trigger Level  
Assert RTS# to Begin  
Transmission  
1
10  
11  
ON  
ON  
ON  
RTSA#  
OFF  
OFF  
7
2
ON  
3
CTSB#  
TXB  
8
Restart  
9
Data Starts  
6
Suspend  
4
RXA FIFO  
Receive  
Data  
RX FIFO  
12  
RTS High  
Threshold  
RTS Low  
Threshold  
5
RX FIFO  
Trigger Level  
Trigger Level  
INTA  
(RXA FIFO  
Interrupt)  
RTSCTS1  
The local UART (UARTA) starts data transfer by asserting -RTSA# (1). RTSA# is normally connected to CTSB# (2) of  
remote UART (UARTB). CTSB# allows its transmitter to send data (3). TXB data arrives and fills UARTA receive FIFO  
(4). When RXA data fills up to its receive FIFO trigger level, UARTA activates its RXA data ready interrupt (5) and con-  
tinues to receive and put data into its FIFO. If interrupt service latency is long and data is not being unloaded, UARTA  
monitors its receive data fill level to match the upper threshold of RTS delay and de-assert RTSA# (6). CTSB# follows  
(7) and request UARTB transmitter to suspend data transfer. UARTB stops or finishes sending the data bits in its trans-  
mit shift register (8). When receive FIFO data in UARTA is unloaded to match the lower threshold of RTS delay (9),  
UARTA re-asserts RTSA# (10), CTSB# recognizes the change (11) and restarts its transmitter and data flow again until  
next receive FIFO trigger (12). This same event applies to the reverse direction when UARTA sends data to UARTB  
with RTSB# and CTSA# controlling the data flow.  
34  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
5.5  
Infrared Mode  
Each UART in the D158 includes the infrared encoder and decoder compatible to the IrDA (Infrared Data  
Association) version 1.0. The input pin ENIR conveniently activates all 8 UART channels to start up in the  
infrared mode. This global control pin enables the MCR bit-6 function in every UART channel register. After  
power up or a reset, the software can overwrite MCR bit-6 if so desired. ENIR and MCR bit-6 also disable its  
receiver while the transmitter is sending data. This prevents the echoed data from going to the receiver. The  
global activation ENIR pin prevents the infrared emitter from turning on and drawing large amount of current  
while the system is starting up. When the infrared feature is enabled, the transmit data outputs, TX[7:0], would  
idle at logic zero level. Likewise, the RX [7:0] inputs assume an idle level of logic zero.  
The infrared encoder sends out a 3/16 of a bit wide pulse for each “0” bit in the transmit data stream. This  
signal encoding reduces the on-time of the infrared LED, hence reduces the power consumption. See  
Figure 17 below.  
The infrared decoder receives the input pulse from the infrared sensing diode on RX pin. Each time the  
decoder senses a light pulse, it returns a logic zero to the data bit stream. The RX input signal may be inverted  
prior delivered to the input of the decoder via internal register setting. This option supports active low instead of  
normal active high pulse from some infrared modules on the market.  
FIGURE 17. INFRARED TRANSMIT DATA ENCODING AND RECEIVE DATA DECODING  
Character  
Data Bits  
1
1
1
1
1
0
0
0
0
0
TX Data  
Transmit  
IR Pulse  
(TX Pin)  
1/2 Bit Time  
Bit Time  
3/16 Bit Time  
IrEncoder-1  
Receive  
IR Pulse  
(RX pin)  
Bit Time  
1/16 Clock Delay  
1
1
1 1  
1
0
0
0
0
0
RX Data  
Data Bits  
Character  
IRdecoder-  
35  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
5.6  
Internal Loopback  
Each UART channel provides an internal loopback capability for system diagnostic. The internal loopback  
mode is enabled by setting MCR register bit-4 to logic 1. All regular UART functions operate normally.  
Figure 18 shows how the modem port signals are re-configured. Transmit data from the transmit shift register  
output is internally routed to the receive shift register input allowing the system to receive the same data that it  
was sending. The TX, RTS# and DTR# pins are held HIGH (idle or de-asserted state), and the CTS#, DSR#  
CD# and RI# inputs are ignored.  
FIGURE 18. INTERNAL LOOP BACK  
VCC  
TX [7:0]  
Transmit Shift  
Register  
MCR bit-4=1  
Receive Shift  
Register  
RX [7:0]  
VCC  
RTS# [7:0]  
RTS#  
CTS#  
CTS# [7:0]  
VCC  
DTR# [7:0]  
DTR#  
DSR#  
DSR# [7:0]  
OP1#  
RI#  
RI# [7:0]  
OP2#  
CD#  
CD# [7:0]  
36  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
5.7  
UART CHANNEL CONFIGURATION REGISTERS AND ADDRESS DECODING  
The 8 sets of UART configuration registers are decoded using address lines A8 to A11 as shown below.  
Address lines A0 to A3 select the 16 registers in each channel. The first 8 registers are 16550 compatible with  
EXAR enhanced feature registers located on the upper 8 addresses. Addresses 0x080 to 0x093 comprise the  
Device Configuration Registers and they reside in Channel 0’s space.  
UART CHANNEL  
A11  
A10  
A9  
A8  
SELECTION  
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
1
2
3
4
5
6
7
.
TABLE 12: UART CHANNEL CONFIGURATION REGISTERS  
ADDRESS  
REGISTER  
READ/WRITE  
COMMENTS  
A3 A2 A1 A0  
16550 COMPATIBLE REGISTERS  
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
1
1
1
0
0
1
1
1
0
0
0
1
1
0
0
1
0
1
0
0
1
RHR - Receive Holding Register  
Read-only  
Write-only  
Read/Write  
Read/Write  
Read/Write  
Read-only  
Write-only  
Read/Write  
Read/Write  
Read-only  
Read-only  
Write-only  
Read/Write  
LCR[7] = 0  
LCR[7] = 0  
LCR[7] = 1  
LCR[7] = 1  
LCR[7] = 0  
THR - Transmit Holding Register  
DLL - Div Latch Low  
DLM - Div Latch High  
IER - Interrupt Enable Register  
ISR - Interrupt Status Register  
FCR - FIFO Control Register  
LCR - Line Control Register  
MCR - Modem Control Register  
LSR - Line Status Register  
MSR - Modem Status Register  
RS485 Turn-Around Delay Register  
SPR - Scratch Pad Register  
ENHANCED REGISTERS  
1
1
1
0
0
0
0
0
1
0
1
0
FCTR - Feature Control Register  
EFR - Enhanced Function Register  
TXCNT - Transmit FIFO Level Counter  
Read/Write  
Read/Write  
Read-only  
37  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
TABLE 12: UART CHANNEL CONFIGURATION REGISTERS  
ADDRESS  
REGISTER  
TXTRG - Transmit FIFO Trigger Level  
RXCNT - Receive FIFO Level Counter  
RXTRG - Receive FIFO Trigger Level  
Xoff-1 - Xoff Character 1  
READ/WRITE  
Write-only  
Read-only  
Write-only  
Write-only  
Read-only  
Write-only  
Write-only  
Write-only  
COMMENTS  
1
1
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
1
1
0
0
0
1
1
0
1
1
0
0
1
0
1
Xchar  
Xon,Xoff Rcvd. Flags  
Xoff-2 - Xoff Character 2  
Xon-1 - Xon Character 1  
Xon-2 - Xon Character 2  
TABLE 13: UART CHANNEL CONFIGURATION REGISTERS DESCRIPTION. SHADED BITS ARE ENABLED BY EFR BIT-4.  
ADDRESS  
A3-A0  
REG  
READ/  
WRITE  
BIT-7  
BIT-6  
BIT-5  
BIT-4  
BIT-3  
BIT-2  
BIT-1  
BIT-0  
COMMENT  
NAME  
0 0 0 0  
0 0 0 0  
0 0 0 0  
0 0 0 1  
0 0 0 1  
RHR  
THR  
DLL  
DLM  
IER  
R
Bit-7  
Bit-7  
Bit-7  
Bit-7  
0/  
Bit-6  
Bit-6  
Bit-6  
Bit-6  
0/  
Bit-5  
Bit-5  
Bit-4  
Bit-4  
Bit-4  
Bit-4  
0
Bit-3  
Bit-3  
Bit-2  
Bit-2  
Bit-2  
Bit-2  
Bit-1  
Bit-1  
Bit-1  
Bit-1  
Bit-0  
Bit-0  
Bit-0  
Bit-0  
LCR[7]=0  
LCR[7]=0  
LCR[7]=1  
LCR[7]=1  
W
R/W  
R/W  
R/W  
Bit-5  
Bit-3  
Bit-5  
Bit-3  
0/  
Modem  
RX Line TX Empty RX Data  
Status Int. Status Int.  
Int.  
Enable  
Int.  
Enable  
CTS/  
RTS/  
Xon/Xoff/  
Enable  
Enable  
DSR# Int. DTR# Int. Sp. Char.  
Enable  
Enable  
Int.  
Enable  
0 0 1 0  
0 0 1 0  
ISR  
R
FIFOs  
Enable  
FIFOs  
Enable  
0/  
0/  
INT  
Source  
Bit-3  
INT  
Source  
Bit-2  
INT  
Source  
Bit-1  
INT  
Source  
Bit-0  
Delta-  
Flow Cntl  
Xoff/special  
char  
FCR  
W
RXFIFO RXFIFO  
0/  
0/  
DMA  
TX FIFO RX FIFO  
FIFOs  
Trigger  
Trigger  
Mode  
Reset  
Reset  
Enable  
TXFIFO  
Trigger  
TX FIFO  
Trigger  
0 0 1 1  
0 1 0 0  
LCR  
R/W  
R/W  
Divisor  
Enable  
Set TX Set Parity Even Par-  
Parity  
Enable  
Stop Bits  
Word  
Length  
Word  
Length  
Break  
ity  
Bit-1  
Bit-0  
(OP2)1  
(OP1)1  
MCR  
0/  
0/  
0/  
Internal  
Lopback  
Enable  
RTS# Pin DTR# Pin  
Control Control  
BRG  
Prescaler  
IR  
XonAny  
RTS/DTR  
Flow Sel  
Enable  
0 1 0 1  
0 1 1 0  
LSR  
R/W  
R
RX FIFO  
ERROR  
TSR  
Empty  
THR  
Empty  
RX Break RX Fram- RX Parity RX Over- RX Data  
ing Error  
Error  
run  
Ready  
MSR  
CD  
RI  
DSR  
CTS  
Delta  
CD#  
Delta  
RI#  
Delta  
DSR#  
Delta  
CTS#  
MSR  
W
RS485  
DLY-3  
RS485  
DLY-2  
RS485  
DLY-1  
RS485  
DLY-0  
Reserved Reserved Reserved Reserved  
38  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
TABLE 13: UART CHANNEL CONFIGURATION REGISTERS DESCRIPTION. SHADED BITS ARE ENABLED BY EFR BIT-4.  
ADDRESS  
A3-A0  
REG  
READ/  
WRITE  
BIT-7  
BIT-6  
BIT-5  
BIT-4  
BIT-3  
BIT-2  
BIT-1  
BIT-0  
COMMENT  
NAME  
0 1 1 1  
1 0 0 0  
SPR  
R/W  
R/W  
Bit-7  
Bit-6  
Bit-5  
Bit-4  
Bit-3  
Bit-2  
Bit-1  
Bit-0  
User Data  
FCTR  
TRG  
Table  
TRG  
Table  
Auto  
RS485  
Enable  
Invert IR RTS/DTR RTS/DTR RTS/DTR RTS/DTR  
RX Input Hyst Bit-3 Hyst Bit-2 Hyst Bit-1 Hyst Bit-0  
Bit-1  
Bit-0  
1 0 0 1  
EFR  
R/W  
Auto  
Auto  
Special  
Char  
Select  
Enable  
Software Software Software Software  
Flow Cntl Flow Cntl Flow Cntl Flow Cntl  
CTS/DSR RTS/DTR  
Enable  
IER [7:5],  
ISR [5:4],  
FCR[5:4],  
Enable  
Bit-3  
Bit-2  
Bit-1  
Bit-0  
MCR[7:5,2]  
MSR[7:4]  
1 0 1 0  
1 0 1 0  
1 0 1 1  
1 0 1 1  
1 1 0 0  
TXCNT  
TXTRG  
RXCNT  
RXTRG  
XCHAR  
R
W
R
Bit-7  
Bit-7  
Bit-7  
Bit-7  
0
Bit-6  
Bit-6  
Bit-6  
Bit-6  
0
Bit-5  
Bit-5  
Bit-5  
Bit-5  
0
Bit-4  
Bit-4  
Bit-4  
Bit-4  
0
Bit-3  
Bit-3  
Bit-3  
Bit-3  
0
Bit-2  
Bit-2  
Bit-2  
Bit-2  
0
Bit-1  
Bit-1  
Bit-1  
Bit-1  
Bit-0  
Bit-0  
Bit-0  
Bit-0  
W
R
Xon Det. Xoff Det. Self-clear  
Indicator Indicator after read  
1 1 0 0  
1 1 0 1  
1 1 1 0  
1 1 1 1  
XOFF1  
XOFF2  
XON1  
XON2  
W
W
W
W
Bit-7  
Bit-7  
Bit-7  
Bit-7  
Bit-6  
Bit-6  
Bit-6  
Bit-6  
Bit-5  
Bit-5  
Bit-5  
Bit-5  
Bit-4  
Bit-4  
Bit-4  
Bit-4  
Bit-3  
Bit-3  
Bit-3  
Bit-3  
Bit-2  
Bit-2  
Bit-2  
Bit-2  
Bit-1  
Bit-1  
Bit-1  
Bit-1  
Bit-0  
Bit-0  
Bit-0  
Bit-0  
NOTE: MCR bits 2 and 3 (OP1 and OP2 outputs) are not available in the XR17D158. They are present for 16C550  
compatibility during Internal loopback, see Figure 18.  
5.8  
Registers  
5.8.1  
Receive Holding Register (RHR) - Read-Only  
See “Section 5.3, Receiver” on page 32 for complete details.  
5.8.2 Transmit Holding Register (THR) - Write-Only  
See “Section 5.2, Transmitter” on page 30 for complete details.  
5.8.3 Baud Rate Generator Divisors (DLL and DLM) - Read/Write  
The Baud Rate Generator (BRG) is a 16-bit counter that generates the data rate for the transmitter and  
receiver. The baud rate is programmed through registers DLL and DLM which are only accessible when LCR  
bit-7 is set to logic 1. See “Section 5.1, Programmable Baud Rate Generator” on page 29 for more detail.  
39  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
5.8.4  
Interrupt Enable Register (IER) - Read/Write  
The Interrupt Enable Register (IER) masks the interrupts from receive data ready, transmit empty, line status  
and modem status registers. These interrupts are reported in the Interrupt Status Register (ISR) register and  
also encoded in INT (INT0-INT3) register in the Device Configuration Registers.  
IER VERSUS RECEIVE FIFO INTERRUPT MODE OPERATION  
When the receive FIFO (FCR bit-0 = a logic 1) and receive interrupts (IER BIT-0 = logic 1) are enabled, the  
RHR interrupts (see ISR bits 3 and 4) status will reflect the following:  
A. The receive data available interrupts are issued to the host when the FIFO has reached the programmed  
trigger level. It will be cleared when the FIFO drops below the programmed trigger level.  
B. FIFO level will be reflected in the ISR register when the FIFO trigger level is reached. Both the ISR register  
status bit and the interrupt will be cleared when the FIFO drops below the trigger level.  
C. The receive data ready bit (LSR BIT-0) is set as soon as a character is transferred from the shift register to  
the receive FIFO. It is reset when the FIFO is empty.  
IER VERSUS RECEIVE/TRANSMIT FIFO POLLED MODE OPERATION  
When FCR BIT-0 equals a logic 1 for FIFO enable, resetting IER bits 0-3 enables the 158 in the FIFO polled  
mode of operation. Since the receiver and transmitter have separate bits in the LSR either or both can be used  
in the polled mode by selecting respective transmit or receive control bit(s).  
A. LSR BIT-0 indicates there is data in RHR or RX FIFO.  
B. LSR BIT-1 indicates an overrun error has occurred and that data in the FIFO may not be valid.  
C. LSR BITS 2-4 provides the type of receive data errors encountered for the data byte in RHR, if any.  
D. LSR BIT-5 indicates THR is empty.  
E. LSR BIT-6 indicates when both the transmit FIFO and TSR are empty.  
F. LSR BIT-7 indicates a data error in at least one character in the RX FIFO.  
IER[0]: RHR Interrupt Enable  
The receive data ready interrupt will be issued when RHR has a data character in the non-FIFO mode or when  
the receive FIFO has reached the programmed trigger level in the FIFO mode. A receive data timeout interrupt  
will be issued in the FIFO mode when the receive FIFO has not reached the programmed trigger level and the  
RX input has been idle for 4 character + 12 bit times.  
Logic 0 = Disable the receive data ready interrupt (default).  
Logic 1 = Enable the receiver data ready interrupt.  
IER[1]: THR Interrupt Enable  
When Auto RS485 mode operation is disabled (FCTR bit-5 = 0), this interrupt is associated with bit-5 in the  
LSR register. An interrupt is issued whenever the THR becomes empty or when data in the FIFO falls below  
the programmed trigger level. When Auto RS485 mode operation is enabled (FCTR bit-5 = 1), this interrupt is  
associated with bit-6 in the LSR register. An interrupt is issued whenever the TX FIFO and the TSR becomes  
empty.  
Logic 0 = Disable Transmit Holding Register empty interrupt (default).  
Logic 1 = Enable Transmit Holding Register empty interrupt.  
IER[2]: Receive Line Status Interrupt Enable  
Any of LSR register bits 1, 2, 3 or 4 will generate an LSR interrupt immediately when a character received by  
the RX FIFO has an error.  
Logic 0 = Disable the receiver line status interrupt (default).  
Logic 1 = Enable the receiver line status interrupt.  
IER[3]: Modem Status Interrupt Enable  
Logic 0 = Disable the modem status register interrupt (default).  
Logic 1 = Enable the modem status register interrupt.  
40  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
IER[4]: Reserved  
IER[5]: Xoff Interrupt Enable (requires EFR bit-4=1)  
Logic 0 = Disable the software flow control, receive Xoff interrupt (default).  
Logic 1 = Enable the software flow control, receive Xoff interrupt. See Software Flow Control section for  
details.  
IER[6]: RTS#/DTR# Output Interrupt Enable (requires EFR bit-4=1)  
The RTS# or DTR# output is selected via MCR bit-2. See Table 11 or MCR[2] for complete details.  
Logic 0 = Disable the RTS#/DTR# interrupt (default).  
Logic 1 = Enable the RTS#/DTR# interrupt. The UART issues an interrupt when the RTS#/DTR# pin makes  
a transition.  
IER[7]: CTS# Input Interrupt Enable (requires EFR bit-4=1)  
The CTS# or DSR# input is selected via MCR bit-2. See Table 11 or MCR[2] for complete details.  
Logic 0 = Disable the CTS#/DSR# interrupt (default).  
Logic 1 = Enable the CTS#/DSR# interrupt. The UART issues an interrupt when CTS# pin makes a transi-  
tion.  
5.8.5  
Interrupt Status Register (ISR) - Read-Only  
The UART provides multiple levels of prioritized interrupts to minimize external software interaction. The Inter-  
rupt Status Register (ISR) provides the user with six interrupt status bits. Performing a read cycle on the ISR  
will give the user the current highest pending interrupt level to be serviced with others queued up for next ser-  
vice. No other interrupts are acknowledged until the pending interrupt is serviced. The Interrupt Source Table,  
Table 14, shows the data values (bit 0-5) for the six prioritized interrupt levels and the interrupt sources associ-  
ated with each of these interrupt levels.  
Interrupt Generation:  
LSR is by any of the LSR bits 1, 2, 3 and 4.  
RXRDY is by RX trigger level.  
RXRDY Time-out is by the a 4-char plus 12 bits delay timer if the RX FIFO level is less than the RX trigger  
level.  
TXRDY is by LSR bit-5 (or bit-6 in auto RS485 control).  
MSR is by any of the MSR bits, 0, 1, 2 and 3.  
Receive Xon/Xoff/Special character is by detection of a Xon, Xoff or Special character.  
CTS#/DSR# is by a change of state on the input pin (from LOW to HIGH) with auto flow control enabled,  
EFR bit-7, and depending on selection of MCR bit-2.  
RTS#/DTR# is when its receiver changes the state of the output pin (from LOW to HIGH) during auto RTS/  
DTR flow control enabled by EFR bit-6 and selection of MCR bit-2.  
Wake-up Indicator: when the UART comes out of sleep mode.  
Interrupt Clearing:  
LSR interrupt is cleared by a read to the LSR register.  
RXRDY is cleared by reading data until FIFO falls below the trigger level.  
RXRDY Time-out is cleared by reading data until the RX FIFO is empty.  
TXRDY interrupt is cleared by a read to the ISR register.  
MSR interrupt is cleared by a read to the MSR register.  
Xon or Xoff character interrupt is cleared by a read to ISR register.  
Special character interrupt is cleared by a read to ISR register or after the next character is received.  
RTS#/DTR# and CTS#/DSR# status change interrupts are cleared by a read to the MSR register.  
Wake-up Indicator is cleared by a read to the INT0 register.  
41  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
]
TABLE 14: INTERRUPT SOURCE AND PRIORITY LEVEL  
ISR REGISTER STATUS BITS  
BIT-4 BIT-3 BIT-2 BIT-1  
PRIORITY  
SOURCE OF THE INTERRUPT  
LEVEL  
BIT-5  
BIT-0  
1
0
0
0
0
0
0
1
0
0
0
1
1
0
LSR (Receiver Line Status Register)  
RXRDY (Received Data Ready)  
2
3
4
5
6
7
X
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
RXRDY (Receive Data Time-out)  
TXRDY (Transmitter Holding Register Empty)  
MSR (Modem Status Register)  
RXRDY (Received Xon/Xoff or Special character)  
CTS#/DSR#, RTS#/DTR# change of state  
None (default)  
ISR[0]: Interrupt Status  
Logic 0 = An interrupt is pending and the ISR contents may be used as a pointer to the appropriate interrupt  
service routine.  
Logic 1 = No interrupt pending (default condition).  
ISR[3:1]: Interrupt Status  
These bits indicate the source for a pending interrupt at interrupt priority levels 1, 2, 3 and 4 (See Interrupt  
Source Table 14).  
ISR[4]: Xoff/Xon or Special Character Interrupt Status  
This bit is enabled when EFR bit-4 is set to a logic 1. ISR bit-4 indicates that the receiver detected a data match  
of the Xoff character(s). If this is an Xoff/Xon interrupt, it can be cleared by a read to the ISR. Reading the  
XCHAR register will indicate which character (Xoff or Xon) was received last. If it is a special character  
interrupt, it can be cleared by reading ISR or it will automatically clear after the next character is received.  
ISR[5]: RTS#/CTS# Interrupt Status  
This bit is enabled when EFR bit-4 is set to a logic 1. ISR bit-5 indicates that the CTS# or RTS# has changed  
state from LOW to HIGH.  
ISR[7:6]: FIFO Enable Status  
These bits are set to a logic 0 when the FIFOs are disabled. They are set to a logic 1 when the FIFOs are  
enabled.  
5.8.6  
FIFO Control Register (FCR) - Write-Only  
This register is used to enable the FIFOs, clear the FIFOs, set the transmit/receive FIFO trigger levels, and  
select the DMA mode (legacy term that refers to "block transfer mode"). The DMA and FIFO modes are  
defined as follows:  
FCR[0]: TX and RX FIFO Enable  
Logic 0 = Disable the transmit and receive FIFO (default).  
Logic 1 = Enable the transmit and receive FIFOs. This bit must be set to logic 1 when other FCR bits are  
written or they will not be programmed.  
FCR[1]: RX FIFO Reset  
This bit is only active when FCR bit-0 is active.  
Logic 0 = No receive FIFO reset (default).  
Logic 1 = Reset the receive FIFO pointers and FIFO level counter logic (the receive shift register is not  
cleared or altered). This bit will return to a logic 0 after resetting the FIFO.  
42  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
FCR[2]: TX FIFO Reset  
This bit is only active when FCR bit-0 is active.  
Logic 0 = No transmit FIFO reset (default).  
Logic 1 = Reset the transmit FIFO pointers and FIFO level counter logic (the transmit shift register is not  
cleared or altered). This bit will return to a logic 0 after resetting the FIFO.  
FCR[3]: DMA Mode Select  
This bit has no effect since TXRDY and RXRDY pins are not available in this device. It is provided for legacy  
software. DMA is a legacy term used for block transfer mode. DMA does not stand for "Direct Memory Ac-  
cess."  
Logic 0 = Set DMA to mode 0 (default).  
Logic 1 = Set DMA to mode 1.  
FCR[5:4]: Transmit FIFO Trigger Select  
(logic 0 = default, TX trigger level = 1)  
The FCTR bits 6-7 are associated with these 2 bits by selecting one of the four tables. The 4 user selectable  
trigger levels in 4 tables are supported for compatibility reasons. These 2 bits set the trigger level for the  
transmit FIFO interrupt. The UART will issue a transmit interrupt when the number of characters in the FIFO  
falls below the selected trigger level, or when it gets empty in case that the FIFO did not get filled over the  
trigger level on last re-load. Table 15 below shows the selections. EFR bit-4 must be set to ‘1’ before these  
bits can be accessed. Note that the receiver and the transmitter cannot use different trigger tables. Whichever  
selection is made last applies to both the RX and TX side.  
43  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
FCR[7:6]: Receive FIFO Trigger Select  
(logic 0 = default, RX trigger level =1)  
The FCTR Bits 6-7 are associated with these 2 bits. These 2 bits are used to set the trigger level for the receiv-  
er FIFO interrupt. Table 15 shows the complete selections. Note that the receiver and the transmitter cannot  
use different trigger tables. Whichever selection is made last applies to both the RX and TX side.  
TABLE 15: TRANSMIT AND RECEIVE FIFO TRIGGER LEVEL SELECTION  
TRANSMIT  
TRIGGER  
TABLE  
FCTR FCTR  
BIT-7  
FCR  
FCR  
FCR  
FCR  
BIT-4  
RECEIVE  
TRIGGER  
LEVEL  
COMPATIBILITY  
BIT-6  
BIT-7  
BIT-6  
BIT-5  
TRIGGER LEVEL  
Table A  
0
0
0
0
1 (default)  
16C550, 16C2550,  
16C2552, 16C554,  
16C580 compati-  
ble.  
0
0
1
1
0
1
0
1
1 (default)  
4
8
14  
Table B  
0
1
1
1
0
1
0
0
1
1
0
1
0
1
16  
8
16C650A compati-  
ble.  
24  
30  
0
0
1
1
0
1
0
1
8
16  
24  
28  
Table C  
0
0
1
1
0
1
0
1
8
16C654 compati-  
ble.  
16  
32  
56  
0
0
1
1
0
1
0
1
8
16  
56  
60  
Table D  
X
X
X
X
Programmable Programmable 16C850, 16C2850,  
16C2852, 16C854,  
16C864, 16L2750,  
16L2751, 16L2752  
compatible.  
44  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
5.8.7  
Line Control Register (LCR) - Read/Write  
The Line Control Register is used to specify the asynchronous data communication format. The word or  
character length, the number of stop bits, and the parity are selected by writing the appropriate bits in this  
register.  
LCR[1:0]: TX and RX Word Length Select  
These two bits specify the word length to be transmitted or received.  
BIT-1  
BIT-0  
WORD LENGTH  
0
0
1
1
0
1
0
1
5 (default)  
6
7
8
LCR[2]: TX and RX Stop-bit Length Select  
The length of stop bit is specified by this bit in conjunction with the programmed word length.  
STOP BIT LENGTH  
(BIT TIME(S))  
WORD  
LENGTH  
BIT-2  
0
1
1
5,6,7,8  
5
1 (default)  
1-1/2  
2
6,7,8  
LCR[3]: TX and RX Parity Select  
Parity or no parity can be selected via this bit. The parity bit is a simple way used in communications for data  
integrity check. See Table 16 for parity selection summary below.  
Logic 0 = No parity.  
Logic 1 = A parity bit is generated during the transmission while the receiver checks for parity error of the  
data character received.  
LCR[4]: TX and RX Parity Select  
If the parity bit is enabled with LCR bit-3 set to a logic 1, LCR BIT-4 selects the even or odd parity format.  
Logic 0 = ODD Parity is generated by forcing an odd number of logic 1’s in the transmitted character. The  
receiver must be programmed to check the same format (default).  
Logic 1 = EVEN Parity is generated by forcing an even the number of logic 1’s in the transmitted character.  
The receiver must be programmed to check the same format.  
LCR[5]: TX and RX Parity Select  
If the parity bit is enabled, LCR BIT-5 selects the forced parity format.  
LCR BIT-5 = logic 0, parity is not forced (default).  
LCR BIT-5 = logic 1 and LCR BIT-4 = logic 0, parity bit is forced to a logical 1 for the transmit and receive  
data.  
LCR BIT-5 = logic 1 and LCR BIT-4 = logic 1, parity bit is forced to a logical 0 for the transmit and receive  
data.  
45  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
TABLE 16: PARITY SELECTION  
LCR BIT-5 LCR BIT-4 LCR BIT-3  
PARITY SELECTION  
No parity  
X
X
0
1
0
1
0
1
1
1
1
0
Odd parity  
0
Even parity  
1
Force parity to mark, “1”  
Forced parity to space, “0”  
1
LCR[6]: Transmit Break Enable  
When enabled the Break control bit causes a break condition to be transmitted (the TX output is forced to a  
“space", LOW state). This condition remains until disabled by setting LCR bit-6 to a logic 0.  
Logic 0 = No TX break condition (default).  
Logic 1 = Forces the transmitter output (TX) to a “space”, LOW, for alerting the remote receiver of a line  
break condition.  
LCR[7]: Baud Rate Divisors Enable  
Baud rate generator divisor (DLL/DLM) enable.  
Logic 0 = Data registers are selected (default).  
Logic 1 = Divisor latch registers are selected.  
5.8.8  
Modem Control Register (MCR) - Read/Write  
The MCR register is used for controlling the modem interface signals or general purpose inputs/outputs.  
MCR[0]: DTR# Pins  
The DTR# pin may be used for automatic hardware flow control enabled by EFR bit-6 and MCR bit-2=1. If the  
modem interface is not used, this output may be used for general purpose.  
Logic 0 = Force DTR# output HIGH (default).  
Logic 1 = Force DTR# output LOW.  
MCR[1]: RTS# Pins  
The RTS# pin may be used for automatic hardware flow control by enabled by EFR bit-6 and MCR bit-2=0. If  
the modem interface is not used, this output may be used for general purpose.  
Logic 0 = Force RTS# output HIGH (default).  
Logic 1 = Force RTS# output LOW.  
MCR[2]: DTR# or RTS# for Auto Flow Control  
DTR# or RTS# auto hardware flow control select. This bit is in effect only when auto RTS/DTR is enabled by  
EFR bit-6. DTR# selection is associated with DSR# and RTS# is with CTS#.  
Logic 0 = Uses RTS# and CTS# pins for auto hardware flow control.  
Logic 1 = Uses DTR# and DSR# pins for auto hardware flow control.  
MCR[3]: (OP2)  
The OP2 output is not available in the XR17D158. It is present for 16C550 compatibility during internal  
loopback. See Figure 18. Logic 0 is default.  
MCR[4]: Internal Loopback Enable  
Logic 0 = Disable internal loopback mode (default).  
Logic 1 = Enable internal loopback mode, see loopback section and Figure 18.  
46  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
MCR[5]: Xon-Any Enable  
Logic 0 = Disable Xon-Any function (for 16C550 compatibility) (default).  
Logic 1 = Enable Xon-Any function. In this mode any RX character received will enable Xon, resume data  
transmission.  
MCR[6]: Infrared Encoder/Decoder Enable  
The state of this bit depends on the sampled logic level of pin ENIR during power up, following a hardware  
reset or a soft-reset. Afterward user can override this bit for desired operation.  
Logic 0 = Disable the infrared mode, operates in the normal serial character mode.  
Logic 1 = Enable infrared IrDA receive and transmit inputs/outputs. While in this mode, the TX/RX output/  
input are routed to the infrared encoder/decoder. The data input and output levels will conform to the IrDA  
infrared interface requirement. As such, while in this mode the infrared TX output will be a logic 0 during idle  
data conditions. FCTR bit-4 may be selected to invert the RX input signal level going to the decoder for  
infrared modules that provide rather an inverted output.  
MCR[7]: Clock Prescaler Select  
Logic 0 = Divide by one. The input clock from the crystal or external clock is fed directly to the Programmable  
Baud Rate Generator without further modification, i.e., divide by one (default).  
Logic 1 = Divide by four. The prescaler divides the input clock from the crystal or external clock by four and  
feeds it to the Programmable Baud Rate Generator, hence, data rates become one-fourth.  
5.8.9  
Line Status Register (LSR) - Read/Only  
This register provides the status of data transfers between the UART and the host. If IER bit-2 is set to a logic  
1, an LSR interrupt will be generated immediately when any character in the RX FIFO has an error (parity,  
framing, overrun, break). Reading LSR will clear LSR bits 4-1.  
LSR[0]: Receive Data Ready Indicator  
Logic 0 = No data in receive holding register or FIFO (default).  
Logic 1 = Data has been received and is saved in the receive holding register or FIFO.  
LSR[1]: Receiver Overrun Flag  
Logic 0 = No overrun error (default).  
Logic 1 = Overrun error. A data overrun error condition occurred in the receive shift register. This happens  
when additional data arrives while the FIFO is full. In this case the previous data in the receive shift register  
is overwritten. Note that under this condition the data byte in the receive shift register is not transferred into  
the FIFO, therefore the data in the FIFO is not corrupted by the error. This bit is cleared after LSR is read.  
LSR[2]: Receive Data Parity Error Tag  
Logic 0 = No parity error (default).  
Logic 1 = Parity error. The receive character in RHR does not have correct parity information and is suspect.  
This error is associated with the character available for reading in RHR. This bit is cleared after LSR is read.  
LSR[3]: Receive Data Framing Error Tag  
Logic 0 = No framing error (default).  
Logic 1 = Framing error. The receive character did not have a valid stop bit(s). This error is associated with  
the character available for reading in RHR. This bit is cleared after LSR is read.  
LSR[4]: Receive Break Tag  
Logic 0 = No break condition (default).  
Logic 1 = The receiver received a break signal (RX was a logic 0 for one character frame time). In the FIFO  
mode, only one break character is loaded into the FIFO. This bit is cleared after LSR is read.  
47  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
LSR[5]: Transmit Holding Register Empty Flag  
This bit is the Transmit Holding Register Empty indicator. This bit indicates that the transmitter is ready to  
accept a new character for transmission. In addition, this bit causes the UART to issue an interrupt to the host  
when the THR interrupt enable is set. The THR bit is set to a logic 1 when the last data byte is transferred from  
the transmit holding register to the transmit shift register. The bit is reset to logic 0 concurrently with the data  
loading to the transmit holding register by the host. In the FIFO mode this bit is set when the transmit FIFO is  
empty; it is cleared when at least 1 byte is written to the transmit FIFO.  
LSR[6]: Transmit Shift Register Empty Flag  
This bit is the Transmit Shift Register Empty indicator. This bit is set to a logic 1 whenever the transmitter goes  
idle. It is set to logic 0 whenever either the THR or TSR contains a data character. In the FIFO mode this bit is  
set to one whenever the transmit FIFO and transmit shift register are both empty.  
LSR[7]: Receive FIFO Data Error Flag  
Logic 0 = No FIFO error (default).  
Logic 1 = An indicator for the sum of all error bits in the RX FIFO. At least one parity error, framing error or  
break indication is in the FIFO data. This bit clears when there is no more error(s) in the FIFO.  
5.8.10 Modem Status Register (MSR) - Read-Only  
This register provides the current state of the modem interface signals, or other peripheral device that the  
UART is connected. Lower four bits of this register are used to indicate the changed information. These bits  
are set to a logic 1 whenever a signal from the modem changes state. These bits may be used as general  
purpose inputs/outputs when they are not used with modem signals.  
MSR[0]: Delta CTS# Input Flag  
Logic 0 = No change on CTS# input (default).  
Logic 1 = The CTS# input has changed state since the last time it was monitored. A modem status interrupt  
will be generated if MSR interrupt is enabled (IER bit-3.  
MSR[1]: Delta DSR# Input Flag  
Logic 0 = No change on DSR# input (default).  
Logic 1 = The DSR# input has changed state since the last time it was monitored. A modem status interrupt  
will be generated if MSR interrupt is enabled (IER bit-3).  
MSR[2]: Delta RI# Input Flag  
Logic 0 = No change on RI# input (default).  
Logic 1 = The RI# input has changed from a logic 0 to a logic 1, ending of the ringing signal. A modem status  
interrupt will be generated if MSR interrupt is enabled (IER bit-3).  
MSR[3]: Delta CD# Input Flag  
Logic 0 = No change on CD# input (default).  
Logic 1 = Indicates that the CD# input has changed state since the last time it was monitored. A modem  
status interrupt will be generated if MSR interrupt is enabled (IER bit-3).  
MSR[4]: CTS Input Status  
CTS# pin may function as automatic hardware flow control signal input if it is enabled and selected by Auto  
CTS (EFR bit-7) and RTS/CTS flow control select (MCR bit-2). Auto CTS flow control allows starting and  
stopping of local data transmissions based on the modem CTS# signal. A logic 1 on the CTS# pin will stop  
UART transmitter as soon as the current character has finished transmission, and a logic 0 will resume data  
transmission. If automatic hardware flow control is not used, MSR bit-4 bit is the compliment of the CTS# input.  
However in the loopback mode, this bit is equivalent to the RTS# bit in the MCR register. The CTS# input may  
be used as a general purpose input when the modem interface is not used.  
48  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
MSR[5]: DSR Input Status  
This input may be used for auto DTR/DSR flow control function, see “Section 5.4, Automatic Hardware (RTS/  
CTS or DTR/DSR) Flow Control Operation” on page 33 for complete details. If automatic hardware flow control  
is not used, this bit is the compliment of the DSR# input. In the loopback mode, this bit is equivalent to the  
DTR# bit in the MCR register. The DSR# input may be used as a general purpose input when the modem  
interface is not used.  
MSR[6]: RI Input Status  
This bit is the compliment of the RI# input. In the loopback mode this bit is equivalent to bit-2 in the MCR  
register. The RI# input may be used as a general purpose input when the modem interface is not used.  
MSR[7]: CD Input Status  
This bit is the compliment of the CD# input. In the loopback mode this bit is equivalent to bit-3 in the MCR  
register. The CD# input may be used as a general purpose input  
5.8.11 Modem Status Register (MSR) - Write-Only  
The upper four bits 4-7 of this register sets the delay in number of bits time for the auto RS485 turn around  
from transmit to receive.  
MSR [7:4]  
When Auto RS485 feature is enabled (FCTR bit-5=1) and RTS# output is connected to the enable input of a  
RS-485 transceiver. These 4 bits select from 0 to 15 bit-time delay after the end of the last stop-bit of the last  
transmitted character. This delay controls when to change the state of RTS# output. This delay is very useful in  
long-cable networks. Table 17 shows the selection. The bits are enabled by EFR bit-4.  
TABLE 17: AUTO RS485 HALF-DUPLEX DIRECTION CONTROL DELAY FROM TRANSMIT-TO-RECEIVE  
MSR[7]  
MSR[6]  
MSR[5]  
MSR[4]  
DELAY IN DATA BIT(S) TIME  
0
0
0
0
0
9
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
2
3
4
5
6
7
8
9
10  
11  
12  
13  
14  
15  
49  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
5.8.12 SCRATCH PAD REGISTER (SPR) - Read/Write  
This is an 8-bit general purpose register for the user to store temporary data. The content of this register is  
preserved during sleep mode but becomes 0xFF (default) after a reset or a power off-on cycle.  
5.8.13  
FEATURE CONTROL REGISTER (FCTR) - Read/Write  
FCTR [3:0] - Auto RTS/DTR Flow Control Hysteresis Select  
These bits select the auto RTS/DTR flow control hysteresis and only valid when TX and RX Trigger Table-D is  
selected (FCTR bit-6 and 7 are set to logic 1). The RTS/DTR hysteresis is referenced to the RX FIFO trigger  
level. After reset, these bits are set to logic 0 selecting the next FIFO trigger level for hardware flow control.  
Table 18 shows the 16 selectable hysteresis levels.  
FCTR[4]: Infrared RX Input Logic Select  
Logic 0 = Select RX input as active high encoded IrDA data, normal, (default).  
Logic 1 = Select RX input as active low encoded IrDA data, inverted.  
FCTR[5]: Auto RS485 Enable  
Auto RS485 half duplex control enable/disable.  
Logic 0 = Standard ST16C550 mode. Transmitter generates an interrupt when transmit holding register  
(THR) becomes empty. Transmit Shift Register (TSR) may still be shifting data bit out.  
Logic 1 = Enable Auto RS485 half duplex direction control. RTS# output changes its logic level from HIGH to  
LOW when finished sending the last stop bit of the last character out of the TSR register. It changes back to  
HIGH from LOW when a data byte is loaded into the THR or transmit FIFO. The change to HIGH occurs prior  
sending the start-bit. It also changes the transmitter interrupt from transmit holding to transmit shift register  
(TSR) empty.  
FCTR[7:6]: TX and RX FIFO Trigger Table Select  
These 2 bits select the transmit and receive FIFO trigger level table A, B, C or D. When table A, B, or C is  
selected the auto RTS flow control trigger level is set to "next FIFO trigger level" for compatibility to ST16C550  
and ST16C650 series. RTS#/DTR# triggers on the next level of the RX FIFO trigger level, in another word, one  
FIFO level above and one FIFO level below. See Table 15 for complete selection with FCR bit 4-5 and FCTR  
bit 6-7, i.e. if Table C is used on the receiver with RX FIFO trigger level set to 56 bytes, RTS/DTR# output will  
de-assert at 60 and re-assert at 16.  
50  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
TABLE 18: 16 SELECTABLE HYSTERESIS LEVELS WHEN TRIGGER TABLE-D IS SELECTED  
RTS/DTR HYSTERESIS  
FCTR BIT-3 FCTR BIT-2 FCTR BIT-1 FCTR BIT-0  
(CHARACTERS)  
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
± 4  
± 6  
± 8  
± 8  
± 16  
± 24  
± 32  
± 12  
± 20  
± 28  
± 36  
± 40  
± 44  
± 48  
± 52  
5.8.14 Enhanced Feature Register (EFR) - Read/Write  
Enhanced features are enabled or disabled using this register. Bits 0-3 provide single or dual consecutive  
character software flow control selection (see Table 19). When the Xon1 and Xon2 and Xoff1 and Xoff2 modes  
are selected, the double 8-bit words are concatenated into two sequential characters. Caution: note that  
whenever changing the TX or RX flow control bits, always reset all bits back to logic 0 (disable) before  
programming a new setting.  
EFR[3:0]: Software Flow Control Select  
Combinations of software flow control can be selected by programming these bits. See Table 19 for complete  
selections. The XOFF1/XOFF2 characters are transmitted approximately 2 character times after the RX FIFO  
level has reached the RX trigger level, irrespective of which trigger table is used (Trigger Tables A-D). The  
XON1/XON2 characters are transmitted when the RX FIFO level falls below the next lower trigger level for  
Trigger Tables A-C and they are transmitted when the RX FIFO level falls below the (RX trigger level -  
hysteresis level) for Trigger Table D. For example, if Trigger Table D is used with an RX trigger level of 56 and  
a hysteresis level of 16, the XON1/XON2 characters are sent when the RX FIFO level count falls below 40.  
51  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
EFR[4]: Enhanced Function Bits Enable  
Enhanced function control bit. This bit enables the functions in IER bits 4-7, ISR bits 4-5, FCR bits 4-5, and  
MCR bits 5-7 to be modified. After modifying any enhanced bits, EFR bit-4 can be set to a logic 0 to latch the  
new values. This feature prevents legacy software from altering or overwriting the enhanced functions once  
set. Normally, it is recommended to leave it enabled, logic 1.  
Logic 0 = modification disable/latch enhanced features. IER bits 4-7, ISR bits 4-5, FCR bits 4-5, and MCR  
bits 5-7 are saved to retain the user settings. After a reset, the IER bits 4-7, ISR bits 4-5, FCR bits 4-5, and  
MCR bits 5-7 are set to a logic 0 to be compatible with the industry standard 16550 (default).  
Logic 1 = Enables the enhanced functions. When this bit is set to a logic 1 all enhanced features are  
enabled.  
EFR[5]: Special Character Detect Enable  
Logic 0 = Special Character Detect Disabled (default).  
Logic 1 = Special Character Detect Enabled. The UART compares each incoming receive character with  
data in Xoff-2 register. If a match exists, the received data will be transferred to FIFO and ISR bit-4 will be set  
to indicate detection of the special character. Bit-0 corresponds with the LSB bit for the receive character. If  
flow control is set for comparing Xon1, Xoff1 (EFR [1:0]=’10’) then flow control and special character work  
normally. However, if flow control is set for comparing Xon2, Xoff2 (EFR[1:0]=’01’) then flow control works  
normally, but Xoff2 will not go to the FIFO, and will generate an Xoff interrupt and a special character  
interrupt.  
TABLE 19: SOFTWARE FLOW CONTROL FUNCTIONS  
TX S/W FLOW CONTROL  
RX S/W FLOW CONTROL  
EFR BIT-3  
CONT-3  
EFR BIT-2  
CONT-2  
EFR BIT-1  
CONT-1  
EFR BIT-0  
CONT-0  
SOFTWARE FLOW CONTROL FUNCTIONS  
0
0
1
1
X
X
X
0
0
1
0
1
X
X
X
1
X
X
X
X
0
0
1
1
X
X
X
X
0
1
0
1
No transmit flow control  
Transmit Xon2, Xoff2  
Transmit Xon1, Xoff1  
Transmit Xon1 and Xon2, Xoff1 and Xoff2  
No receive flow control  
Receiver compares Xon2, Xoff2  
Receiver compares Xon1, Xoff1  
Transmit Xon2, Xoff2  
Receiver compares Xon1 or Xon2, Xoff1 or Xoff2  
1
0
1
0
0
1
1
1
1
1
1
1
Transmit Xon1, Xoff1  
Receiver compares Xon1 or Xon2, Xoff1 or Xoff2  
No transmit flow control  
Receiver compares Xon1 and Xon2, Xoff1 and Xoff2  
Transmit Xon1 and Xon2, Xoff1 and Xoff2  
Receiver compares Xon1 and Xon2, Xoff1 and Xoff2  
52  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
EFR[6]: Auto RTS or DTR Flow Control Enable  
RTS#/DTR# output may be used for hardware flow control by setting EFR bit-6 to logic 1. When Auto RTS/  
DTR is selected, an interrupt will be generated when the receive FIFO is filled to the programmed trigger level  
and RTS#/DTR# will de-assert HIGH at the next upper trigger or selected hysteresis level. RTS#/DTR# will  
return LOW when FIFO data falls below the next lower trigger or selected hysteresis level (see FCTR bits 4-7).  
The RTS# or DTR# output must be asserted (LOW) before the auto RTS/DTR can take effect. The selection for  
RTS# or DTR# is through MCR bit-2. RTS/DTR# pin will function as a general purpose output when hardware  
flow control is disabled.  
Logic 0 = Automatic RTS/DTR flow control is disabled (default).  
Logic 1 = Enable Automatic RTS/DTR flow control.  
EFR[7]: Auto CTS Flow Control Enable  
Automatic CTS or DSR Flow Control.  
Logic 0 = Automatic CTS/DSR flow control is disabled (default).  
Logic 1 = Enable Automatic CTS/DSR flow control. Transmission stops when CTS#/DSR# pin de-asserts  
HIGH. Transmission resumes when CTS/DSR# pin returns LOW. The selection for CTS# or DSR# is through  
MCR bit-2.  
5.8.15 TXCNT[7:0]: Transmit FIFO Level Counter - Read-Only  
Transmit FIFO level byte count from 0x00 (zero) to 0x40 (64). This 8-bit register gives an indication of the  
number of characters in the transmit FIFO. The FIFO level Byte count register is read only. The user can take  
advantage of the FIFO level byte counter for faster data loading to the transmit FIFO, which reduces CPU  
bandwidth requirements. Please see the Application Note DAN119 on Exar’s website for a detailed discussion  
of FIFO level counters. Due to the dynamic nature of the FIFO counters, this register should be read until the  
same value is returned twice.  
5.8.16 TXTRG [7:0]: Transmit FIFO Trigger Level - Write-Only  
An 8-bit value written to this register sets the TX FIFO trigger level from 0x00 (zero) to 0x40 (64). The TX FIFO  
trigger level generates an interrupt whenever the data level in the transmit FIFO falls below this preset trigger  
level.  
5.8.17 RXCNT[7:0]: Receive FIFO Level Counter - Read-Only  
Receive FIFO level byte count from 0x00 (zero) to 0x40 (64). It gives an indication of the number of characters  
in the receive FIFO. The FIFO level byte count register is read only. The user can take advantage of the FIFO  
level byte counter for faster data unloading from the receiver FIFO, which reduces CPU bandwidth  
requirements. Please see the Application Note DAN119 on Exar’s website for a detailed discussion of FIFO  
level counters. Due to the dynamic nature of the FIFO counters, this register should be read until the same  
value is returned twice.  
5.8.18 RXTRG[7:0]: Receive FIFO Trigger Level - Write-Only  
An 8-bit value written to this register, sets the RX FIFO trigger level from 0x00 (zero) to 0x40 (64). The RX  
FIFO trigger level generates an interrupt whenever the receive FIFO level rises to this preset trigger level.  
53  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
TABLE 20: UART RESET CONDITIONS  
RESET STATE  
REGISTERS  
DLL  
Bits 7-0 = 0xXX  
Bits 7-0 = 0xXX  
Bits 7-0 = 0xXX  
Bits 7-0 = 0xXX  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x01  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x60  
Bits 3-0 = logic 0  
DLM  
RHR  
THR  
IER  
FCR  
ISR  
LCR  
MCR  
LSR  
MSR  
Bits 7-4 = logic levels of the inputs  
Bits 7-0 = 0xFF  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
Bits 7-0 = 0x00  
RESET STATE  
SPR  
FCTR  
EFR  
TXCNT  
TXTRG  
RXCNT  
RXTRG  
XCHAR  
XON1  
XON2  
XOFF1  
XOFF2  
I/O SIGNALS  
TX[ch-7:0]  
HIGH (if ENIR pin = LOW)  
LOW (if ENIR pin = HIGH)  
RTS#[ch-7:0]  
DTR#[ch-7:0]  
EECK  
HIGH  
HIGH  
LOW  
LOW  
LOW  
EECS  
EEDI  
54  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
6.0 PROGRAMMING EXAMPLES  
6.1 UNLOADING RECEIVE DATA USING THE SPECIAL RECEIVE FIFO DATA WITH STATUS  
It is suggested that before starting to read the Special Receive FIFO Data with Status to unload data from any  
UART channel (address 0x180 for channel 0), do a dummy read to the Device ID (DVID) register in the Config-  
uration Register of the device. The Special Receive FIFO Data with Status register can then be read multiple  
times subsequently without any byte-swapping problem as long as no other register (except the Device ID reg-  
ister) is accessed in between data unload. If you must read or write to another register, make that dummy read  
to the DVID register again and continue with data unloading.  
A step by step procedure describing the sequence for a target channel is shown below. From the receive data  
service routine:  
Do a dummy read to Device ID (DVID) register. Address 0x8D in BYTE alignment or address 0x8C in DWORD  
alignment.  
Read the data byte and its associated error status from ‘Special Receive FIFO Data with Status’ register of the target  
channel until done or empty when one of the LSR status byte bit-0=0.  
NOTE: If you must do other Read/Write operations to other register(s) during data unloading, repeat steps 1 &  
2 to continue unloading data plus status from the ‘Special Receive FIFO Data with Status’ register of the target  
channel.  
Some Examples of using the Special Receive FIFO Data with Status:  
EXAMPLE I: POLLING  
.....................  
Read LSR  
Read DVID  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)*  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)  
....................  
EXAMPLE 2: INTERRUPT SERVICE USING INTERRUPT INFORMATION IN DEVICE CONFIGURATION REGISTER SET  
.....................  
Read Global Interrupt Register INT0 (address 0x080)  
Read INT1 through INT3 registers to identify interrupting channel (address 0x081 through 0x083)  
Read DVID  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)*  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)  
................  
EXAMPLE 3: INTERRUPT SERVICE USING INTERRUPT INFORMATION IN INDIVIDUAL CHANNELS REGISTERS  
................  
Read Global Interrupt Register INT0 (address 0x080)  
Read ISR register of interrupting channel  
Read DVID  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)*  
Read Special Receive FIFO Data with Status (address 0x180 for channel 0, etc)  
................  
* In case some other registers need to be accessed in between ‘Special Receive FIFO Data with Status’ reads,  
a ‘Read DVID’ instruction has to be inserted before resuming ‘Special Receive FIFO Data with Status’ read  
operation.  
55  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
ABSOLUTE MAXIMUM RATINGS  
Power Supply Range  
Voltage at Any Pin  
7 Volts  
-0.5 to 7V  
-40o to +85o C  
Operating Temperature  
-65o to +150o C  
500 mW  
Storage Temperature  
Package Dissipation  
Thermal Resistance (20x20x1.4mm 144-TQFP)  
theta-ja = 42, theta-jc = 8  
ELECTRICAL CHARACTERISTICS  
DC ELECTRICAL CHARACTERISTICS FOR 5V PCI BUS INTERFACE (VIO = 4.75-5.25V, VCC = 4.5-5.5V)  
o
o
o
o
TA=0 to 70 C (-40 to +85 C for industrial grade package).  
SYMBOL  
PARAMETER  
Input Low Voltage  
Input High Voltage  
Input High Voltage  
Input High Voltage  
MIN  
-0.5  
2.0  
2.0  
2.0  
MAX  
0.8  
UNITS  
CONDITION  
NOTES  
VIL  
V
V
V
V
All inputs  
VIH  
VIH  
VIH  
VIO + 0.5  
6.0  
PCI bus inputs  
Non-PCI inputs  
VCC + 0.5  
External Clock  
input  
VOL  
VOH  
IIL  
Output Low Voltage  
Output High Voltage  
0.55  
V
V
Iout=6 mA  
All outputs  
All outputs  
2.4  
Iout=-2 mA  
Input Low Leakage Cur-  
rent  
-10  
10  
uA  
IIH  
Input High Leakage Cur-  
rent  
uA  
ICL  
Input Clock Leakage  
Input Pin Capacitance  
CLK Pin Capacitance  
IDSEL Pin Capacitance  
Power Supply Current  
±10  
10  
12  
8
uA  
pF  
pF  
pF  
mA  
CIN  
CCLK  
CIDSEL  
ICC  
5
5
PCI Bus CLK and Ext.  
Clock = 2MHz,  
all inputs at VCC or  
GND and all outputs  
are unloaded.  
ISLEEP  
Sleep Current  
500  
uA  
All eight UARTs asleep.  
AD[31:0] at GND, all  
inputs at VCC or GND.  
56  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
AC ELECTRICAL CHARACTERISTICS FOR 5V PCI BUS INTERFACE (VIO = 4.75-5.25V, VCC = 4.5 - 5.5V)  
o
o
o
o
TA=0 to 70 C (-40 to +85 C for industrial grade package).  
SYMBOL  
PARAMETER  
UART Crystal Oscillator  
External Clock  
MIN  
MAX  
UNITS  
NOTES  
XTAL1  
24  
MHz  
ECLK  
TECLK  
50  
MHz  
ns  
External Clock Time  
Period  
20  
TECLK = 1/ECLK  
TECH, TECL External Clock High/Low  
Time  
8
ns  
IOH(AC)  
-44  
mA  
Switching Current High  
See PCI Specifica-  
tion Rev. 2.3  
IOL(AC)  
95  
mA  
Switching Current Low  
Low Clamp Current  
See PCI Specifica-  
tion Rev. 2.3  
ICL  
-25+(Vin+1)/0.015  
mA  
V/ns  
V/ns  
ns  
-5 < Vin -1  
0.4V to 2.4V load  
2.4V to 0.4V load  
PCI Bus Clock, CLK  
SlewR  
SlewF  
TCYC  
THI  
1
1
4
4
Output Rise Slew Rate  
Output Fall Slew Rate  
CLK Cycle Time  
30  
11  
11  
1
ns  
CLK High Time  
TLO  
ns  
CLK Low Time  
4
V/ns  
ns  
CLK Slew Rate  
TVAL  
2
11  
CLK to Signal Valid Delay  
Float to Active Delay  
Active to Float Delay  
TON  
2
ns  
TOFF  
TSETUP  
28  
ns  
7
0
ns  
Input Setup Time to CLK -  
bused signals  
THOLD  
ns  
Input Hold Time from CLK  
TPRST  
1
ms  
us  
RST# Active Time After  
Power Stable  
TCRST#  
100  
50  
RST# Active Time After  
CLK Stable  
mV/ns  
RST# Slew Rate  
57  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
DC ELECTRICAL CHARACTERISTICS FOR 3.3V PCI BUS INTERFACE (VIO = 3.0-3.6V, VCC = 4.5 - 5.5V)  
o
o
o
o
TA=0 to 70 C (-40 to +85 C for industrial grade package).  
SYMBOL  
PARAMETER  
MIN  
MAX  
UNITS  
CONDITION  
NOTES  
VIL  
Input Low Voltage  
-0.5  
0.3VIO  
V
PCI bus inputs  
VIL  
VIH  
VIH  
VIH  
Input Low Voltage  
Input High Voltage  
Input High Voltage  
Input High Voltage  
-0.5  
2.0  
2.0  
2.0  
0.8  
V
V
V
Non-PCI bus inputs  
PCI bus inputs  
VIO + 0.5  
6.0  
Non-PCI bus inputs  
VCC + 0.5  
External clock  
(XTAL1) input  
VOL  
VOH  
VOH  
Output Low Voltage  
Output High Voltage  
Output High Voltage  
0.4  
V
V
V
IOL = 6mA  
IOH = -0.5mA  
IOH = -2mA  
All outputs  
0.9VIO  
2.4  
PCI bus outputs  
Non-PCI bus out-  
puts  
IIL  
Input Low Leakage Cur-  
rent  
-10  
10  
µA  
µA  
IIH  
Input High Leakage Cur-  
rent  
ICL  
Input Clock Leakage  
Input Pin Capacitance  
CLK Pin Capacitance  
IDSEL Pin Capacitance  
Power Supply Current  
±10  
10  
12  
8
µA  
pF  
pF  
pF  
mA  
CIN  
CCLK  
CIDSEL  
ICC  
5
PCI Bus CLK and Ext.  
Clock = 2MHz,  
all inputs at VCC or  
GND and all outputs  
are unloaded.  
4
All eight UARTs asleep.  
AD[31:0] at GND, all  
inputs at VCC or GND.  
ISLEEP  
Sleep Current  
1
mA  
58  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
AC ELECTRICAL CHARACTERISTICS FOR 3.3V PCI BUS INTERFACE (VIO = 3.0-3.6V, VCC = 4.5 - 5.5V)  
o
o
o
o
TA=0 to 70 C (-40 to +85 C for industrial grade package).  
SYMBOL  
PARAMETER  
UART Crystal Oscillator  
External Clock  
MIN  
MAX  
24  
UNITS  
MHz  
MHz  
ns  
NOTES  
XTAL1  
On-chip osc.  
ECLK  
TECLK  
50  
External Clock Time Period  
20  
8
TECLK = 1/ECLK  
TECH, TECL External Clock High/Low  
Time  
ns  
IOH(AC)  
Switching Current High  
-12VIO  
16VIO  
mA  
mA  
See PCI Specification  
Rev. 2.3  
IOL(AC)  
Switching Current Low  
See PCI Specification  
Rev. 2.3  
ICH  
High Clamp Current  
Low Clamp Current  
Output Rise Slew Rate  
Output Fall Slew Rate  
CLK Cycle Time  
25+(Vin-VIO-1)/0.015  
mA  
mA  
VIO+4 > Vin VIO+1  
-3 < Vin -1  
ICL  
-25+(Vin+1)/0.015  
SlewR  
SlewF  
TCYC  
1
1
4
4
V/ns  
V/ns  
ns  
0.2VIO - 0.6VIO load  
0.6VIO - 0.2VIO load  
PCI Bus Clock, CLK  
30  
THI  
CLK High Time  
CLK Low Time  
11  
11  
ns  
ns  
TLO  
CLK Slew Rate  
1
2
4
V/ns  
ns  
TVAL  
CLK to Signal Valid Delay  
11  
TON  
Float to Active Delay  
Active to Float Delay  
2
ns  
ns  
ns  
TOFF  
TSETUP  
28  
Input Setup Time to CLK -  
bused signals  
7
THOLD  
TPRST  
Input Hold Time from CLK  
0
1
ns  
RST# Active Time After  
Power Stable  
ms  
TCRST#  
RST# Active Time After CLK  
Stable  
100  
50  
us  
RST# Slew Rate  
mV/ns  
59  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
FIGURE 19. TIMING FOR EXTERNAL CLOCK INPUT AT XTAL1 PIN  
TECLK  
TECL  
TECH  
2V  
External  
Clock  
0.8V  
60  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
FIGURE 20. PCI BUS CONFIGURATION SPACE REGISTERS READ AND WRITE OPERATION  
CLK  
Host  
1
2
3
4
FRAME#  
Host  
ADDRESS  
CFG-RD  
DATA  
AD[31:0]  
Host  
Target  
BYTE ENABLE#  
C/BE[3:0]#  
Host  
IRDY#  
Host  
TRDY#  
Target  
DEVSEL#  
Target  
PCICFG_RD  
CLK  
Host  
4
1
2
3
FRAME#  
Host  
ADDRESS  
CFG-WR  
WRITE DATA  
AD[31:0]  
Host  
Target  
BYTE ENABLE#  
C/BE[3:0]#  
Host  
IRDY#  
Host  
TRDY#  
Target  
DEVSEL#  
Target  
PCICFG_WR  
61  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
FIGURE 21. DEVICE CONFIGURATION AND UART REGISTERS READ OPERATION FOR A BYTE OR DWORD  
CLK  
Host  
1
7
2
3
4
5
6
8
9
10  
11  
FRAME#  
Host  
Data  
BYTE  
Data  
WORD  
AD[31:0]  
Address  
Host  
Target  
Bus  
CMD  
C/BE[3:0]#  
Host  
Byte Enable# = DWORD  
Byte Enable# = BYTE  
IRDY#  
Host  
TRDY#  
Target  
DEVSEL#  
Target  
Data  
Parity  
Data  
Parity  
Address  
Parity  
PAR  
Target  
Host  
Active  
Active  
PERR#  
Target  
STEaRrgRe #  
Active  
t
Note: PERR# and SERR are optional in a bus target application.  
Even Parity is on AD[31:0], C/BE[3:0]#, and PAR  
PCI_RD1  
62  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
FIGURE 22. DEVICE CONFIGURATION REGISTERS, UART REGISTERS AND TRANSMIT DATA BURST WRITE OPERA-  
TION  
CLK  
Host  
1
7
2
3
4
5
6
8
9
10  
11  
FRAME#  
Host  
Data  
Data  
Data  
Data  
AD[31:0]  
Address  
Data DWORD  
DWORD DWORD DWORD DWORD  
Host  
Target  
Bus  
CMD  
C/BE[3:0]#  
Host  
Byte Enable# = DWORD  
IRDY#  
Host  
TRDY#  
Target  
DEVSEL#  
Target  
Data  
Parity  
Data  
Parity  
Data  
Parity  
Data  
Parity  
Data  
Parity  
Address  
Parity  
PAR  
Host  
Target  
Active  
Active  
Active  
Active  
Active  
PERR#  
Target  
SERR#  
Target  
Active  
Note: PERR# and SERR are optional in a bus target application.  
Even Parity is on AD[31:0], C/BE[3:0]#, and PAR  
PCI BWR  
63  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
FIGURE 23. DEVICE CONFIGURATION REGISTERS, UART REGISTERS AND RECEIVE DATA BURST READ OPERATION  
CLK  
Host  
1
8
13  
18  
23  
FRAME#  
Host  
AD[31:0]  
Data  
AD  
Data  
Data  
Data  
Host  
Target  
Bus  
CMD  
C/BE[3:0]#  
Host  
Byte Enable# = DWORD  
IRDY#  
Host  
TRDY#  
Target  
DEVSEL#  
Target  
Data  
Data  
Data  
Data  
PAR  
AD  
Host  
Target  
Active  
Active  
Active  
Active  
PERR#  
Target  
SERR#  
Target  
Active  
Note: PERR# and SERR are optional in a bus target application.  
Even Parity is on AD[31:0], C/BE[3:0]#, and PAR  
PCI_BRD  
64  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
FIGURE 24. 5V PCI BUS CLOCK (DC TO 33MHZ)  
4 nSec  
(max)  
11 nSec  
(min)  
4 nSec  
(max)  
11 nSec  
(min)  
2.4 V  
2.0 V p-t-p  
(minimum)  
CLK  
0.4 V  
Tvalid  
(2-11 nSec)  
Bused  
Signal  
Output  
Delay  
Ton  
(2 nSec  
min)  
Tri-State  
Output  
Toff  
(28 nSec Max)  
Tsetup  
Thold  
(7 nSec min)  
(0 nSec)  
Bused  
Signal  
Input  
Inputs Valid  
pci_clk  
65  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
FIGURE 25. 3.3V PCI BUS CLOCK (DC TO 33MHZ)  
1.44 ns  
(max)  
11 ns  
(min)  
1.44 ns  
(max)  
11 ns  
(min)  
0.6 Vcc  
0.4Vcc p-to-p  
(minimum)  
CLK  
0.2 Vcc  
Tvalid  
(2-11 ns)  
Bused  
Signal  
Output  
Delay  
Ton  
(2 ns min)  
Tri-State  
Output  
Toff  
(28 ns max)  
Tsetup  
(7 ns min)  
Thold  
(0 ns)  
Bused  
Signal  
Input  
Inputs Valid  
pci_clk  
66  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
FIGURE 26. TRANSMIT DATA INTERRUPT AT TRIGGER LEVEL  
START  
BIT  
STOP  
BIT  
DATA BITS (5-8)  
TX Data  
D0 D1 D2 D3 D4 D5 D6 D7  
5 DATA BITS  
PARITY  
BIT  
NEXT  
DATA  
START  
BIT  
6 DATA BITS  
7 DATA BITS  
Clear at  
Above  
TX Interrupt at  
Transmit Trigger Level  
Set at Below  
Trigger Level  
Trigger Level  
BAUD RATE CLOCK of 16X or 8X  
TXNOFIFO-1  
FIGURE 27. RECEIVE DATA READY INTERRUPT AT TRIGGER LEVEL  
START  
BIT  
STOP  
BIT  
DATA BITS (5-8)  
RX Data Input  
D0  
D1  
D2  
D3  
D4  
D5  
D6 D7  
First byte that  
reaches the  
trigger level  
PARITY  
BIT  
RX Data Ready Interrupt at  
Receive Trigger Level  
De-asserted at  
below trigger level  
Asserted at  
above trigger  
level  
RXFIFO1  
67  
XR17D158  
xr  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REV. 1.2.1  
PACKAGE DIMENSIONS  
68  
xr  
XR17D158  
REV. 1.2.1  
UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART  
REVISION HISTORY  
DATE  
REVISION  
DESCRIPTION  
May 2003  
1.0.0  
Final Production Release. Updated AC and DC specifications. Clarified PCI  
Burst Read and Write Transactions.  
July 2003  
June 2004  
1.1.0  
1.2.0  
Added Device Status to Ordering Information.  
Clarified pin descriptions- changed from using logic 1 and logic 0 to HIGH  
(VCC) and LOW (GND) for input and output pin descriptions. Clarified Auto  
RS485 and Sleep Mode description. Added timing diagram for external  
clock input at XTAL1 pin (Figure 19) and TECLK, TECH, and TECL to AC Elec-  
trical Specifications. The Device Revision Register (DREV) has been  
updated to 0x03 for devices with top mark date code "C2 YYWW".  
November 2004  
1.2.1  
The Device Revision Register (DREV) has been updated to 0x09 for devices  
with top mark date code "I2 YYWW".  
NOTICE  
EXAR Corporation reserves the right to make changes to the products contained in this publication in order to  
improve design, performance or reliability. EXAR Corporation assumes no responsibility for the use of any  
circuits described herein, conveys no license under any patent or other right, and makes no representation that  
the circuits are free of patent infringement. Charts and schedules contained here in are only for illustration  
purposes and may vary depending upon a user’s specific application. While the information in this publication  
has been carefully checked; no responsibility, however, is assumed for inaccuracies.  
EXAR Corporation does not recommend the use of any of its products in life support applications where the  
failure or malfunction of the product can reasonably be expected to cause failure of the life support system or  
to significantly affect its safety or effectiveness. Products are not authorized for use in such applications unless  
EXAR Corporation receives, in writing, assurances to its satisfaction that: (a) the risk of injury or damage has  
been minimized; (b) the user assumes all such risks; (c) potential liability of EXAR Corporation is adequately  
protected under the circumstances.  
Copyright 2004 EXAR Corporation  
Datasheet November 2004.  
Send your UART technical inquiry with technical details to hotline: uarttechsupport@exar.com.  
Reproduction, in part or whole, without the prior written consent of EXAR Corporation is prohibited.  
69  
XR17D158  
REV. 1.2.1  
xr  
5V PCI BUS OCTAL UART  
TABLE OF CONTENTS  
GENERAL DESCRIPTION .................................................................................................1  
APPLICATIONS................................................................................................................................................1  
FEATURES .....................................................................................................................................................1  
FIGURE 1. BLOCK DIAGRAM ............................................................................................................................................................. 1  
FIGURE 2. PIN OUT OF THE DEVICE.................................................................................................................................................. 2  
ORDERING INFORMATION.................................................................................................................................2  
PIN DESCRIPTIONS ..........................................................................................................3  
FUNCTIONAL DESCRIPTION ...........................................................................................8  
PCI Local Bus Interface...............................................................................................................................................8  
PCI Local Bus Configuration Space Registers............................................................................................................8  
EEPROM Interface......................................................................................................................................................8  
1.0 APPLICATION EXAMPLES ...................................................................................................................9  
TABLE 1: VALID COMBINATIONS OF VCC AND VIO SUPPLY VOLTAGES .............................................................................................. 9  
FIGURE 3. TYPICAL APPLICATION FOR A UNIVERSAL ADD-IN CARD .................................................................................................... 9  
FIGURE 4. TYPICAL APPLICATIONS IN AN EMBEDDED SYSTEM.......................................................................................................... 10  
2.0 XR17D158 REGISTERS .......................................................................................................................11  
FIGURE 5. THE XR17D158 REGISTER SETS................................................................................................................................... 11  
2.1 PCI LOCAL BUS CONFIGURATION SPACE REGISTERS .......................................................................... 11  
TABLE 2: PCI LOCAL BUS CONFIGURATION SPACE REGISTERS ....................................................................................................... 12  
2.2 DEVICE CONFIGURATION REGISTER SET ................................................................................................. 13  
TABLE 3: XR17D158 DEVICE CONFIGURATION REGISTERS............................................................................................................. 14  
TABLE 4: DEVICE CONFIGURATION REGISTERS SHOWN IN BYTE ALIGNMENT ................................................................................... 16  
TABLE 5: DEVICE CONFIGURATION REGISTERS SHOWN IN DWORD ALIGNMENT............................................................................... 16  
2.2.1 THE INTERRUPT STATUS REGISTER ..................................................................................................................... 17  
FIGURE 6. THE GLOBAL INTERRUPT REGISTER, INT0, INT1, INT2 AND INT3 .................................................................................. 18  
TABLE 6: UART CHANNEL [7:0] INTERRUPT SOURCE ENCODING..................................................................................................... 18  
TABLE 7: UART CHANNEL [7:0] INTERRUPT CLEARING: .................................................................................................................. 18  
2.2.2 GENERAL PURPOSE 16-BIT TIMER/COUNTER [TIMERMSB, TIMELSB, TIMER, TIMECNTL] (DEFAULT 0XXX-XX-  
00-00).............................................................................................................................................................................. 19  
FIGURE 7. TIMER/COUNTER CIRCUIT............................................................................................................................................... 19  
TABLE 8: TIMER CONTROL REGISTERS ...................................................................................................................................... 19  
2.2.3 8XMODE [7:0] (DEFAULT 0X00)................................................................................................................................ 20  
2.2.4 REGA [15:8] RESERVED ........................................................................................................................................... 20  
2.2.5 RESET [23:16] (DEFAULT 0X00)............................................................................................................................... 20  
2.2.6 SLEEP [31:24] (DEFAULT 0X00)............................................................................................................................... 21  
2.2.7 DEVICE IDENTIFICATION AND REVISION............................................................................................................... 21  
2.2.8 REGB REGISTER ....................................................................................................................................................... 22  
2.2.9 MULTI-PURPOSE INPUTS AND OUTPUTS.............................................................................................................. 22  
2.2.10 MPIO REGISTER ...................................................................................................................................................... 22  
FIGURE 8. MULTIPURPOSE INPUT/OUTPUT INTERNAL CIRCUIT........................................................................................................... 23  
3.0 CRYSTAL OSCILLATOR / BUFFER ...................................................................................................25  
FIGURE 9. TYPICAL OSCILLATOR CONNECTIONS............................................................................................................................... 25  
FIGURE 10. EXTERNAL CLOCK CONNECTION FOR EXTENDED DATA RATE ........................................................................................ 25  
4.0 TRANSMIT AND RECEIVE DATA .......................................................................................................26  
4.1 FIFO DATA LOADING AND UNLOADING THROUGH THE DEVICE CONFIGURATION REGISTERS IN 32-BIT  
FORMAT. ........................................................................................................................................................ 26  
4.1.1 NORMAL RX FIFO DATA UNLOADING AT LOCATIONS 0X100, 0X300, 0X500, 0X700....................................... 26  
4.1.2 SPECIAL RX FIFO DATA UNLOADING AT LOCATIONS 0X180, 0X380, 0X580, AND 0X780.............................. 27  
4.1.3 TX FIFO DATA LOADING AT LOCATIONS 0X100, 0X300, 0X500, 0X700, 0X900, 0XB00, 0XD00, 0XF00.......... 27  
4.2 FIFO DATA LOADING AND UNLOADING THROUGH THE UART CHANNEL REGISTERS, THR AND RHR IN  
8-BIT FORMAT. .............................................................................................................................................. 28  
TABLE 9: TRANSMIT AND RECEIVE DATA REGISTER IN BYTE FORMAT, 16C550 COMPATIBLE ............................................................ 28  
5.0 UART ....................................................................................................................................................29  
5.1 PROGRAMMABLE BAUD RATE GENERATOR ........................................................................................... 29  
FIGURE 11. BAUD RATE GENERATOR ............................................................................................................................................. 29  
TABLE 10: TYPICAL DATA RATES WITH A 14.7456 MHZ CRYSTAL OR EXTERNAL CLOCK AT 16X SAMPLING........................................ 30  
5.2 TRANSMITTER ............................................................................................................................................... 30  
5.2.1 TRANSMIT HOLDING REGISTER (THR) - WRITE-ONLY......................................................................................... 30  
5.2.2 TRANSMITTER OPERATION IN NON-FIFO MODE.................................................................................................. 30  
FIGURE 12. TRANSMITTER OPERATION IN NON-FIFO MODE ............................................................................................................ 31  
I
xr  
XR17D158  
5V PCI BUS OCTAL UART  
REV. 1.2.1  
5.2.3 TRANSMITTER OPERATION IN FIFO MODE ........................................................................................................... 31  
5.2.4 AUTO RS485 OPERATION ........................................................................................................................................ 31  
FIGURE 13. TRANSMITTER OPERATION IN FIFO AND FLOW CONTROL MODE ................................................................................... 31  
5.3 RECEIVER ...................................................................................................................................................... 32  
5.3.1 RECEIVE HOLDING REGISTER (RHR).................................................................................................................... 32  
5.3.2 RECEIVER OPERATION IN NON-FIFO MODE ......................................................................................................... 32  
FIGURE 14. RECEIVER OPERATION IN NON-FIFO MODE.................................................................................................................. 32  
5.3.3 RECEIVER OPERATION WITH FIFO......................................................................................................................... 33  
FIGURE 15. RECEIVER OPERATION IN FIFO AND FLOW CONTROL MODE ......................................................................................... 33  
5.4 AUTOMATIC HARDWARE (RTS/CTS OR DTR/DSR) FLOW CONTROL OPERATION .............................. 33  
TABLE 11: AUTO RTS/CTS OR DTR/DSR FLOW CONTROL SELECTION.......................................................................................... 33  
FIGURE 16. AUTO RTS/DTR AND CTS/DSR FLOW CONTROL OPERATION...................................................................................... 34  
5.5 INFRARED MODE .......................................................................................................................................... 35  
FIGURE 17. INFRARED TRANSMIT DATA ENCODING AND RECEIVE DATA DECODING.......................................................................... 35  
5.6 INTERNAL LOOPBACK ................................................................................................................................. 36  
FIGURE 18. INTERNAL LOOP BACK ................................................................................................................................................. 36  
5.7 UART CHANNEL CONFIGURATION REGISTERS AND ADDRESS DECODING ....................................... 37  
TABLE 12: UART CHANNEL CONFIGURATION REGISTERS ................................................................................................... 37  
TABLE 13: UART CHANNEL CONFIGURATION REGISTERS DESCRIPTION. SHADED BITS ARE ENABLED BY EFR BIT-4. ....... 38  
5.8 REGISTERS .................................................................................................................................................... 39  
5.8.1 RECEIVE HOLDING REGISTER (RHR) - READ-ONLY ............................................................................................ 39  
5.8.2 TRANSMIT HOLDING REGISTER (THR) - WRITE-ONLY......................................................................................... 39  
5.8.3 BAUD RATE GENERATOR DIVISORS (DLL AND DLM) - READ/WRITE................................................................ 39  
5.8.4 INTERRUPT ENABLE REGISTER (IER) - READ/WRITE.......................................................................................... 40  
IER versus Receive FIFO Interrupt Mode Operation................................................................................................. 40  
IER versus Receive/Transmit FIFO Polled Mode Operation..................................................................................... 40  
5.8.5 INTERRUPT STATUS REGISTER (ISR) - READ-ONLY............................................................................................ 41  
TABLE 14: INTERRUPT SOURCE AND PRIORITY LEVEL ..................................................................................................................... 42  
5.8.6 FIFO CONTROL REGISTER (FCR) - WRITE-ONLY.................................................................................................. 42  
TABLE 15: TRANSMIT AND RECEIVE FIFO TRIGGER LEVEL SELECTION............................................................................................ 44  
5.8.7 LINE CONTROL REGISTER (LCR) - READ/WRITE.................................................................................................. 45  
TABLE 16: PARITY SELECTION ........................................................................................................................................................ 46  
5.8.8 MODEM CONTROL REGISTER (MCR) - READ/WRITE ........................................................................................... 46  
5.8.9 LINE STATUS REGISTER (LSR) - READ/ONLY....................................................................................................... 47  
5.8.10 MODEM STATUS REGISTER (MSR) - READ-ONLY .............................................................................................. 48  
5.8.11 MODEM STATUS REGISTER (MSR) - WRITE-ONLY............................................................................................. 49  
TABLE 17: AUTO RS485 HALF-DUPLEX DIRECTION CONTROL DELAY FROM TRANSMIT-TO-RECEIVE ................................................. 49  
5.8.12 SCRATCH PAD REGISTER (SPR) - READ/WRITE................................................................................................. 50  
5.8.13 FEATURE CONTROL REGISTER (FCTR) - READ/WRITE.................................................................................... 50  
TABLE 18: 16 SELECTABLE HYSTERESIS LEVELS WHEN TRIGGER TABLE-D IS SELECTED ................................................................ 51  
5.8.14 ENHANCED FEATURE REGISTER (EFR) - READ/WRITE..................................................................................... 51  
TABLE 19: SOFTWARE FLOW CONTROL FUNCTIONS........................................................................................................................ 52  
5.8.15 TXCNT[7:0]: TRANSMIT FIFO LEVEL COUNTER - READ-ONLY ......................................................................... 53  
5.8.16 TXTRG [7:0]: TRANSMIT FIFO TRIGGER LEVEL - WRITE-ONLY ........................................................................ 53  
5.8.17 RXCNT[7:0]: RECEIVE FIFO LEVEL COUNTER - READ-ONLY............................................................................ 53  
5.8.18 RXTRG[7:0]: RECEIVE FIFO TRIGGER LEVEL - WRITE-ONLY............................................................................ 53  
TABLE 20: UART RESET CONDITIONS...................................................................................................................................... 54  
6.0 PROGRAMMING EXAMPLES ............................................................................................................. 55  
6.1 UNLOADING RECEIVE DATA USING THE SPECIAL RECEIVE FIFO DATA WITH STATUS .................. 55  
ABSOLUTE MAXIMUM RATINGS .................................................................................. 56  
ELECTRICAL CHARACTERISTICS................................................................................ 56  
DC ELECTRICAL CHARACTERISTICS FOR 5V PCI BUS INTERFACE (VIO = 4.75-5.25V, VCC = 4.5-5.5V)  
56  
AC ELECTRICAL CHARACTERISTICS FOR 5V PCI BUS INTERFACE (VIO = 4.75-5.25V, VCC = 4.5 - 5.5V)  
57  
DC ELECTRICAL CHARACTERISTICS FOR 3.3V PCI BUS INTERFACE (VIO = 3.0-3.6V, VCC = 4.5 - 5.5V)  
58  
TA=0o to 70oC (-40o to +85oC for industrial grade package)................................................................................... 58  
AC ELECTRICAL CHARACTERISTICS FOR 3.3V PCI BUS INTERFACE (VIO = 3.0-3.6V, VCC = 4.5 - 5.5V)  
59  
TA=0o to 70oC (-40o to +85oC for industrial grade package)................................................................................... 59  
FIGURE 19. TIMING FOR EXTERNAL CLOCK INPUT AT XTAL1 PIN.................................................................................................... 60  
FIGURE 20. PCI BUS CONFIGURATION SPACE REGISTERS READ AND WRITE OPERATION................................................................. 61  
II  
XR17D158  
REV. 1.2.1  
xr  
5V PCI BUS OCTAL UART  
FIGURE 21. DEVICE CONFIGURATION AND UART REGISTERS READ OPERATION FOR A BYTE OR DWORD ...................................... 62  
FIGURE 22. DEVICE CONFIGURATION REGISTERS, UART REGISTERS AND TRANSMIT DATA BURST WRITE OPERATION ..................... 63  
FIGURE 23. DEVICE CONFIGURATION REGISTERS, UART REGISTERS AND RECEIVE DATA BURST READ OPERATION........................ 64  
FIGURE 24. 5V PCI BUS CLOCK (DC TO 33MHZ) .......................................................................................................................... 65  
FIGURE 25. 3.3V PCI BUS CLOCK (DC TO 33MHZ) ....................................................................................................................... 66  
FIGURE 26. TRANSMIT DATA INTERRUPT AT TRIGGER LEVEL ........................................................................................................... 67  
FIGURE 27. RECEIVE DATA READY INTERRUPT AT TRIGGER LEVEL.................................................................................................. 67  
PACKAGE DIMENSIONS.................................................................................................68  
REVISION HISTORY.......................................................................................................................................69  
TABLE OF CONTENTS ............................................................................................................I  
III  

相关型号:

XR17D158CV

UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART
EXAR

XR17D158IV

UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART
EXAR

XR17D158IV-F

UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART
EXAR

XR17D158IVTR-F

Serial I/O Controller, 8 Channel(s), 0.78125MBps, CMOS, PQFP144, 20 X 20 MM, 1.40 MM HEIGHT, ROHS COMPLIANT, TQFP-144
EXAR

XR17D158_05

UNIVERSAL (3.3V AND 5V) PCI BUS OCTAL UART
EXAR

XR17L152

3.3V PCI BUS DUAL UART
EXAR

XR17L152CM

3.3V PCI BUS DUAL UART
EXAR

XR17L152IM

3.3V PCI BUS DUAL UART
EXAR

XR17L154

3.3V PCI BUS QUAD UART
EXAR

XR17L154CV

3.3V PCI BUS QUAD UART
EXAR

XR17L154IV

3.3V PCI BUS QUAD UART
EXAR

XR17V252

66 MHZ PCI BUS DUAL UART WITH POWER MANAGEMENT SUPPORT
EXAR