Information in this document is provided solely to enable use of Intel products. Intel assumes no liability whatsoever, including
infringement of any patent or copyright, for sale and use of Intel products except as provided in Intel’s Terms and Co nditi on s
of Sale for such products.
Intel Corporation makes no warr anty for the use of its products and assumes no responsibility for any errors which may appear
in this document nor does it make a commitment to update the information contained herein.
Intel retains the right to make changes to these specifications at any time, without notice.
Contact your local Intel sales office or your distributor to obtain the latest specifications before placing your product order.
MDS is an ordering code only and is not used as a product name or trademark of Intel Corporation.
Intel Corporation and Intel's FASTPATH are not affiliated with Kinetics, a division of Excelan, Inc. or its FASTPATH trademark
or products.
*Other brands and names are the property of their respective owners.
Additional copies of this document or other Intel literature may be obtained from:
Intel Corporation
Literature Sales
P.O. Box 7641
Mt. Prospect, IL 60056-7641
11-11SIO and SSIO Configuration Register (SIOCFG). ....................................................11-18
11-12Divisor Lat ch Registers (DLL
11-13Transmit Buffer Register (TBR
11-14Receive Buffer Register (RBR
11-15Serial Line Control Register (LCR
11-16Serial Line Status Register (LSR
A-3Pin St ate Abbreviations...............................................................................................A-7
A-4Pin States After Reset and During Idle, Powerdown, and Hold...................................A-8
xviii
CHAPT ER 1
GUIDE TO THIS MANUAL
This manual descri bes the embedded Intel386™ EX micr oprocessor. It is intended for use by
hardware designers fam iliar wi t h the principles of microprocessors and wi th t he Int el3 86 arc hitecture.
1.1MANUAL CONTENTS
This manual contains 17 chapters and 2 appendixes, a glossary, and an index. This chapter, Chap-
ter 1, pr ovides an overview of the manual. This section summarizes the contents of the remaining
chapters and appendixes. The remainder of this chapter describes notational conventions and special terminology used throughout the manual and provides references to related documentation.
Chapter 2 — Architectural Over view — desc ribes the de vice fea ture s and some p otential ap plicatio ns .
Chapter 3 — Core Overview — describes the differences between this device and the Intel386
SX processor core and discusses Intel’s System M anagement Mode (SMM ).
Chapter 4 — System Register Organization — describes the organization of the system registers, the I/O address space, address decoding, an d addressing modes.
Chapter 5 — Device Configuration — explains how to configure the device for various applications.
Chapter 6 — Clock and Power Management Unit — describes the clock generation circuitry,
power manageme nt modes, and system rese t logic.
Chapter 7 — Bus Interface Unit — describes the bus interface logic, bus states, bus cycles, and
instruction pipelining.
Chapter 8 — Interrupt Control Unit — describes the interrupt sources and priority options and
explains how to program the interrupt control unit .
Chapter 9 — Timer/Counter Unit — describes the timer/counters and their available count formats and operating modes.
Chapter 10 — Watchdog Timer Unit — explains how to use the watchdog timer unit as a software watchdog, bus monitor, or general-purpose timer.
1-1
GUIDE TO THIS MANUAL
Chapter 11 — Asynchronous Serial I/O (SIO) Unit — explains how to use the universal asynchronous receiver/transmitters (UA RTs) to transmit and receive serial data.
Chapter 12 — Synchronous Se rial I/O (SSIO ) Unit — explains how to transmit and receive
data synchronously.
Chapter 13 — Input/Output Ports — describes the general-pur pose I/O ports and explains how
to configure each pin to serve either as an I/O pin or as a pin controlled by an internal peripheral.
Chapter 14 — Chip-select Unit — explains how to use the chip-select channels to access various external memory and I/O devices.
Chapter 15 — Refresh Contr ol Unit — describes how the refre sh c ontr ol uni t genera te s peri odic refresh requests and refresh addresses to simplify the interface to dynamic memory devices.
Chapter 16 — DMA Controller — describes how the enhanced direct memory access controller
allows internal and external devices to t ransfer data directly to and from the system and explains
how bus control is arbitrat ed.
Chapter 17 — JTAG Test-logic Unit — describe s the indepen dent test -logic unit and explain s
how to test the device logic and board-level connections.
Appendix A — Signal Descriptions — describes the device pins and signals and lists pin states
after a system reset and during powerdown, idle, and hold.
Appendix B — Compatibi lity with PC/ AT * Arc hite ctur e — describes t he ways in which the
device is compatible with the standard PC/AT architecture and the ways in which it departs from
the standard.
Glossary — define s terms with spec ial me aning used th roughout this manual.
Index — lists key topics with page number references.
1.2N O TAT IONAL CONV E NTI ONS
The following notations are used throughout this manual.
#The pound symbol (#) appended to a signal name indicates that the
signal is active low.
italicsItalics identify variables and introduce new terminology. The context
in which italics are used distinguishes between the two possible
meanings. Variables must be replaced with correct values.
1-2
GUIDE TO THIS MANUAL
InstructionsInstruction mnem onics are shown in uppe r case to av oid confusion.
You may use ei ther upper case or lower case.
NumbersHexadecimal numbers are represented by a string of hexadecimal
digits followed by the character H. A zero prefix is added to numbers
that begin with A through F. (For example, FF is shown as 0FFH .)
Decimal and binary numbers are represented by their customary
notations. (That is, 255 is a decimal number and 1111 1111 is a
binary number. In some cases, the letter B is added for clarity.)
Units of Measur eThe following abbreviations are used to represent units of measure:
µAmicroamps, microam peres
µFmicrofara ds
µsmicroseconds
µWmicrowat t s
Register BitsBit locations are in dexed by 0–7 (or 0–15), where bit 0 is the le ast-
significant bit a nd 7 (or 15) is the most-significa nt bit.
Register Nam esRegister names are shown in upper case. If a register name contains a
lowercase, it alic chara cter, it re presents more than one register. For
example, PnCFG represents three registers: P1CFG, P2CFG, and
P3CFG.
Signal NamesSignal names are shown in upper case. When several signals share a
common name, an individual signal is represented by the signal name
followed by a number, while the group is represented by the signal
name followed by a variable (n). For example, the lower c hip-select
signals are named CS0#, CS1#, CS2#, and so on; they are collectively
called CSn#. A pound symbol (#) appended to a signal name
identifies an active-l ow signal. Port pins are represe nted by the port
abbreviation, a period, and the pin number (e.g., P1.0, P1.1).
1-3
GUIDE TO THIS MANUAL
1.3SPECIAL TERMINOLOGY
The following terms have special meanings in this manual.
Assert and De assertThe terms assert and deassert refer to the act of making a signal
active (enabled) and inactive (disabled), respectively. The active
polarity (high/low) is defined by the signal name . Active-l ow signal s
are designated by a pound symbol (#) suffix; active-high signals have
no suffix. To assert RD# is to drive it low; to assert ALE is to drive it
high; to deassert RD# is to drive it high; to deassert ALE is to drive it
low.
DOS AddressIntegrated peripherals that are compati ble with PC/AT system archi-
tecture can be mapped into DOS (or PC/AT) address es 0H–03FFH.
In this manual, the terms DOS address and PC/AT address are
synonymous.
Expanded AddressAll peripheral registers reside at addresses 0F000H–0F8FFH.
PC/AT-compatible integrated peripherals can also be mapped into
DOS (or PC/AT) address space (0H–03FFH).
PC/AT Addr essIntegrated peripherals tha t are compatible with PC /AT system arc hi-
tecture can be mapped into PC/ AT (or DOS) addresses 0H –03FFH.
In this manual, the terms DOS address and PC/AT address are
synonymous.
Reserved BitsCertain re gist er bit s a re desc ribed as reserved bits. These bits are not
used in this device, but they may be use d in future implement ations.
Follow these guidelines to ensure compa tibil ity with f uture devic es:
•Avoid any software dependence on the state of undefined
register bits.
•Use a rea d-m o dify-write sequence to load registers.
•M ask u ndefined bit s when testing the val ues of defined bits.
•Do not depend on the state of undefined bits when storing
undefined bits to memory or to another register.
•Do not depend on the ability to retain information written to
undefined bits.
Set and ClearThe terms set and clear refer to the value of a bit or the act of giving
it a value. If a bit is set, its value is “1”; setting a bit gives it a “1”
value . If a bit is clear, its val ue is “0”; clearin g a bit gives it a “0”
value.
1-4
GUIDE TO THIS MANUAL
Set and ResetThe terms set and reset refe r to the act of applying a s ignal to a pi n.
Setting a pin gives it a logic high value; resetting a pin gives it a logic
low value.
1.4RELATED DOCUMENTS
The following documents conta in addit ional informa tio n that is useful in designin g systems that
incorporate the Intel386 EX micropr ocessor. To order d ocuments, please c all Intel L iterature Fulfillment (1-800-548-4725 in the U.S. and Canada; +44(0) 793-431155 in Europe).
Intel386™ EX Embedded Microprocessor data sheetOrder Number 272420
Intel386™ SX Microprocessor data sheetOrder Number 240187
Intel386™ SX Microprocessor Programmer’s Ref erence ManualOrder Number 240331
Intel386™ SX Microprocessor Hardware Reference Manual Order Number 240332
Development ToolsOrder Number 272326
Buyer’s Guide for the Intel386™ Embedded Proce ssor Fami lyOrder Number 272520
Buyer’s Guide for the Intel386™ Embedded Proce ssor Fami lyOrder Number 272520
PackagingOrder Number 240800
1-5
GUIDE TO THIS MANUAL
1.5CUSTOMER SERVICE
This section provides telephone numbers and describes various cust omer servi ces.
• Customer Support (U.S. and Canada) 800-628-8686
• Customer Training (U.S. and Canada) 800-234-8806
• Literature Fulfillment
— 800-468-8118 (U.S. and Canada)
— +44(0)793-431155 (Europe)
— 916-356-3600 (worldwide, up to 14.4-Kbaud line)
— 916-356-7209 (worldwide, dedicated 2400-baud line)
— +44(0)793-496340 (Europe)
Intel provides 24-hour automat ed technical support through the use of our FaxBack service and
our centralized Intel Application Bulletin Board System (BBS). The FaxBack service is a simpleto-use information system that lets you order technical documents by phone for immediate delivery to your fax machine. The BBS is a centralized computer bulletin board system that provides
updated application-specific information about Intel products.
Intel also provides the Embedded Applications Journal, a quarterly technical publication with ar-
ticles on microcontroller appli cati ons, errata , support tools, and other useful information. To order the journal, call the FaxBack service and order information packet #1 (the EmbeddedApplications Journal subscripti on form).
1.5.1How to Use Intel's FaxBack Service
Think of the FaxB ac k servi ce as a lib rary of te chni cal doc um ent s that y ou can acce ss wi th your
phone. Just dial the telephone number (see page 1-6) and respond to the system prompts. After
you select a document, the system sends a copy to your fax machine.
Each document is assigned an order number and is listed in a subject catalog. First -time users
should order the appropriate subject catalogs to get a complete listing of document order numbers.
1-6
GUIDE TO THIS MANUAL
The following catal ogs and information packets are available:
1.Microcontroller, Flash, and iPLD catalog
2.Developme nt tool cata log
3.System ca talo g
4.DVI and multime dia catalog
5.BBS catalog
6.Micr oproc essor and peripheral catalo g
7.Quality and reliability catalog
8.Technic al questionnaire
1.5.2How to Use Intel's Application BBS
The Application B ullet in Board Syste m (BBS) provides c ent ralized a cces s to i nformation, s oftware drivers, firmware upgrades, and revised software. Any user with a modem and computer can
access the BBS. Use the following modem settings.
• 14400, N, 8, 1
If your modem does not support 14.4K baud, the system provides aut o configuration support for
1200- through 14.4K-baud modems.
To access the BB S, just dial the telephone number (see page 1-6) and resp ond t o the syst em
prompts. During yo ur first session, t he syste m asks you to register with the system operator b y
entering your name and location. The system operator will then set up your ac cess account within
24 hours. At that time, you can access the files on the BBS. For a l isting of files, call the FaxBack
service and order catalog #6 (the BBS catalog).
If you encounter any diffi culty accessi ng our high-speed m odem, try our dedicated 2400-baud
modem (see pag e 1- 6 ). Use the following modem settings.
• 2400 baud, N, 8, 1
1-7
GUIDE TO THIS MANUAL
1.5.3How to Find the Latest ApBUILDER Files and Hypertext Manuals and Data
Sheets on the BBS
The latest ApBUILDER files and hypertext manuals and data sheets are availabl e first from the
BBS. To access the files:
1.Select [F] from the BBS Main menu.
2.Select [L] from the Intel Apps Files menu.
3.The BBS displa ys the list of all area levels and prom pt s for the area num be r.
4.Select [25] to choose the ApBUILDER / Hypertext area.
5.Area l evel 25 has four sublevels: (1) General, (2) 196 Files, (3) 186 Files, and (4) 8051
Files.
6.Select [ 1] to find the latest ApBUILDER files or the number of the appropriate productfamily sublevel to find the hype rte xt manual s and data sheet s.
7.Enter the file number to tag the files you wish to download. The BBS displays the approximate download time for tagged files.
1-8
CHAPT ER 2
ARCHITECTURAL OVERV IEW
The Intel386™ EX embedded microprocessor (Figure 2-1) is based on the static Intel386 SX pro-
cessor. This highly integrated device retains those personal computer functions that are useful in
embedded applications and integrates peripherals that are typically needed in embedded systems.
The Intel386 EX p rocessor pr ovides a PC -compatible deve lopment platform i n a device that is
optimized for embedded applicat ions. Its integra ted periphera ls an d power management opti on s
make the Intel386 EX processor ide al for portable system s.
The integrated peripherals of the Intel386 EX are compatible with the standard desktop PC. This
allows existing PC software, including most of the industry’s leading desktop and embedded operating systems, to be easi ly imple mented on a n Intel386 EX-bas ed platf orm. The Intel386 E X
processor includes a royalty-free license for the real-time Intel iRMX
Using PC-compatible periphe rals also allows for the de velopment a n d debugging of applicatio n
software on a standard PC platform.
Typical applications usi ng the Intel386 EX processor inc lude automated m anufacturing equip-
ment, cellular telephones, telecommunications equipment, fax machines, hand-held data loggers,
high-precision industrial flow controllers, i nteractive television, medi cal equipment, modems,
and smart copiers.
2.1CORE
®
EMB Operating System.
The Intel386 EX proces sor contains a modular, full y static Intel386 SX CPU and inc orporates
System Management Mode (SMM) for enhanced power management. The Intel386 EX processor
has a 16-bit da ta bus and a 26-bit address bus, supporting up to 64 Mbytes of memory address
space and 64 Kbytes of I/O address space. The CPU performance of the Intel386 EX processor
closely reflects the Intel386 SX CPU performance at the same speeds.
Chapter 3, “Core Overview,” describes differences between this device and the Intel386 SX CPU.
Please refer to the Intel386™ SX Microprocessor Programmer’s Reference Manual (order num-
ber 240331) for applications and system programming information; descriptions of protected, re-
al, and virtual-8086 modes; and details on the instruction set.
2-1
ARCHITECTURAL OVERVIEW
DMA
Controller
and
Bus Arbiter
Unit
Memory Address
CPU
Data
Bus Interface
Memory Data
Address
Data
Unit
Peripheral Address
Address
Peripheral Data
Chip-select
Unit
JTAG-compliant
Test-logic Unit
Clock and Power
Management
Unit
DRAM Refresh
Control Unit
2-2
Watchdog Timer
Unit
Asynchronous Serial I/O
and Synchronous
Serial I/O Units
Interrupt
Control
Unit
Timer/Counter
Unit
Figure 2-1. Intel386™ EX Processor Block Diagram
A2757-02
ARCHITECTURAL OVERVIEW
2.2INTEGRATED PERIPHERALS
The Intel386 EX processor integrates both PC-compatible peripherals (Table 2-1) and peripherals
that are specific to embe d ded applic ati ons (Table 2-2).
Table 2-1. PC-compatibl e Peri p hera ls
NameDescription
Interrupt
Control Uni t
(ICU)
Timer
Counter Uni t
(TCU)
Asynchronous
Serial I/O
(SIO) Unit
Direct Memory
Access
(DMA)
Controller
Consists of two 8259A programmable interr upt contro llers (PIC s) configure d as master
and slave. You may cascade up to four external 8259A PICs to expand the external
interrupt lines to 36. Refer to Chapter 8, “Interrupt Control Unit.”
Provides three independent 16-bit down counters. The programmable TCU is
functionally equivalent to an 82C54 counter/timer with enhancements to allow
remapping of peripheral addresses and interrupt assignments. Refer to Chapter 9,
“Timer/Counter Unit.”
Features two independent universal asynchr onous recei ver and transmit ter s (UARTs)
which are functio nall y equi vale nt to Natio nal Sem icon ductor’s NS16450. Each channel
contains a baud-rate generator, transmitter, receiver, and modem control unit. All four of
the serial channel interrupts may be connected to the ICU or two of the interrupts may
be connected to the DMA controller. Refer to Chapter 11, “Asynchronous Serial I/O
Unit.”
Transfers internal or external data between any combination of memory and I/O devices
for the entire 26-b it addre s s bus. The two ind e pend en t chann el s opera te in 16- or 8-b it
bus mode. Buffer chaining allows data to be transferred into noncontiguous memory
buffers. DMAs can be tied to any o f the serial devices to support high data rates,
minimizing processor interruptions. Provides a special two-cycle mode that uses only
one channel for memory-to -m emo r y transfe r s. Bus arbitra ti on logic resolve s prior ity
conflicts betwee n the DMA chan nels, the refresh contro l unit, and an exte rna l bus
master. SIO and SSIO interr upt s can be connect ed to DMA for high- spee d tran sfer s.
Backward compatible with 8237A. Refer to Chapter 16, “DMA Controller.”
An external clock source provides the input frequency. The clock and power
managem e nt un it ge ne rat es sep arate internal clock signals for core an d peripherals
(half the input frequency), divides the internal clock by two for baud clock inputs to the
SIO and SSIO, and divides the internal clock by a programmable divisor to provide a
prescaled clock signal (various frequencies) for the TCU and SSIO. Power management
provides idle and powerdown modes (idle stops the CPU clock but leaves the peripheral
clocks running; powerdown stops both CPU and peripheral clocks). Refer to Chapter 6,
“Clock and Power Management Unit.”
When enabled, the WDT functions as a general purpose 32-bit timer, a software timer,
or a bus monitor. Refer to Chapter 10, “Watchdog Time r Unit.”
Provides simultaneous, bidire ctio nal serial I/O in excess of 5 Mbps. Consists of a
transmit chan nel, a receive chann e l, and a baud rate genera to r. Built-in protocols are
not included, as these can be emulated using the CPU. The refresh control unit (RCU) is
provided for applications that use DRAMs with a simple EPLD-based DRAM controller
or PSRAMs that do not need a separate controller. SSIO interrupts can be connected to
the DMA unit for high-speed transfers. Refer to Chapter 12, “Synchronous Serial I/O
Unit.”
Three I/O ports facilitate data transfer between the processor and surrounding system
circuitry. The Intel386 EX processor is unique in that several functions are multiplexed
with each other or with parallel I/O ports. This ensures maximum use of available pins
and maintains a small package. Individually programmable for peripheral or I/O function.
Refer to Chapter 13, “Input/Output Ports.”
Programmable, eight-chann el CSU allows direct access to up to eight devices. Each
channel can operate in 16- or 8-bit bus mode and can generate up to 31 wait states. The
CSU can interface with the fastest memory or the slowest peripheral device. The
minimum address block for memory address-configured channels is 2 Kbytes. The size
of these address blocks can be increased by multiples of 2 Kbytes for memory
addresses and by multiples of 2 bytes for I/O addresses. Supports SMM memor y
addressing and provides ready generation and programmable wait states. Refer to
Chapter 14, “Chip-sel ect Unit. ”
Provides a means to generate periodic refresh reque sts and refresh addresses.
Consists of a programmable interval ti mer unit, a c ontrol unit, and an address ge neration
unit. Bus arbitrati on log ic ensure s that refr esh req uest s have the high est prio rit y. Ref er
to Chapter 15, “Refresh Control Unit.”
The test-logic unit simplifies board-level testing. Consists of a test access port and a
boundary-scan register. Fully compliant with Standard 1149.1–1990,
Test Access Port and Boundary-Scan Architecture
1149.1a–1993. Refer to Chapter 17, “JTAG Test-logic Unit.”
and its supplement, Standar d
IEEE Standard
2-4
ARCHITECTURAL OVERVIEW
2.3PC COMPATI BIL ITY
Of primary concern to system designers is the ability for the target system to run readily available
software developed for the personal comput er with out modification. The Intel386 EX processor
provides that capability, assuming all the necessary hardware subsystems are available in the tar-
get system. Some applications may require additional functionality from one or more companion
chips and all require a custom BIOS to supply initialization and driver routines for on-chip devic-
es.
2.3.1I/O Consideration s
The Intel386 EX processor departs from the ISA standard as follows:
• ISA bus signals are not supplied, but t he SX bus is maintained t o allow the ISA bus signals
to be recreated.
• A video controller and keyboard controller a re not provided, but their I/O addresses are
reserved to allow them to be added externally.
• The I/O address space in a PC configuration is limited to 1 Kbyte. The Intel386 EX
processor uses a special address space extension to provide more register space (64 Kbytes)
for the added peripherals. Four addressing modes allow you to select the level of PC
compatibility you want.
• IRQ10, IRQ11, IRQ12, and IRQ15 are not availa ble for external interrupt connec tio ns.
2.3.2PC/AT Compatibility
Setting bits in the p ort 92 configurat ion regist er provide s bac kward com pat ibility for 8 086 soft-
ware by forcing address line A20 to zero, which emulates wraparound across the 1 Mbyte address
boundary. FastCPUReset along wi th user-defined soft ware may be use d to reconstruc t some of
the CPU-only reset modes used in 80286-based PC systems.
2.3.3Enhanced DMA Controller
The enhanced DMA cont roller was selected to mainta in PC compatibility whil e providing in-
creased perform ance. The ISA-standard P C/AT architecture uses two c ascaded 8237A DMA
controllers, provides seven channels, is limited to 16-bit addressing, and requires two DMA chan-
nels for two-cycle memory-to-me mory transfers.
2-5
ARCHITECTURAL OVERVIEW
The enhanced DMA provides tw o channels, uses the same 8-bit registers as the 8237A, and is
programmed through 8-bit registers. It uses 24-bit byt e-count registers to support larger data
blocks, but these re gist ers can be c o nfigu red to look like an 8237A with page registe rs. The en-
hanced DMA supports all of the 8237A’s opera ting modes except one: it d oes not support the
command register bits that control the two-cycle transfers, compressed timing, and
DREQ/DACK signal polarity. Table 2-1 on page 2-3 provides a brief description and Chapter 16,
“DMA Controller” provides details about the enhanced DMA co ntroller.
2.3.4SIO Chann els
The SIO channels are connected to the equivalent of a local bus, not the ISA bus. In addition, the
SIO channels have fixed addresses, rather than the programmable addresses found in PCs. If an-
other device resides at the SIO c hannel ’s fixed a ddre ss, a cust omi zed BIOS c an det ect it, rema p
the SIO channel into the expanded I/O space, and write the new address into the BIOS data table
that describes the I/O map.
2-6
CHAPT ER 3
CORE OVERV IE W
The Intel386™ EX processor core is based upon the Intel386 SX processor. As such, it functions
exactly like the Intel386 SX processor except for the following enhancements and changes in per-
formance:
• It is fully static. The clocks can be stopped at any time without the loss of data.
• Commonly used DOS and non-DOS peripherals have been added.
• The processor identi fic ation stored in the mi crocode is 2309H.
• Intel’s System Manageme nt Mod e (SMM ) has been impl em ente d. SMM :
— provides an inte r rupt in put pin (SMI # ) and a status outp ut pin (SMIAC T#).
— provides an instructio n for exiting SMM (RSM).
— requires a special memory partition (SMRAM).
• Two additional address lines have been added for a total of 26 (64 Mbytes of memory
address space; 64 Kbytes of I/O address space).
• An asynchronous FLT# signal has been added (when applied, the out put and directional
pins are floated)
• Four special addressing modes have been provided for various levels of DOS compatibility.
• An interrupt control unit has been added (i .e., the INTR pin o f the Intel386 SX process or is
not directly available.)
• The following instruct ions require one to four additional clock cycles on the Intel386 EX
processor than on the Intel386 SX processor: IN, INS, REP INS, OUT, OUTS, REP OUTS,
POPA, HLT, MOV CR0,src.
• Maskable interrupts and NMI have two additional clock cycles of interrupt latency.
For the wide ph ysical address spa ce requirement of 32-bit embedded applications, the Intel386
EX processor is given two additional address pi ns (A24, A 25). The 16 Mbyte physical address
space of the Intel386 SX processor is expanded to 64 Mbytes in the Intel386 EX processor.
The Intel386 EX processor has three low power featu res. First is the SMM (system management
mode) function, which controls syst em power consumpt ion b y using a special inte rr upt (SMI #).
Second is idle mode and third is powerdown mode. (See Chapt er 6, “Cloc k and Power Manage -
ment Unit,” for a description of these two modes.) In addition to these modes, the exter nal clock
(CLK2) can be stopped at any time.
3-1
CORE OVERVIEW
Another enhanced feature is internal support of the A20 Mask function, which forces the A20 sig-
nal to a low level in order to maintain compatibility with old wraparound software for DOS or
Intel 286 microprocessors.
3.1SYSTEM MANAGEMENT MODE OVERVIEW
The Intel386 EX processor provides a mechanism for system management with a combination of
hardware and CPU microcode enhancements. An externally generated system management inter-
rupt (SMI#) allows the execution of system-wide routines that are independent and transparent to
the operating system. The system management mode (SMM) architectural extensions to the
Intel386 CPU consists of the following elements:
• an interrupt input pin (SMI#) to invoke SMM.
• an output pin (SMIACT#) to identify execution state
• a new instruction (RSM), executa ble from SMM only
For low power systems, the primary function of SMM is to provide a transparent means for power
management . The SMM implem entation is similar to tha t of the Intel386 SL CPU, but the SM-
RAM relocation isn’t supported.
3.1.1SMM Hardware Interface
The Intel386 EX processor provides two pins for use in SMM systems, SMI# and SMIACT#.
3.1.1.1SMI# (System Management Interrupt Input)
The SMI# input signal is used to invoke syst e m managem ent mo de. SMI# is a fallin g edge t rig-
gered signal that force s the core into SMM at the completion of the current instruction. SMI# is
similar to NMI in the following ways:
• SMI# is not maskable.
• SMI# is recognized on an instruction boundary and at each iteration for repeat string
instructions.
• SMI# does not break LOCK#ed bus cycles.
• SMI# cannot interrupt currently executi ng SMM code. The processor will latch the falling
edge of a pending SMI# signal while the CPU is executing an existing SMI# (this allows
one level of buffering). The nested SMI# is not recognize d until afte r the e xecution of a
resume instruction (RSM).
• SMI# will bring the processor out of idle or powerdown mode.
3-2
CORE OVERVIEW
3.1.1.2SMIACT# (SMM Active Output)
This output i ndic at es tha t t he processor is operatin g i n syst em management mode. It i s ass erte d
when the CPU initiates the SMM sequence and remains active (low) until the processor executes
the RSM instruction to leave SMM. Before SMIACT# is asserted, the CPU waits until the end of
instruction boundary. S MIACT# is used to establish a new memory map for SMM operation. The
processor supports this function b y an extension to the interna l chip-sel ec t unit. In additio n, this
pin can be used by external logic to qualify RESET and SMI#. SMIACT# never transitions during
a pipelined bus cycle.
3.1.2SMI# Interrup t
When the CPU recognizes SMI# on an instruction boundary, it waits for all write cycles to com-
plete (including those pending external ly) and asserts the SMIACT# pin. The processor then
saves its register state to SM R AM space and begi ns to e xecute the SMM handler. T he R SM in-
struction restores the regist ers, deasserts the SMIAC T# pin, and returns to the user program.
Upon entering SMM , the pr oces sor's PE, MP, EM, TS, HS an d PG bits in CR0 are cleared:
CR0 Bit MnemonicDescriptionFunction
0PEProtectio n Ena bl e1 = prot ectio n enab le d
1MPMath Coprocessor Pre sent1 = coprocesso r presen t
2EMEmulate Coprocessor1 = coprocessor opcodes generate a fault
The Intel386 EX processor extends the standard Intel386 microprocessor architecture by adding
a new feature cal led the system m anageme nt interrupt (SM I#). This se ction describes in d etail
how SMI# can be utilized by the system designer.
3-10
CORE OVERVIEW
The execution unit will recognize an SMI# (falling edge) on an instruction boundary (see instruction #3 in Figure 3-1 on page 3-11). After all the CPU bus cycles, including pipelined cycles, have
completed, the state of the CP U is saved to the SMM St ate Dump Area. Aft er executing a RSM
instruction, the C PU will proc eed to the next a pplicati on code instruct ion (see inst ruction # 4 in
Figure 3-1). SMM latency is measured from the falling edge of SMI# to the first ADS# where
SMIACT# is active (seeFigure 3-2).
SMI#
Instr
#1#2
SMI#
SMIACT#
INTR
RESET
InstrInstr
#3
Latency
SMI
RESET must
be blocked
State
Save
Interrupts
Blocked
2nd SMI# is blocked
Figure 3-1. Standard SMI#
SMM
Handler
Instr Instr
#4#5
State
Resume
Interrupts
Blocked
RESET must
be blocked
A2510-01
The SMM handler may optionally enable the NMI interrupt, but NMI is disabled when the SMM
handler is entered. (Note that the CPU wi ll not recogni ze NMI whi le executi ng the SM M State
Save sequence or SMM State Resume sequence.) NMI will always be enabled following the completion of the first interrupt service routine (ISR) or exception handler.
3-11
CORE OVERVIEW
Once SMI# has been initiated, RESET must be blocked until the CPU state has been completely
saved. If RESET occurs during the stat e save process, unpredicta ble re sults will occur. It i s rec ommended that external circuitry use the falling edge of SMI# to block RESET. The SMI# signal
needs to be sampled ina ctive, then active, in order to latch a falling edge. The SMI# must n ot be
asserted during RESET. Figure 3-2 sh ows the minimum SMM durat ion that is available for
switching SMRAM and system memory.
Even if the processor is in SMM, ad dress pipel ine bus cycles c an be performed correc t ly by asserting NA#. Pipeline bus cycles can also be performed immediately before and after SMIACT#
assertion. The n umbers in Figure 3-2 also reflec t a pipeline bus cycle.
CLK2
T1 T2
CLK
SMI#
ADS#
READY#
SMIACT#
Normal State
BD
A
State Save, SMM Handler,
State Restore
C
Normal State
A2512-01
Figure 3-2. SMIACT# Latency
NOTEEven if bus cycles are pipelined, the minimum clock numbers are guaranteed.
3.2.1System Management Interrupt During HALT Cycle
Since SMI# is an asynchr onous signal, it may be generated at any time . A condition of inte rest
arises when an SMI# occurs while the CPU is in a HALT state. To give the system designer maximum flexibilit y, the processor allows an SM I# to optionally exit the HAL T state. Figure 3-3
shows that the CPU will normally re-execute the HALT instruction after RSM; however, by modifying the HALT restart slot in the SMM State Dump area, the SMM handler can redirect the instruction pointer past the HALT instr uction.
3-12
Instr
A2509-01
State
Save
SMI#
SMM
Handler
Instr
State
Resume
Instr Instr
#1#2
#4#5
I/O Instr
Instr
#3
Option
#1#2
HALT
SMI#
Halted State
CORE OVERVIEW
Instr Instr
#3#4
Option
State
Save
SMM
Handler
State
Resume
A2508-01
Figure 3-3. SMI# During HALT
3.2.2System Management Interrupt During I/O Instruction
Like the HALT restart feature, the p rocessor allows rest a rti ng I/O cycle s which have been int errupted by an SMI#. This gives the system designer the option of performing a hardware I/O cycle
restart withou t having to modify either application, operating system, or BIOS software. (See Fig-
ure 3-4.)
If an SMI# occurs during an I/O cycle, it then becomes the responsibility of the SMM handler to
determine the source of the SMI# . If, for example, the source is the powered down I/O device, the
SMM handler would power up the I/O de vice and reinitial ize it. The SMM handl er would then
write 0FFH to the I/O restart slot in the SMM State Dump area and the RSM instruct ion would
then restart the I/O instr uction.
Figure 3-4. SMI# During I/O Instruction
3-13
CORE OVERVIEW
The SMI# input signa l can be asynch ronous and as a result, SMI# must be valid at least three
clock periods before READY# is asserted. SMI# must be sampled valid for at least two clocks,
with the other clock used to internally arbitrate for control. See Figure 3-5 for details. (Note that
this diagram is only for I/O cycles an d memory data rea d cycle s.)
Priority Arbitration
CLK2
SMI#
Sampled
SMI#
tsutsu
RDY#
A2511-01
Figure 3-5. SMI# Timing
3.2.3Interrupt During SMM Handl er
When the CPU enters SMM, both INTR and NMI are disabled. (See Figure 3-6.) The SMM handler may enable INTR by executing the STI instruction. NMI will be enabled after the completion
of the first i nterrupt service routine (softwa re or hardware init iated ISR) or excepti on handler
within the SMM handl er. Software int errupt and exception instructions a re not blocked during
the SMM handler.
The SMM feature was desi gned to be used without any othe r int errupts. It is recomm ended that
INTR and NMI be bloc ked by the syst em du ring SMI#. The pending INTR and NMI, which i s
blocked by SMM, is serviced after completion of RSM instruction execution. Only one INTR and
one NMI can be pending.
The SMM handler may choose to enable interrupts to take advantage of device drivers. Since interrupts were enabled while under control of the SMM handler, the signal SMIACT# will continue to be asserted. If the system desi gner wants to take advant age of existing devic e drivers that
leverage interrupts, the memory controll er must take thi s into accou nt.
3-14
CORE OVERVIEW
SMM
Handler
RSM
RESET must
State
Restore
be blocked
Application
Instr
Instr
A2505-01
SMI#
SMIACT#
INTR
NMI
RESET
Application
Instr
Instr Instr
SMI
Latency
RESET must
be blocked
State
Save
SMM
Handler
Instr Instr Instr Instr Instr
Instr
SMM Handler
NMI is Blocked
Intr
Service
Figure 3-6. Interrupted SMI# Service
3.2.4SMM Handler Terminated by RESET
RESET is allowed to occur (alth ough not recommended duri ng normal operation) so that SMM
software developers can escape out of an SMM handler without having to power the entire system
down. Also, at power up, RESET must not be internally blocked. However, there are “windows”
in time where asserting RESET can cause problems.
One such window is while the CPU is in the process of saving its state to the SMM State Dump
area. Should a RESET occur during this time period, the CPU will unconditional ly jump to the
RESET locatio n wi th n o guarantee of properly sa ving the SM M state a nd no wa y to res tore the
system state. (Even if the state was saved, you can't execute RSM after RESET without going
back into SMM.) Should this occu r, it is no longer possible to ret urn to the applicati on code.
The second window is when the CPU is in the process of restoring its original executi on state.
Should a RESET occur during this time period, it is no longer possible to return to the application
code, unless the progr ammer mov ed the c ontents of the SMM State Dump area to a second secure
area.
At normal design, RESET should be masked by external circuitry from SMI# assertion to the first
instruction of the SMM handler. SeeFigure 3-7.
3-15
CORE OVERVIEW
SMM Handler
Instr Instr Instr Instr InstrInstr Instr Instr
SMM Handler
CPU Request
Instr Instr
Instr
A2506-01
SMI#
SMIACT#
INTR
NMI
RESET
Application
Instr
SMI
Latency
State
Save
RESET must
be blocked
Figure 3-7. SMI# Service Terminated by RESET
3.2.5HALT During SMM Handler
The system de signer may wi sh to place the system int o a HALT c onditio n while in SMM . The
CPU allows this condition to occur; however, unlike a HALT while in normal mode, the CPU
internally blocks INTR a nd NMI from being rec ognized until aft er the RSM i nstruction is executed. If a HALT needs to be breakable in SMM, the SMM handler must enable INTR and NMI
before a HALT instruction execution. NMI will be enabled after the completion of the first interrupt service routine within the SMM handle r.
After the SMM handler has enabled INTR and NMI, the CPU will exit the HALT state and return
to the SMM handler when INTR or NMI occurs. SeeFigure 3-8 for details.
3-16
CORE OVERVIEW
SMI#
Instr
Instr
#1#2
State
Save
SMM
Handler
Enable
INTR & NMI
INTR or NMI
HALT Halted
State
Interrupt
Handler
SMM
Handler
State
Resume
Instr Instr
#3#4
A2507-01
Figure 3-8. HALT During SMM Handler
3.2.6SMI# During SMM Op erati on
If the SMI# request is asserted during SMM operati on, the s econd SM I# can't nest the c ur rently
executing SM M. The second SM I# request i s latched, and he ld pendin g by the CPU. Onl y one
SMI# request can be pending. After RSM execution is completed, the pending SMI# is serviced.
At this time, SMIACT# is deasserted once at completion of RSM, then asserted again for the second SMI#.
If the SMM handler polls the various SM I# source s by o ne of the SMI # triggers, a n d two SMI #
sources are found in the SMI# generation circuit, the SMM handler will service both SMI# sources and will execute a RSM instruction. In this SMM handler, if the SMI# generation circuit asserts
the second SMI# du ring t he fi rst SM I # service ro utine, the sec o n d SMI# will be pen ding. Next,
the SMM han dler will find two SM I# sourc es and servic es them. Afte r the CPU completes the
RSM execution, the pending SMI# (second SMI#) will be generated, but there will be nothing to
service because t he second SMI# has been servi ced in the first SMM. This unnecessa ry SMI#
transaction requires a few h undred clocks. There may be some performance degrada tion if thi s
example occurs frequently. For good performance, it is the respons ibility of the SMI# generation
circuitry to manage multiple SMI# assertions.
3.3The Intel386 EX™ PRO CESS OR I DENT IFI ER REGI S TERS
The processor has two identifier registers: the Component and Revision ID register and the SMM
Revision ID register. The component ID is 23H; the component revision ID is 09H. This register
can be read as 2309H. The SMM revision identifier is 10000H.
3-17
CORE OVERVIEW
3-18
CHAPT ER 4
SYSTEM REGISTER ORGANIZATION
This chapter provides an overview of the system registers incorporated in the Intel386™ EX processor, focusing on register o rganization from an a ddress architecture vie wpoint. The chapte rs
that cover the individual peripheral s desc ribe the regist ers in detail.
This chapter is organized as follows:
• Overview
• I/O address space for PC/AT* system s
• Expanded I/O space
• Organization of peripheral registers
• I/O address decoding techniq ues
• Addressing modes
• Peripheral register addresses
4-1
SYSTEM REGISTER ORGANIZATION
4.1OVERVIEW
The Intel386 EX processor has register reso urces in the following categories:
• Intel386 processor core architecture registers
— general purpose registers
— segment registers
— instruction pointer and flags
— control registers
— system address regist ers ( protected mode)
— debug registers
— test registers
• Intel386 EX processor peripheral registers
— configuration spac e control registers
— interrupt control unit registers
ERRATA (3/28/95)
Sub-bullet for DMA unit registers incorrectly
stated “8257A-compatible” ; now correctly states
“8237A-compatible”.
— timer/c o unter uni t register s
— DMA u n it registers (8237A-compatible and enhanced function registers)
— asynchronous serial I/O (SIO) registers
— clock gene ration selector registers
— power management control registers
— chip-s elec t unit control registers
— refresh control unit registers
— watchdog timer control registers
— synchronous serial I/O control registers
— parallel I/O port control registers
4.1.1Intel386™ Proc essor Core Arch itectu re Regi sters
These registers are a superset of the 8086 and 80286 processor registers. All 16-bit 8086 and
80286 registers are contained within the 32-bit Intel386 processor core registers. A detailed descriptio n of the Intel386 architecture base registers can be found in the Intel386™ SX Micropro-cessor Programmer's Reference Manual.
4-2
SYSTEM REGISTER ORGANIZATION
4.1.2Intel386™ EX Processo r Periphera l Registers
The Intel386 EX processor contains some periphe ral s tha t are comm o n an d compat ibl e wi th the
PC/AT system arc hitec ture and others that are useful for embedde d ap plications. The perip heral
registers control access to these peripherals and enable you to configure on-chip system resources
such as timer/counters, power management, chip selects, and watchdog timer.
All of the peripheral registers reside physically in what is called the expanded I/O address space
(addresses 0F000H–0F8FFH). Peripherals that a re compatible with PC/AT system archit ect ure
can also be m app ed into DOS I/O address space (addresses 0H– 03FFH). The following rules apply for accessing peripheral registers after a system rese t:
• registers within the DOS I/O address space are accessible
• registers withi n the expa nded I/O address space are acce ssi ble only after the e xpanded I/O
address space is enabled
4.2I/O ADDRES S SPACE FOR PC/AT SYSTEM S
The Intel386 EX processor’s I/O address space is 64 Kbytes. On PC/AT platforms, DOS operat-
ing system and applications ass um e that only 1 Kbyte of the total 64-Kbyte I/O address space is
used. The first 256 bytes (addresses 00000H–00FFH) are reser ved for I/ O platform (motherboard) resources such as the interrupt and DMA controllers, and the remaining 768 bytes (addresses 0100H–03FFH) are available for “general” I/O peripheral card resources. Since only 1
Kbyte of the address space is supported, a dd-on I/O pe ripheral cards typic ally decode only the
lower 10 address lines. Because the upper address lines are not decoded, the 256 platform address
locations and the 768 bus address locations are repeated 64 times (on 1-Kbyte boundaries), covering the entire 64-Kbyte address space. (See Figure 4-1.)
Generally, add-on I/O peripheral cards do not use the I/O addresses reserved for the platform resources. Software running on the platform can use any of the 64 repetitions of the 25 6 address
locations reserved for accessing platform resources.
4-3
SYSTEM REGISTER ORGANIZATION
General Slot I/O
Platform I/O (Reserved)
General Slot I/O
Platform I/O (Reserved)
General Slot I/O
Platform I/O (Reserved)
FFFFH (64K)
FD00H
FC00H (63K)
0C00H (3K)
0900H
0800H (2K)
0500H
0400H (1K)
4-4
General Slot I/O
0100H (256)
Platform I/O (Reserved)
0000H (0)
A2498-01
Figure 4-1. PC/AT I/O Address Space
SYSTEM REGISTER ORGANIZATION
4.3EXPANDED I/O ADDRESS SPACE
The Intel386 EX processor’s I/O address scheme is similar to that of EISA(32) systems. It assigns
63 of the 64 repetitions o f the first 256 a ddre ss l ocations o f eve r y 1K block to spe cific slot s. (In
a PC, a sl ot is a socke t used for add-in boa rds. In embedded proce ssors, a slot c an be view ed a s
simply a part of the total I/O address space.) The partitioning is such that 4 groups of 256 address
locations are assigned to e ach slot, for a total of 1024 specific address locations per slot. (See Fig-
ure 4-2 .) Since add-in I/O cards decode only the lower 10 address lines, they respond to th e “gen-
eral” 768 bytes (repeated 64 times). Thus, each slot has 1K addresses (in four 256-byte seg ments)
that can potentially contain extended peripheral registers.
4-5
SYSTEM REGISTER ORGANIZATION
General Slot I/O
Slot 15
General Slot I/O
Slot 15
General Slot I/O
Slot 15
General Slot I/O
Slot 15
General Slot I/O
Slot 1
General Slot I/O
Slot 1
General Slot I/O
Slot 1
General Slot I/O
Slot 1
General Slot I/O
Slot 0
General Slot I/O
Slot 0
General Slot I/O
Slot 0
General Slot I/O
Slot 0
FFFFH (64K)
FC00H (63K)
F800H (62K)
F400H (61K)
F000H (60K)
1FFFH (8K)
1C00H (7K)
1800H (6K)
1400H (5K)
1000H (4K)
0C00H (3K)
0800H (2K)
0400H (1K)
0000H (0K)
A2499-01
4-6
Figure 4-2. Expanded I/O Address Space
SYSTEM REGISTER ORGANIZATION
Slot 0 refers to the platform. (Agai n, many of the peripheral s found on a standard PC platform
(motherboard) are integrated in the Intel386 EX processor). Thus, a total of 1K unique I/O addresses are assigned to the platform (in addition to the 768 bytes that are repeated). The first 256
address locations are the same platform resources as defined across all platforms. The remaining
three groups of 256 address loca tions can be used for a specific platform such as EISA.
The Intel386 EX processor uses slot 15 for the registers needed for integrated peripherals. Using
this slot avoids conflicts wit h other devices in an EISA syst em, since EISA systems do not typically use slot 15. The Intel386 EX processor does not currently use slot 14, but it is reserved for
future expansion.
4.4O RGANI ZAT IO N OF PERIP HERAL RE GI STE RS
The registers associated with the integrated peripherals are physically located in slot 15 I/O space.
There are sixte en 4K address slots in I/O space. Slot 0 refers to 0H–0FFFH; slot 15 refers t o
0F000H–0FFFFH. Table 4-1 shows the address m ap f or the perip heral registers in sl ot 15. Note
that the I/O addresses fall in address ranges 0F000H–0F0FFH, 0F400H–0F4FFH, and 0F800H–
0F8FFH; utilizing the unique sets of 256 I/O addresses i n Slot 15.
Table 4-1. Peripheral Register I/O Address Map in Slot 15
Register Descrip tionI/O Ad dre ss Range
DMA Controller 1F000H–F01FH
Master Interrupt ControllerF020H–F03FH
Programmable Interval TimerF040H–F05FH
DMA Page RegistersF080H–F09FH
Slave Interrupt ControllerF0A0H–F0BFH
Math CoprocessorF0F0H–F0FFH
Chip Select UnitF400H–F47FH
Synchronous Serial I/O UnitF480H–F49FH
DRAM Refresh Control UnitF4A0H–F4BFH
Watchdog Timer UnitF4C0H–F4CFH
Asynchronous Serial I/O Channel 0 (COM1)F4F8H–F4FFH
Clock Generation and Power Management UnitF800H–F80FH
External/Internal Bus Interface UnitF810H–F81FH
Chip Configuration RegistersF820H–F83FH
Parallel I/O PortsF860H–F87FH
Asynchronous Serial I/O Channel 1 (COM2)F8F8H–F8FFH
4-7
SYSTEM REGISTER ORGANIZATION
4.5I/O ADDRESS DECODING TECHNIQUES
One of the key features of the Intel386 EX processor is that it can be configured to be compatible
with the standard PC/AT architecture. In a PC/AT system, the platform I/O resources are located
in the slot 0 I/O address space. For the Intel386 EX processor, this means that PC/AT-compatible
internal peripherals should be reflected in the slot 0 I/O space for DOS operating system an d application software to access and manipulate them properly.
This discussion leads to the concepts of DOS I/O space and expanded I/O space. DOS I/O space
refers to the lower 1K of I/O addresses, where only PC/AT-compatible peripherals can be
mapped. Expanded I/O space refers to the top 4K of I/O addresses, where all peripheral registers
are physically locat ed. T he remai nder of this se cti on explai ns h ow special I/O a d dress decoding
schemes mani pulat e registe r addre sses withi n these tw o I/O spaces.
4.5.1Address Configura tion Register
I/O address locations 22H and 23H in DOS I/O space offer a special case. These address locations
are not used to access any peripheral registers in a PC/AT system. The Intel386 SL microprocessor and other integrated PC solutions use them to enable extra address space required for configuration registers specific to these products. On the Intel386 EX processor, these address locations
are used to hide the peri p heral regi sters i n the expanded I/O space. The ex panded I/O s pace can
be enabled (registers visible) or disabled (registers hidden).
The 16-bit regi ster at I/O loca tion 22H can als o be used to cont rol mapping of various internal
peripherals in I/O address space. This register, REM APC FG, is defined in Figure 4-3.
The remap bits of this register control whethe r the internal periphe rals are mapped into the DOS
I/O space. Setting a bit makes the periphe ral accessi ble only in expande d I/O space. C learing a
bit makes the peripheral accessible in both DOS I/O space and expanded I/O space. To access the
REMAPCFG register, you must first enable the expanded I/O address space. At reset, this register
is cleared, which maps internal PC/AT-com pat ibl e periphera ls into DOS I/O space.
4-8
SYSTEM REGISTER ORGANIZATION
Address Configuration Register
REMAPCFG
158
ESE——— ————
70
—
Bit
Number
15ESEEnables expanded I/O space.
14–7—Reserved.
6S1RRemaps serial channel 1 (COM2) address.
5S0RRemaps serial channel 0 (COM1) address.
4ISRRemaps slave 8259A interrupt controller address.
3IMRRemaps master 8259A interrupt controller address.
2DRRemaps DMA address.
1—Reserved.
0TRRemaps timer control unit address.
4.5.2Enabling and Disabl in g the Expan ded I/O Spa ce
The Intel386 EX p rocesso r’s expanded I/O space is enable d by a specific write sequence to I/O
addresses 22H and 23H (Figure 4-4). Once the expanded I/O space is enabled, internal peripherals (timers, DM A, inte rrupt controlle rs and seria l communi cation channe ls) can be mapped out
of DOS I/O space (using the REMAPCFG re giste r) and registe rs associated wit h other int ernal
peripherals (such as the chip-select unit, power management unit, watchdog timer) can be accessed.
4.5.2.1Programming REMAPCFG Example
The expanded I/O space enabl e (ESE) bit in the RE MAPC FG register c an be s et only by three
sequential write operations to I/O addresses 22H and 23H as described in Figure 4- 4. Once ESE
is set, REMAPCFG_LO and all the on-chip registers in the expanded I/O address range F000H–
F8FFH can be accessed. The remap bits in REMAPCFG_LO are still in effect even when the ESE
bit is cleared by writing 0 to the ESE bit.
4-9
SYSTEM REGISTER ORGANIZATION
ERRATA (3/28/95)
Figure 4-4, Programming the ESE Bit, has been substantially rewritten.
;;disable interrupts
CLI
; Enable expanded I/O space of Intel386(tm) EX processor
; for peripheral initialization.
MOV AX, 08000H; Enable expanded I/O space
OUT 23H, AL; and unlock the re-map bits
XCHG AL, AH
OUT 22H, AL
OUT 22H, AX
;; at this point PC/AT peripherals can be mapped out or in
;; other peripherals can be accessed and manipulated
;; For example,
;; Map out the on-chip DMA channels from the DOS I/O space (slot 0)
MOV AL, 04H
OUT 22H, AL
; Disables expanded I/O space
MOV AL, 00H
OUT 23H, AL
;; Re-enable Interrupts
STI
ERRATA (6/1/95)
Previous errata incorrectly showed
OUT 23H, AX
Now correctly shows
OUT 22H, AX
Figure 4-4. Setting the ESE Bit
The REMAPCFG register is write-protected until the expanded I/O space is enabled. When the
enabling writ e sequence is executed, it sets the ESE bit. A program can check this bit to see
whether it has access to the expanded I/O spa ce registers . Clearing the ESE bit disables the expanded I/O space. This again locks the REMAPC FG register and makes it read-only.
4.6ADDRESSING MODES
Combinations of the value of the ESE bit and the individual remap bit s in the REMAPC FG register yield four different peripheral addressing modes as far as I/O address decoding is concerned.
4.6.1DOS-compatible Mode
DOS-compatible mode is achie ved by clearing ESE and all the periphe ral remap bits. In this
mode, all PC/AT-compatible peripherals are mapped into the DOS I/O space. Only address lines
A9–A0 are decoded for internal peripherals. Acce sse s to PC/AT-compat ibl e periphera ls are valid, while all other internal peripherals are inacce ssi ble (see Figure 4-5).
This mode is useful for accessing the internal timer, interrupt controller, serial I/O ports, or DMA
controller in a DOS-compatible environment.
4-10
SYSTEM REGISTER ORGANIZATION
REMAPCFG
Register
3FFH
23H
22H
On-chip UART-0
On-chip UART-1
F8FFH
On-chip 8259A-2
On-chip Timer
0
00000000
0
F000H
On-chip 8259A-1
Expanded
I/O
Space
Note: Shaded area indicates that
expanded I/O space
peripherals are not
accessible
0H
On-chip DMA
DOS I/O Space
A2495-01
Figure 4-5. DOS-Compatible Mode
4-11
SYSTEM REGISTER ORGANIZATION
4.6.2Nonintrusive DOS Mo de
This mode is achieved by clearing ESE and setting the individual peripherals’ remap bits. Peripherals whose remap bits are set will be mapped out of DOS I/O space. Like DOS-compatible mode,
only address lines A9–A0 are decoded internally. This mode is useful for connecting an external
peripheral instead of using the integrated peripheral. For example, a system might use an external
8237A DMA rather than using the internal DMA unit . For this configuration, clear the ESE bit
and set the remap bit associated with the DMA unit. In this case, the external 8237A is accessible
in the DOS I/O space, while the internal DMA can be accessed only after the expanded I/O space
is enabled. (See Figure 4-6.)
4.6.3Enhanced DOS Mode
This mode is achieve d by setting the ESE bit an d clearing all PC/AT-compatible peri pherals’
remap bits. Address lines A15–A0 are de coded int ernal ly. The expanded I/O space is enabled and
the PC/AT-com patible interna l periphe rals are a ccessi ble in either DOS I/O s pace or e xpan ded
I/O space. (See Figure 4-7.) If an application frequentl y requires the addit ional peripheral s, but
at the same time wants to ma intain DOS c ompat ibility for ease of devel opme nt, this is the most
useful mode.
4.6.4NonDOS Mode
This mode is achieved by setting the ESE bit and setting all peripherals’ remap bits. Address lines
A15–A0 are decoded intern ally. The expanded I/O space is enabled and all peripherals can be accessed only in expanded I/O space. This mode is useful for systems that don’t require DOS compatibility and have other cus tom peri pheral s in slot 0 I/O space.
For all DOS peripherals, the lower 10 bits in the DOS I/O space and in the expanded I/O space
are identical (except the UARTs, whose lower 8 bits are identical). This makes correlation of their
respective of fsets in DOS and e x panded I/ O space s easi er. Also, the UAR Ts have fixe d I/O a ddresses. This differs from standard PC/AT configurations, in which these address ranges are programmable.
4-12
SYSTEM REGISTER ORGANIZATION
REMAPCFG
Register
3FFH
23H
22H
On-chip UART-0
On-chip UART-1
F8FFH
On-chip 8259A-2
On-chip Timer
0
00000010
0
F000H
On-chip 8259A-1
Expanded
I/O
Space
Note: Shaded area indicates
that the on-chip DMA and
expanded I/O space
peripherals are not
accessible
0H
Internal DMA
DOS I/O Space
Figure 4-6. Example of Nonintrusive DOS-Compatible Mode
A2496-01
4-13
SYSTEM REGISTER ORGANIZATION
REMAPCFG
Register
3FFH
23H
22H
On-chip UART-2
On-chip UART-1
F8FFH
On-chip 8259A-2
On-chip Timer
1
00000000
0
F000H
On-chip 8259A-1
Other Peripherals
UART-0
UART-1
Timer
8259A-2
8259A-1
On-chip DMA
4-14
0H
On-chip DMA
DOS I/O Space
A2501-01
Figure 4-7. Enhanced DOS Mode
3FFH
SYSTEM REGISTER ORGANIZATION
F8FFH
Other Peripherals
UART-0
UART-1
Timer
REMAPCFG
Register
23H
1
22H
01111011
0H
0
DOS I/O Space
Figure 4-8. NonDOS Mode
F000H
8259A-2
8259A-1
On-chip DMA
A2502-01
4-15
SYSTEM REGISTER ORGANIZATION
4.7PERIPHERAL REGISTER ADDRESSES
Table 4-2 lists the address es and na mes of a ll the user-ac cessi ble periphera l regist e rs. Although
the Intel386 core has byte, word, and doubleword access to I/O addresses, some registers can only
be accessed as bytes. The registers with the High Byte column shaded are byte-addressable only.
The default (reset) value of each register is shown in the Reset Value column. An X in this column
signifies that the register bits are undefined. Some address values do not access registers, but are
decoded to provide a logic control signal. These addresses are listed as Not a register in the Reset
column.
Table 4-2. Peripheral Register Addresses (Sheet 1 of 6)
Expanded
Address
F000H0000H
F001H0001H
F002H0002H
F003H0003H
F004H0004HReserved
F005H0005HReserved
F006H0006HReserved
F007H0007HReserved
F008H0008HDMACMD1/DMASTS 00H
F009H0009H
F00AH000AH
F00BH000BH
F00CH000CH
F00DH000DH
F00EH00 0EH
F00FH000FH
F010H
F011H
F012H
F013H
F014HReserved
F015HReserved
F016HReserved
NOTE: Registe rs wi th the “High Byte” column sh aded (darke r shade ) are byte-a ddre ss-
able only. LIghter shade indicates reserved areas.
F4C0HWDTRLDH_HIWDTRLDH_LO0000H
F4C2HWDTRLDL_HIWDTRLDL_LOFFFFH
F4C4HWDTCNTH_HIWDTCNTH_LO0000H
F4C6HWDTCNTL_HIWDTCNTL_LOFFFFH
NOTE: Registe rs wi th the “High Byte” column sh aded (darke r shade ) are byte-a ddre ss-
able only. LIghter shade indicates reserved areas.
PC/AT
Address
High ByteLow ByteReset Value
Synchro nou s Serial I/O Unit
SSIOBAUD00H
SSIOCON1C0H
SSIOCON200H
SSIOCTR00 H
Refresh Control Unit
Watchdog Timer Unit
4-19
SYSTEM REGISTER ORGANIZATION
Table 4-2. Peripheral Register Addresses (Sheet 5 of 6)
Device configuration is the process of setting up the microprocessor’s on-chip peripherals1 for a
particular system design. Specifically, device configuration consists of programming registers to
connect peripheral signal s t o t he pa ckage pins and interconnect t he peri p heral s. The peripherals
include the following:
• DMA controller (DMA)
• interrupt control unit (ICU)
• timer/counter unit (TCU)
• asynchronous serial I/O units (SIO0, SIO1)
• synchronous serial I/O unit (SSIO)
• refresh control unit (RCU)
• chip-select unit (CSU)
In addition, the pin c o n figuration registers control connectio ns f rom t he c oprocessor to the core
and pin connections to the bus arbiter.
A variety of configuration options provide flex ib il ity in conf iguring the Intel386 EX microprocessor. This chapter describes the available configurations and the configuration registers that are
programmed to define a configuration. It prese nts a method of configuring the chip for a set of
specifications, and shows an example of configuring the device for a PC/AT* -compatible design.
It also provides workshee ts to facilitate the configuration for your design.
5.1INTRO DUCTI ON
Figure 5-1 shows Peripheral A and its connectio ns to other periphe ral s an d the package pins.
The “Internal Connectio n Logic” provides three kin ds of connect ions:
• connections between peripherals
• connections to package pins via multiplexers
• direct connections to package pins without multiplexers
The internal connection logic is controlled by the Peripheral A configuration regist er.
1
In this chapter, the terms “peripheral” and “on-chip peripheral” are used interchangeably. An “off-chip peripheral” is
external to the Intel386 EX microprocessor.
5-1
DEVICE CONFIGURATION
Each of the pin multiplexers (“Pin Muxes” ) conne cts one of two inter nal signals to a pin. One is
a Peripheral A signal. The second signal can be an I/O port signal or a signal from/to another peripheral. The pin multiplexers are controlled by the pin configuration registers. Some input-only
pins without multiplexers (“Sha red Pins w/o M uxes”) are routed to two different peripherals.
Your design should use only one of the inputs.
Together, the pe ripheral co nfigurat ion regist ers and the pin c o nfiguration regi sters allow you to
select the perip herals to be used, t o intercon nect them as your de sign requires, a nd to bring selected signals to the packa ge pins.
Peripherals B, C, D, ...
Pins
Microprocessor
Peripheral A
Peripheral A
Configuration
Register
Internal
Connection
Logic
Control
Pin
Muxes
Control
with
Muxes
Shared Pins
w/o Muxes
Pin Configuration Registers
A2535-01
Figure 5-1. Peripheral and Pin Connections
5.2PERIPHERAL CONFIGURATION
This section describe s the configuration of eac h on-chip peripheral. The pe ripheral block diagrams in this section a re s im plified to focus o n the signa ls rel evant t o devi ce configurat i on. Fo r
more detailed information on the peripheral itself, see the chapter de sc ribing that periphera l.
5-2
DEVICE CONFIGURATION
The symbology used for signal s that share a device pin is shown in Figure 5-2 on page 5-5. Of
the two signal names by a pin, the upper signal is associated with the peripheral in the figure. The
lower signal in parent heses is the alternate signal, which connects to a different peripheral or the
core. If a pin has a multiplexer, it is shown as a switch, and the register bit that controls it is noted
above the switch.
Figure 5-21 on page 5-30 summarizes the bit selections in the pin configuration registers, and Fig-
ure 5- 2 2 on page 5- 31 summarizes the bit selections in the peripheral configuration registers. The
use of these tables is discus sed in “Configuration Exa mple” on page 5-25.
5.2.1DMA Controller, Bus Arbiter, and Refresh Unit Configuration
Figure 5-2 shows the DMA controller, bus arbiter, and refresh unit together with information for
their configuration. Request s for a DMA data transfer are s hown as inputs to the multiplexer:
• a serial I/O transmitter (TXD0, TXD1) or receiver (RXD0, RXD1)
• a synchronous serial I/O transmitter (SSIOTX) or receiver (SSIORX)
• a timer (OUT1, OUT2)
• an external source (DRQ0, DRQ1).
The inputs are selected by the DMA configuration register (see Figure 5-3).
5.2.1.1Using The DMA Unit with External Devices
For each DMA chan nel, three bits in the DM A configurat ion regist er (Figure 5-3) select th e external request input or one of four request inputs from the peripherals. Another bit enables or disables that channel’s DMA acknowledge signal (DACKn#) at the device pin. Enable the DACKn#
signal only if you are using the external request signal (DRQn). The acknowledge signals are not
routed to the on-chip peripherals, and therefore, these peripherals cannot initiate single-cycle (flyby) DMA transfers.
An external bus master cannot ta lk direc tly to int ernal peri pheral modules be cause the ext ernal
address lines are outputs only. However, an external device could use a DMA channel to transfer
data to or from an internal peripheral because the DMA generates the addresses. This transaction
would be a two-cycle DMA bus transaction.
5-3
DEVICE CONFIGURATION
5.2.1.2DMA Service to an SIO or SSIO Peripheral
A DMA unit is useful for ser vicing an SIO or SSIO peri pheral operatin g at a high baud rate . At
high baud rates, the interrupt response time of the core may be too long to allow the seri al channels to use an interrupt to service the receive-bu ffer -full condition. By the time the interrupt service routine is ready to transfer the receive-buffer data to mem ory, new data would have been
loaded into the buffer. By using an appropriately configured DMA channel , data transfers to and
from the seri al c han nels c an oc cur wi thin a few bus c ycles of the t im e that a se rial unit i s re a dy
to move data. SIO and SSIO inputs to the DM A are se lected by the DM A configurat ion regi ster
(Figure 5-3).
5.2.1.3Using The Timer To Initiate DMA Transfers
A timer output (OUT1, OUT2) can be used to initiate periodic data transfers by the DMA. A
DMA channel is programmed for the transfer, and then a timer output pulse triggers the transfer.
The most useful DM A and timer combinatio ns for this type of transfer are the peri odic timer
modes (mode 2 and mo de 3) with the DMA block-transfer m ode programmed. See Cha pter 9,
“Timer/Counter Unit,” and Chapter 16, “DMA Controller,” for programming the peripherals.
5.2.1.4Limitations Due To Pin Signal Multiplexing
Pin signal multiplexing can preclude the simultaneous use of a DMA channel and another peripheral or specific peripheral signa l (see Figure 5-2). For example , using DMA channel 1 with an
external requestor device precludes using SIO channel 1 due to the multiplexed signal pairs
DRQ/RXD1 and DACK1#/T XD1.
5-4
DMA
DREQ0
DMACFG.2:0
3
DMACFG.3
RXD0
TXD1
SSTBE (SSIO)
OUT1 (TCU)
DEVICE CONFIGURATION
DRQ0
To SIO1
(DCD1#)*
DMAACK0#
DMACFG.6:4
3
DREQ1
DMACFG.7
DMAACK1#
DMAINT
End of Process
HOLD
Bus Arbiter
HLDA
Refresh Unit
REFRESH#
*Alternate pin signals are in parentheses.
RXD1
TXD0
SSRBF (SSIO)
OUT2 (TCU)
To/From I/O Port 1
To/From I/O Port 1
From CSU
From SIO1
From SIO1
From CSU
PINCFG.4
To SIO1
PINCFG.2
PINCFG.3
P1CFG.6
P1CFG.7
PINCFG.6
DACK0#
(CS5#)
DRQ1
(RXD1)
DACK1#
(TXD1)
EOP#
(CTS1#)
HOLD
(P1.6)
HLDA
(P1.7)
REFRESH#
(CS6#)
A2516-01
Figure 5-2. Configuration of DMA, Bus Arbiter, and Refresh Unit
5-5
DEVICE CONFIGURATION
DMA Configuration
DMACFG
(read/write)
70
D1MSKD1REQ2D1REQ1D1REQ0D0MSKD0REQ2D0REQ1D0REQ0
Bit
Number
7D1MSKDMA Acknowledge 1 Mask:
6–4D1REQ2 :0DM A Cha nnel 1 Request Conn ecti on:
3D0MSKDMA Acknowledge 0 Mask:
2–0D0REQ2 :0DM A Cha nnel 0 Request Conn ecti on:
Bit
Mnemonic
Setting this bit masks DMA channel 1’s ac knowled ge (DACK1#) signal.
Useful when channel 1’s request (DRQ1) input is connected to an
internal peripheral.
Connects one of the five possible hardware sources to channel 1’s
request input (DREQ1).
000 = DRQ1 pin (external peripheral)
001 = SIO channel 1’s receive buffer full signal (RBF)
010 = SIO channel 0’s transmit buffer empty signal (TBE)
011 = SSIO receive holding buffer full signal (RHBF)
100 = TCU counter 2’s output signal (OUT2)
101 = reserved
110 = reserved
111 = reserved
Setting this bit masks DMA channel 0’s ac knowled ge (DACK0#) signal.
Useful when channel 0’s request (DRQ0) input is connected to an
internal peripheral.
Connects one of the five possible hardware sources to channel 0’s
request input (DREQ0).
The interrupt control unit (ICU) comprises two 8259A interrupt controllers connected in cascade,
as shown in Figure 5-4. (See Chapter 8, “Inter rupt Control Unit,” for a description of the ICU.)
Figure 5-5 describes the interrupt configuration register (INTCFG).
The ICU receives requests from seven internal sources:
• three outputs from the timer/counter unit (OUT2:0)
• an output from each of the serial I/O units (SIOINT1:0)
• an output from the synchronous serial I/O unit (SSIOINT)
• an output from the DMA unit (DMAINT)
In addition, the ICU controls the interrupt sources on eight external pins:
• INT3:0 (multiplexe d with I/O port signals P3.5:2) are enabl ed or disabled by the P3C FG
register (see Figure 5-17 on pa ge 5-24).
• INT7:4 share their package pins with four TCU inputs: TMRGATE1, TMRCLK1,
TMRGATE0, and TMRCLK0. These signal pairs are not multiplexed; however, the pin
inputs are enable d or disabled by the INTCFG register.
The three cascade output s (CAS2:0) should be e nabl ed when an exte rnal 8259A module is connected to one of the INT3:0 signals. The cascade outputs are then ORed with address lines A18:16
(see “Interrupt Acknowledge Cycle” on page 7-19 for details).
5-7
DEVICE CONFIGURATION
8259A
Master
IR0
IR1
IR2
IR3
IR4
OUT0 (TCU)
P3CFG.2
V
0
1
SIOINT1
SIOINT0
P3CFG.3
V
IR5
0
1
P3CFG.4
V
IR6
0
1
P3CFG.5
CAS2:0
IR7
V
0
1
INTCFG.0
V
0
1
INTCFG.1
SSIOINT
0
1
OUT1(TCU)
OUT2(TCU)
DMAINT
INT
8259A
Slave
IR0
IR1
IR2
IR3
IR4
INTCFG.2
V
IR5
CAS2:0
IR6
IR7
3
0
1
INTCFG.3
0
1
WDTOUT#
V
SS
V
*Alternate pin signals are in parentheses.
SS
SS
SS
SS
SS
SS
SS
INTCFG.7
0
1
A18:16
To/From I/O Port 3
To/From I/O Port 3
To/From I/O Port 3
To/From I/O Port 3
To TCU
To TCU
To TCU
To TCU
P3CFG.2
P3CFG.3
P3CFG.4
P3CFG.5
INT0
(P3.2)*
INT1
(P3.3)
INT2
(P3.4)
INT3
(P3.5)
INT4
(TMRCLK0)
INT5
(TMRGATE0)
INT6
(TMRCLK1)
INT7
(TMRGATE1)
CAS2:0
(A18:16)
A2522-01
5-8
Figure 5-4. Interrupt Control Unit Configuration
DEVICE CONFIGURATION
Interrupt Configuration
INTCFG
(read/write)
Expanded Addr:
PC/AT Addr:
Reset State:
F832H
—
00H
70
CE———IR6IR5IR1IR0
Bit
Number
Bit
Mnemonic
Function
7CECascade Enable:
Setting this bit enables the cascade signals, providing access to external
slave 82C59A devices. The cascade signals are used to address
specific slaves. If enabled, slave IDs appear on the A18:16 address lines
during interrupt acknowledge cycles.
6–4—Reserved. These bits are u ndefined; for compatibility with future devices,
do not modify these bits.
3IR6Internal Slave IR6 Connection:
Setting this bit connects the INT7 pin to the slave IR6 signal. Clearing
this bit connects V
to the slave IR6 signal.
SS
2IR5Internal Slave IR5 Connection:
Setting this bit connects the INT6 pin to the slave IR5 signal. Clearing
this bit connects V
to the slave IR5 signal.
SS
1IR1Internal Slave IR1 Connection:
Setting this bit connects the INT5 pin to the slave IR1 signal. Clearing
this bit connects the SSIO interrupt signal (SSIOINT) to the slave IR1
signal.
0IR0Internal Slave IR0 Connection:
Setting this bit connects the INT4 pin to the slave IR0 signal. Clearing
this bit connects V
to the slave IR0 signal.
SS
Figure 5-5. Interrupt Configuration Register
5-9
DEVICE CONFIGURATION
5.2.3Timer/Cou nter Uni t Confi gu rati on
The three-channel timer/counter unit (TCU) and its configuration register (TMRCFG) are shown
in Figure 5-6 and Figure 5-7. The clock in puts can be exte r nal signals (TMRCLK2:0) or the onchip programmable clock (PSCLK). All of the clock inputs can be held low, and the gate inputs
can be held high by program ming bit s in the TM RCF G regi ster. Several of the time r si g nals g o
to the interrupt control unit (see Figure 5-4 on page 5-8).
The channel-0 and channel-1 signal s are se lect ed indivi d ually. In contrast , the channel-2 signal s
(TMRC LK2, TMRGAT E2, TMR OUT2) are sel ected as a group. Note that using the channel-2
signals precludes use of the coprocesso r signal s (PEREQ, BUSY#, and ERROR#). Also, y ou
must choose individually bet ween interrupt inputs and timer clock signals (TMRC LK0/INT4,
TMRCLK1/INT6) and between interrupt inputs and timer gate signals (TMRGATE0/INT5,
TMRGATE1/INT7).
5-10
Timer/Counter
Unit
CLKIN0
GATE0
OUT0
CLKIN1
GATE1
OUT1
CLKIN2
GATE2
OUT2
*Alternate pin signals are in parentheses.
TMRCFG.7
TMRCFG.0
0
1
TMRCFG.1
0
1
To ICU
To/From I/O Port 3
TMRCFG.2
0
1
TMRCFG.3
0
1
To ICU, DMA
To/From I/O Port 3
TMRCFG.4
0
1
TMRCFG.5
0
1
To ICU, DMA
PSCLK
V
CC
PSCLK
V
CC
PSCLK
To Core
V
CC
To Core
To Core
To ICU
To ICU
To ICU
To ICU
DEVICE CONFIGURATION
TMRCLK0
(INT4)*
TMRGATE0
(INT5)
P3CFG.0
TMROUT0
(P3.0)
TMRCLK1
(INT6)
TMRGATE1
(INT7)
P3CFG.1
TMROUT1
(P3.1)
PINCFG.5
TMRCLK2
(PEREQ)
TMRGATE2
(BUSY#)
TMROUT2
(ERROR#)
A2517-01
Figure 5-6. Timer/Counter Unit Configurati on
5-11
DEVICE CONFIGURATION
.
Timer Configuration
TMRCFG
(read/write)
70
TMRDIS—GT2CONCK2CONGT1CONCK1CONGT0CONCK0CON
Expanded Addr:
PC/AT Addr:
Reset State:
F834H
–
00H
Bit
Number
Bit
Mnemonic
Function
7TMRDISTimer Disable:
n
Setting this bit disables the CLK
n
signals.
CLK
sign als. Clearing this bi t enables t he
6— Reserved. This bit is undefined; for compatibility with future devices, do
not modify this bit.
5GT2CONGate 2 Connection:
Setting this bit connects GATE2 to the TMRGATE2 pin. Clearing this bit
connects GATE2 to V
CC.
4CK2CONClock 2 Connection:
Clearing this bit connects CLK2 to the internal PSCLK signal. Setting this
bit connects CLK2 to the TMRCLK2 pin.
3GT1CONGate 1 Connection:
Setting this bit connects GATE1 to the TMRGATE1 pin. Clearing this bit
connects GATE1 to V
.
CC
2CK1CONClock 1 Connection:
Clearing this bit connects CLK1 to the internal PSCLK signal. Setting this
bit connects CLK1 to the TMRCLK1 pin.
1GT0CONGate 0 Connection:
Setting this bit connects GATE0 to the TMRGATE0 pin. Clearing this bit
connects GATE0 to V
.
CC
0CK0CONClock 0 Connection:
Clearing this bit connects CLK0 to the internal PSCLK signal. Setting this
bit connects CLK0 to the TMRCLK0 pin.
5-12
Figure 5-7. Timer Confi guration Register
DEVICE CONFIGURATION
5.2.4Asynchrono us Seri al I/O Co nfigur atio n
Figure 5-8 and Figure 5-9 show the configuratio n of the asynchronous serial I/O unit, consisting
of channels SIO0 and SIO1. Each channel has an output (SIOINT1, SIOINT2) to the inter rupt
control unit (see Figure 5-4 on page 5-8). ( These signals do not go to package pins.) The value of
SIOINTn is the value of one of the status signals (receiver line status, receiver buffer full, transmit
buffer empty, modem status), where the selection is made by a priority circuit.
All of the SIO0 pins are multiplexed with I/O port signals. Note that using SIO1 precludes using
DMA channel 1 for externa l DMA requests due to the multipl exing of the transm it and receive
signals with DMA signals (RXD1/DRQ1, TXD1/DAC K1#). Also, using SIO1 modem signals
RTS1#, DSR1 #, DTR1#, and RI1# precludes use of the SSIO signals.
5-13
DEVICE CONFIGURATION
SIO0
BCLKIN
Receive Data
Transmit Data
Clear to Send
Request to Send
Data Set Ready
SIOCFG.0
0
1
SIOINT0 to ICU
SIOCFG.6
0
1
0
1
SERCLK
To/From I/O Port 3
To/From I/O Port 2
To/From I/O Port 2
To/From I/O Port 2
To/From I/O Port 1
To/From I/O Port 1
P3CFG.7
COMCLK
(P3.7)*
P2CFG.5
RXD0
(P2.5)
P2CFG.6
TXD0
(P2.6)
P2CFG.7
CTS0#
(P2.7)
P1CFG.1
RTS0#
(P1.1)
P1CFG.3
DSR0#
(P1.3)
Data Carrier
Detect
Data Terminal
Ready
Ring Indicator
*Alternate pin signals are in parentheses.
Figure 5-8. Serial I/O Unit 0 Configuration
5-14
P1CFG.0
0
1
To/From I/O Port 1
DCD0#
(P1.0)
P1CFG.2
DTR0#
To/From I/O Port 1
(P1.2)
P1CFG.4
0
1
To/From I/O Port 1
V
CC
RI0#
(P1.4)
A2521-01
DEVICE CONFIGURATION
SIO1
BCLKIN
Receive Data
Transmit Data
Clear to Send
Request to Send
Data Set Ready
SIOCFG.1
0
1
SIOINT1 to ICU
SIOCFG.7
0
1
0
1
SERCLK
To/From I/O Port 3
To DMA
From DMA
To/From DMA
From SSIO
To/From SSIO
P3CFG.7
COMCLK
(P3.7)*
RXD1
(DRQ1)
PINCFG.2
TXD1
(DACK1#)
PINCFG.3
CTS1#
(EOP#)
PINCFG.0
RTS1#
(SSIOTX)
DSR1#
(STXCLK)
Data Carrier
Detect
0
1
Data Terminal
Ready
Ring Indicator
0
1
*Alternate pin signals are in parentheses.
Figure 5-9. Serial I/ O Unit 1 Configuratio n
To DMA
DCD1#
(DRQ0)
PINCFG.1
DTR1#
To/From SSIO
To SSIO
V
CC
(SRXCLK)
RI1#
(SSIORX)
A2519-01
5-15
DEVICE CONFIGURATION
SIO and SSIO Configuration
SIOCFG
(read/write)
70
S1MS0M———SSBSRCS1BSRCS0BSRC
Bit
Number
7S1MSIO1 Modem Signal Connectio ns:
6S0MSIO0 Modem Signal Connectio ns:
5–3—Reserved. These bits are u ndefined; for compatibility with future devices,
2SSBSRCSSIO Baud-rate Generator Clock Source:
1S1BSRCSIO1 Baud-rate Generator Clock Source:
0S0BSRCSIO0 Baud-rate Generator Clock Source:
Bit
Mnemonic
Setting this bit connects the SIO1 modem input signals internally.
Clearing this bit connects the SIO1 modem input signals to the package
pins.
Setting this bit connects the SIO0 modem input signals internally.
Clearing this bit connects the SIO0 modem input signals to the package
pins.
do not modify these bits.
Setting this bit connects the internal SERCLK signal to the SSIO baudrate generator. Clearing this bit connects the internal PSCLK signal to
the SSIO baud-rate generator.
Setting this bit connects the internal SERCLK signal to the SIO1 baudrate generator. Clearing this bit connects the COMCLK pin to the SIO1
baud-rate generator.
Setting this bit connects the internal SERCLK signal to the SIO0 baudrate generator. Clearing this bit connects the COMCLK pin to the SIO0
baud-rate generator.
Expanded Addr:
PC/AT Addr:
Reset State:
Function
F836H
—
00H
5-16
Figure 5-10. SIO and SSIO Configuration Register
DEVICE CONFIGURATION
5.2.5Serial Synch ron ou s I/O Con figu rati on
The synchronous serial I/O unit (SSIO) is shown in Figure 5-11. Its single configuration register
bit is in the SIOCFG register (Table 5-10). The transmit buffer empty and receive buffer full signals (SSTBE and SSR BF) g o to t he DMA unit (Fi gure 5-2 on page 5- 5), an d an interrupt si gnal
(SSIOINT) goes to the ICU (Figure 5-4 on page 5-8). As programmed in the SSIOCON1 register
(see Chapt er 12), SSIOINT is asserted for one of two conditions: the receive buffer is full or the
transmit buffer is empty. Note tha t usin g the SSIO signals prec ludes the use of four of the SIO1
modem signals.
SSIO
BCLKIN
Receive Data
Transmit Data
Transmit Clock
Receive Clock
*Alternate pin signals are in parentheses.
SIOCFG.2
0
1
Figure 5-11. SSIO Unit Configuration
PSCLK
SERCLK
SSTBE (To DMA)
SSRBF (To DMA)
SSIOINT (To ICU)
From SIO1
From SSIO1
To SIO1
PINCFG.0
To SIO1
PINCFG.1
SSIORX
(RI1#)*
SSIOTX
(RTS1#)
STXCLK
(DSR1#)
SRXCLK
(DTR1#)
A2518-01
5-17
DEVICE CONFIGURATION
5.2.6Core Configuration
Three coprocessor signals (ERROR #, PEREQ, and BU SY in Figure 5-12) can be routed to the
core, as determined by bit 5 of the PINCFG register (see Figure 5-14 on page 5- 21). Due to signal
multiplexing at the pins, the coprocess or and Timer 2 cannot be used in the same configuration.
Core
Error#
PEREQ
BUSY#
RESET
PINCFG.5
0
V
1
0
V
1
0
V
1
From TCU
CC
To TCU
CC
To TCU
CC
RESET Timing
Generation
From Internal Chip RESET
PORT92.1
PINCFG.5
ERROR#
(TMROUT2#)*
PEREQ
(TMRCLK2)
BUSY#
(TMRGATE2)
PORT92.0
A20
*Alternate pin signals are in parentheses.
To Chip Select
and A20 Pin
A2520-01
Figure 5-12. Core Configuration
Setting bit 0 in the PORT92 register (see Figure 5-13) resets the core without resetting the peripherals. Unlike t he RESET pin, whi ch is asynchronous and c an be used to synchroniz e internal
clocks to CLK2, this core-only reset is synchronized with the on-chip clocks and does not affect
the on-chip clock synchronization.
5-18
DEVICE CONFIGURATION
Clearing bit 1 in the PORT92 register forces addres s line 20 to 0. This bit affects only addresse s
generated by the c ore. A ddresses gene rated by the DM A and t he refresh c ontrol u nit are not affected by this bit.
Port 92 Configuration
PORT92
(read/write)
70
——————A20GCPURST
Bit
Number
7–2—Reserved. These bits are u ndefined; for compatibility with future devices,
1A20GA20 Grounded:
0CPURSTCPU Reset:
Bit
Mnemonic
do not modify these bits.
Setting this bit leaves core-generated addresses unmodified. Clearing
this bit forces address line A20 to 0. This bit affects ad dresses generated
only by the core. Addresses generated by the DMA and the Refresh Unit
are not affected by this bit.
Setting this bit resets the core without resetting the peripherals. Clearing
this bit has no effect.
Expanded Addr:
PC/AT Addr:
Reset State:
Function
F092H
0092H
0EH
Figure 5-13. Port 92 Configuration Register
ERRATA (3/28/95)
Figure 5-13 incorrectly showed Reset State as 00H; now correctly shows 0EH.
Register bit 1 incorrectly shown as A20, now correctly shows A20G.
5-19
DEVICE CONFIGURATION
5.3PI N CONFIGURATION
Most of the microprocessor’s pac kage pins support tw o signals. Some of these pins support two
input signals with out a multiplexer. The se input-signal pairs are l isted in Table 5-1. The pin is
connected to b oth peripheral inputs.
The remaining pins supporting two signals have multiplexe rs. For each suc h pin, a bit in a pin
configuration register enables one of the signals. Figure 5-18 on page 5-27 lists t he bit s in eac h
of the four pin configuration registers. These abbreviated regist er tables are dis cussed in “Con-
figuration Example” on page 5-25.
Table 5-1. Signal Pairs on Pins without Multiplexers
NamesSignal Descripti ons
DRQ0/
DCD1#
DRQ1/
RXD1
DSR1#/
STXCLK
RI1#/
SSIORX
TMRCLK0/
INT4
TMRGATE0/
INT5
TMRCLK1/
INT6
TMRGATE1/
INT7
DMA External Request 0 indicates that an off-chip peripheral requires DMA service.
Data Carrier Detect SIO1 indicates that the modem or data set has detected the
asynchronous serial channel’s data carrier.
DMA External Request1 indicates that an off-chip peripheral requires DMA service.
Receive Data SIO1 accepts serial data from the modem or data set to the
asynchronous serial channel SIO1.
Data Set Ready SIO1 indicates that the modem or data set is ready to establish a
communication link with asynchronous serial channel SIO1.
SSIO Transmit Clock synchronizes data being sent by the synchronous serial port.
Ring Indicator SIO1 ind icate s that the modem or data set has received a telephone
ringing signal.
SSIO Receive Serial Data accepts serial data (most-significant bit first) being sent to
the synchronous serial port.
Timer/Coun ter Cloc k0 Input can serve as an external clock input for timer/counter0.
(The timer/counters can also be clocked internally.)
Interrupt 4 is an undedicated external interrupt.
Timer/Counter0 Gate Input can control timer/counter0’s counting (enable, disable, or
trigger, depending on the programmed mode).
Interrupt 5 is an undedicated external interrupt.
Timer/Coun ter Cloc k1 Input can serve as an external clock input for timer/counter1.
(The timer/counters can also be clocked internally.)
Interrupt 6 is an undedicated external interrupt.
Timer/Counter0 Gate Input can control timer/counter1’s counting (enable, disable, or
trigger, depending on the programmed mode).
Interrupt 7 is an undedicated external interrupt.
5-20
DEVICE CONFIGURATION
Pin Configuration
PINCFG
(read/write)
70
—PM6PM5PM4PM3PM2PM1PM0
Bit
Number
7— Reserved. This bit is undefined; for compatibility with future devices, do
6PM6Pin Mod e:
5PM5Pin Mod e:
4PM4Pin Mod e:
3PM3Pin Mod e:
2PM2Pin Mod e:
1PM1Pin Mod e:
0PM0Pin Mod e:
Bit
Mnemonic
not modify this bit.
Setting this bit connects REFRESH# to the package pin. Clearing this bit
connects CS6# to the package pin.
Setting this bit connects the timer control unit signal s, TMROUT2 ,
TMRCLK2, and TMRGATE2, to the package pins. Clearing this bit
connects the coprocessor signals, PEREQ, BUSY# , and ERROR# , to the
package pins.
Setting this bit connects CS5# to the package pin. Clearing this bit
connects DACK0# to the package pin.
Setting this bit connects CTS1# to the packa ge pin. Cleari ng this bit
connects EOP# to the package pin.
Setting this bit connects TXD1 to the package pin. Clearing this bit
connects DACK1# to the package pin.
Setting this bit connects DTR1# to the package pin. Clearing this bit
connects SRXCLK to the package pin.
Setting this bit connects RTS1# to the packa ge pin. Cleari ng this bit
connects SSIOTX to the package pin.
Expanded Addr:
PC/AT Addr:
Reset State:
Function
F826H
—
00H
Figure 5-14. Pin Configuration Register
5-21
DEVICE CONFIGURATION
Port 1 Configuration
P1CFG
(read/write)
70
PM7PM6PM5PM4PM3PM2PM1PM0
Bit
Number
7PM7Pin Mod e:
6PM6Pin Mod e:
5PM5Pin Mod e:
4PM4Pin Mod e:
3PM3Pin Mod e:
2PM2Pin Mod e:
1PM1Pin Mod e:
0PM0Pin Mod e:
Bit
Mnemonic
Setting this bit connects HLDA to the package pin. Clearing this bit
connects P1.7 to the package pin.
Setting this bit connects HOLD to the package pin. C learing this bit
connects P1.6 to the package pin.
Setting this bit connects LOCK# to the package pin. Clearing this bit
connects P1.5 to the package pin.
Setting this bit connects RI0# to t he package pin. Clearing this bit
connects P1.4 to the package pin.
Setting this bit connects DSR0# to the package pin. Clearing this bit
connects P1.3 to the package pin.
Setting this bit connects DTR0# to the package pin. Clearing this bit
connects P1.2 to the package pin.
Setting this bit connects RTS0# to the packa ge pin. Cleari ng this bit
connects P1.1 to the package pin.
Setting this bit connects DCD0# to the package pin. Clearing this bit
connects P1.0 to the package pin.
Expanded Addr:
PC/AT Addr:
Reset State:
Function
F820H
—
00H
5-22
Figure 5-15. Port 1 Configuration Register
DEVICE CONFIGURATION
Port 2 Configuration
P2CFG
(read/write)
70
PM7PM6PM5PM4PM3PM2PM1PM0
Bit
Number
7PM7Pin Mod e:
6PM6Pin Mod e:
5PM5Pin Mod e:
4PM4Pin Mod e:
3PM3Pin Mod e:
2PM2Pin Mod e:
1PM1Pin Mod e:
0PM0Pin Mod e:
Bit
Mnemonic
Setting this bit connects CTS0# to the packa ge pin. Cleari ng this bit
connects P2.7 to the package pin.
Setting this bit connects TXD0 to the package pin. Clearing this bit
connects P2.6 to the package pin.
Setting this bit connects RXD0 to the package pin. Clearing this bit
connects P2.5 to the package pin.
Setting this bit connects CS4# to the package pin. Clearing this bit
connects P2.4 to the package pin.
Setting this bit connects CS3# to the package pin. Clearing this bit
connects P2.3 to the package pin.
Setting this bit connects CS2# to the package pin. Clearing this bit
connects P2.2 to the package pin.
Setting this bit connects CS1# to the package pin. Clearing this bit
connects P2.1 to the package pin.
Setting this bit connects CS0# to the package pin. Clearing this bit
connects P2.0 to the package pin.
Expanded Addr:
PC/AT Addr:
Reset State:
Function
F822H
—
00H
Figure 5-16. Port 2 Configuration Register
5-23
DEVICE CONFIGURATION
Port 3 Configuration
P3CFG
(read/write)
70
PM7PM6PM5PM4PM3PM2PM1PM0
Bit
Number
7PM7Pin Mod e:
6PM6Pin Mod e:
5PM5Pin Mod e:
4PM4Pin Mod e:
3PM3Pin Mod e:
2PM2Pin Mod e:
1PM1Pin Mod e:
0PM0Pin Mod e:
Bit
Mnemonic
Setting this bit connects COMCLK to the package pin. Clear ing this bit
connects P3.7 to the package pin.
Setting this bit connects PWRDOWN to the package pin. Clearing this bit
connects P3.6 to the package pin.
Setting this bit connects INT3 to the package pin. Clearing this bit
connects P3.5 to the package pin.
Setting this bit connects INT2 to the package pin. Clearing this bit
connects P3.4 to the package pin.
Setting this bit connects INT1 to the package pin. Clearing this bit
connects P3.3 to the package pin.
Setting this bit connects INT0 to the package pin. Clearing this bit
connects P3.2 to the package pin.
Setting this bit connects TMROUT1 to the package pin. Cleari ng this bit
connects P3.1 to the package pin.
Setting this bit connects TMROUT0 to the package pin. Cleari ng this bit
connects P3.0 to the package pin.
Expanded Addr:
PC/AT Addr:
Reset State:
Function
F824H
—
00H
5-24
Figure 5-17. Port 3 Configuration Register
DEVICE CONFIGURATION
5.4DEVICE CONFIGURATION PROCEDURE
Before configuring the microprocessor, you should make the following selections:
• the set of peripherals to be used
• the signals to be available at the package pins
• the desired peripheral-periphera l and peripheral-core connections
Although final decisions regarding these selections may be influenced by the possible configurations, we recommend that you initially make the selections without regard to limitations on the
configurations.
We suggest the following procedure for configuring the device for your design. (“Configuration
Example” on page 5-25 introduces an aide for recording the steps in the procedure and shows an
example configuration.)
1.Pin Configuration. For each desired pin signal, consult the peripheral configuration
diagram to find the bit value in the pin configuration re gister that connec ts the signal to a
device pin. If the signal shares a pin that has no multiplexer, make a note of its companion
signal.
2.Peripheral Configuration. For each peripheral in your design, consult the peripheral
configuration diagram a nd the peripheral co nfiguration register to find the bit va lues for
your desired internal connec tions.
3.Configura tion Revie w. Review the result s of steps 1 and 2 to see if the con fig uration
registers have conflicting bit values. If conflic ts exist, follow steps 3.1 and 3.2.
3.1.Attempt to resolve the pin configuration confl icts first. In some case s you may
find that using a different peripheral channel resolve s the conflict (e.g., using
SIO1 instead of SIO0, or DMA channel 0 instead of channel 1.
3.2.Attempt to resolve peripheral configuration conflicts.
If conflicts remain, consider peri pheral subst itutio ns (e.g. , SIO1 instead of SIO0, DM A c hannel
1 instead of channel 0) that may re solve them and return to step 1.
5.5CONFIGURATION EXAMPLE
This section presents a n example of configuri ng the device for a PC/AT-c ompatibl e configuration. It also introduces an aide to execut ing the steps in the con figu ration process.
5-25
DEVICE CONFIGURATION
5.5.1Example Design Req uirem en ts
The example is a PC/AT-compat i ble design with the f ollow ing requireme nts :
• Interrupt Control Unit:
— External interrupt inputs available at package pins: INT7:0.
— Cascade outputs (CAS2:0) co nnected to package pins.
— Counter 2: Clock input is on-chip programmable clock (PSCLK); no signals connected
to package pins.
• DMA Unit:
— Request and acknowled ge signals fo r DMA channe l 0 (DRQ0, DACK0 #) connected to
package pins.
— End-of-process signal (EOP#) connected to a package pin.
• Asynchronous Serial I/O channel 0 (SIO0):
— Clock input is the seria l communic ations bau d clock (COMCL K ).
— RXD0, TXD0, RTS0#, DSR0#, DCD0#, DTR0# and RI0# connected to package pins.
• Asynchronous Serial I/O channel 1(SIO1):
— Clock input is the seria l communic ations bau d clock (COMCL K ).
— Mo dem signals internal l y connected.
• Synchronous Serial I/O (SSIO):
— Clock input is SERC LK .
— SSIORX, SSIOTX, SRXCLK , and STXCLK connected to package pins.
• Chip Select:
— Chip select signals CS6#, CS4:0# connected to package pins.
• Core and Bus Arbiter:
— Coprocessor signals connected to package pins.
— HOLD and HLDA# connected to package pins .
— LOCK# and PWRDOWN c onnected to package pins.
5.5.2Example Desi gn Soluti on
The example solution is given in three figures. In Figure 5-18 and Figure 5-19, the configuration
register bit values are re corded in the abbreviated regist er tables. The resulting connections are
shown in Figure 5-20. Figure 5-21 and Figure 5-22 are blank worksheets for your use.