Notice: Verify with your local Intel sales office that you have the latest technical information before
finalizing a design.
Order Number: 278240-004
Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual
property rights is granted by this document. Except as provided in Intel's Terms and Conditions of Sale for such products, Intel assumes no liability
whatsoever,and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to
fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not
intended for use in medical, life saving, or life sustaining applications.
Intel may make changes to specifications and product descriptions at any time, without notice.
Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for
future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.
The SA-1110 may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current
characterized errata are available on request.
Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
Copies of documents which have an ordering number and are referenced in this document, or other Intel literature may be obtained by calling
16-2Boundary-Scan Signals and Pins .............................................................................................422
SA-1110 Developer’s Manual19
Introduction1
1.1Intel®StrongARM* SA-1110 Microprocessor
The Intel®StrongARM* SA-1110 Microprocessor (SA-1110) i s a highly integrated
communications microcontroller that incorporates a 32-bit StrongARM RISC processor core,
system support logic, multiple communication channels, an LCD controller, a memory and
PCMCIA controller, and general-purpose I/O ports. As do the Intel StrongARM SA-110
Microprocessor (SA-110) and Intel StrongARM SA-1100 Microprocessor (SA-1100), earlier
members of the StrongARM family, the SA-1110 provides power efficiency, low cost, and high
performance. Figure 1-1 shows the features of the SA-1110. The shaded boxes are features that
have carried over with few or no changes from the SA-110. The nonshaded boxes are new or
updated features for the SA-1110; most of the features are equivalent to that of the SA-1100. The
SA-1110 differs from the SA-1100 only in the features of its memory and PCMCIA controller.
Table 1-4.Feature Additions to the SA-1110 from the SA-1100
• Synchronous DRAM (SDRAM) support
• Synchronous mask ROM (SMROM)
support (32-bit only) on CS0-3
• Readyinput signal for variable latency I/O
devices (for example, graphics chips)
• CS4 and CS5 for variable latency I/O
devices, ROM, o r Flash memory
• CS3 support for variable latency I/O
devices (instead of SRAM)
• Support for burst (page-mode) read
timings from Flash memory
• Support for 16-bit data busses on all
memory types (except SMROM)
• Support for SRAM, DRAM, and SDRAM
in the same system
SA-1110 Developer’s Manual23
Introduction
1.2Overview
The SA-1110is a general-purpose, 32-bit RISC microprocessor with a 16 Kbyte instruction cache, an
8 Kbyte write-back data cache, a minicache, a write buffer, a read buffer, and a memory management
unit (MMU) combined in a single chip. The SA-1110 is software compatible with the ARM
architecture processor family and can be used with ARM
video. The core of the SA-1110 is derived from the core of the Intel
Microprocessor (SA-110), with the following changes:
• Reduction in size of the data cache from 16 Kbyte to 8 Kbyte
• Addition of a 512-byte mini data cache that allocates data based on MMU settings
• Addition of debug support in the form of address and data breakpoints
• Addition of a four-entry read buffer to facilitate software-controlled data prefetching
• Addition of vector address adjust capability
• Addition of a process ID register
The logic outside the core and caches is grouped into the following three modules:
• Memory and PCMCIA control module (MPCM)
– Memory interface supporting ROM, Synchronous Mask ROM (SMROM), Flash, DRAM,
SDRAM, SRAM, SRAM-like variable latency I/O, and PCMCIA control signals
*
*
support chips such as I/O, memory, and
®
StrongARM SA-110
V4
• System control module (SCM)
– Twenty-eight general-purpose interruptible I/O ports
– Real-time clock, watchdog, and interval timers
– Power management controller
– Interrupt controller
– Reset controller
– Two on-chip oscillators for connection to 3.686 MHz and 32.768 kHz crystals
• Peripheral control module (PCM)
– Six-channel DMA controller
– Gray/color, active/passive LCD controller
– 16550-compatible UART
– IrDA serial port (115 Kbps, 4 Mbps)
– Synchronous serial port (UCB1100, UCB1200, SPI, TI, µWire)
– Universal serial bus (USB) device controller
The instruction set comprises eight basic instruction types:
• Two make use of on-chip arithmetic logic unit, barrel shifter, and multiplier to perform high-speed
operations on data in a bank of 16 logical registers (31 physical registers), each 32 bits wide.
• Three classes of instructions control data transfer between memory and the registers: one
optimized for flexibility of addressing, one for rapid context switching, and one for swapping data.
• Two instructions control the flow and privilege level of execution.
• One class is used to access the privileged state of the CPU.
24SA-1110 Developer’s Manual
The ARM instruction set is a good target for compilers of many different high-level languages. Where
required for critical code segments, assembly code programming is also straightforward, unlike some RISC
processors that need sophisticated compiler technology to manage complicated instruction interdependencies.
The SA-1110 is a static part and has been designed to run at a reduced voltage to minimize its power
requirements. This makes it a good choice for portable applications where both of these features are
essential.
1.3Example System
Figure 1-2 s hows how the SA-1110 can be used in a hand held computing device.
Figure 1-2.SA-1110 Example System
Gray Scale
or
Color LCD
Display
3.686
MHz
32.768
KHz
Intel® StrongARM
SA-1110
Portable
Communications
Microcontroller
Introduction
UART
Communications
*
Tablet / Serial
Keyboard
Codec
Infrared
Communications
PCMCIA Interface
(Flash, Modem)
Glue Logic
SRAM
Variable
Latency
I/O
USB Synchronization
Port
SDRAM/DRAM
SMROM/
ROM
Flash
A6701-01
SA-1110 Developer’s Manual25
Introduction
1.4ARM Architecture
The SA-1110 implements the ARM* V4 architecture as defined in the ARM Architecture
Reference, 28-July-1995, with the following options:
1.4.126-Bit Mode
The SA-1110 supports 26-bit mode but all exceptions are initiated in 32-bit mode. The P and D bits
do not affect the operation of SA-1110; they are always read as ones and writes to them are
ignored.
1.4.2Coprocessors
The SA-1110 s upports MCR and MRC access to coprocessor number 15. These instructions are
used to access the memory-management, configuration, and cache control registers. In addition,
coprocessor 15 provides control for read buffer fills and flushes, and hardware breakpoints. All
other coprocessor instructions cause an undefined instruction exception. N o support for external
coprocessors is provided.
1.4.3Memory Management
Memory management exceptions preserve the base address registers so that no code is required to
restore state. Separate translation lookaside buffers (TLBs) are implemented for the instruction and
data streams. Each TLB has 32 entries that can each map a segment, a large page, or a small page.
The TLB replacement algorithm is round robin. The data TLBs support both the flush-all and
flush-single-entry operations, while the instruction TLBs support only the flush-all operation.
1.4.4Instruction Cache
The SA-1110 has a 16 Kbyte instruction cache (Icache) with 32-byte blocks and 32-way
associativity. The cache supports the flush-all function. Replacement is round robin within a set.
The Icache can be enabled while memory management is disabled. When m emory management is
disabled, all memory is considered cacheable by the Icache.
1.4.5Data Cache
The SA-1110 has an 8 Kbyte data cache (Dcache) with 32-byte blocks and 32-way associativity.
The cache supports the flush-all, flush-entry, and copyback-entry functions. The copyback-all
function is not supported in hardware. This function can be provided by software. The cache is read
allocate with round-robin replacement.
The Dcache has been augmented with a 16-entry, two-way set associative minicache that allocates
when the MMU b and c bits are 0 and 1, respectively. This cache is accessed in parallel with the
main Dcache. Unlike the main data cache, the minicache implements a least-recently-used (LRU)
replacement algorithm. This cache is useful for applications that access large data structures and
would normally thrash the main Dcache. Instead, these data structures can be mapped so that they
allocate into the minicache and only replace data from the same structure.
26SA-1110 Developer’s Manual
1.4.6Write Buffer
The SA-1110 has an eight-entry write buffer with each entry able to contain 1 to 16 bytes. A drain
write buffer operation is supported.
1.4.7Read Buffer
The SA-1110 has a four-entry read buffer capable of loading 1, 4, or 8 words of data per entry. This
facility permits software to preload data into the buffer for use at a later time without blocking the
operation of the processor. Software can flush either a single entry or the entire buffer (four
entries). The read buffer is controlled through system control coprocessor 15 and can be enabled
for use in user mode.
Introduction
SA-1110 Developer’s Manual27
Functional Description2
This chapter provides a functional description of the Intel®StrongARM*SA-1110 Microprocessor
(SA-1110). It describes the basic building blocks within the processor, lists and describes the pins,
and explains the memory map.
2.1Block Diagram
The SA-1110 consists of the following functional blocks:
• ProcessingCore
*
The processor is the ARM
data cache (Dcache). The instruction (I) and data (D) streams are translated through
independent memory-management units (MMUs). Stores are made using a four-line write
buffer. The performance of specialized load routines is enhanced with the four-entry read
buffer that can be used to prefetch data for use at a later time. A 16-entry minicache provides a
smaller and logically separate data cache that can be used to enhance caching performance
when dealing with large data structures.
SA-1 core with a 1 6 Kbyte instruction cache (Icache) and 8 Kbyte
• Memory and PCMCIA Control Module
The memory and PCMCIA control module (MPCM) supports four banks of fast-page-mode
(FPM), extended-data-out (EDO), and/or synchronous DRAM (SDRAM). It also supports up
to six banks of static memory: all six banks allow ROM or Flash memory,each wit h non-burst
or burst read timings. Additionally, the lower three static banks support SRAM, the upper three
static banks support variable latency I/O devices (with the variable data latency controlled by a
shared data ready input), and the lower four static banks support synchronous mask ROM
(SMROM). SMROM is supported only on 32-bit data busses. All other dynamic and static
memory types and variable latency I/O devices are supported on either 16-bit or 32-bit data
busses. Expansion devices are supported through PCMCIA control signals that share the
memory bus data and address lines to complete the card interface. Some external glue logic
(buffers and transceivers) is necessary to implement the interface. Control is provided to
permit two card slots with hot-swap capability.
• Peripheral Control Module
The peripheral control module (PCM) contains a number of serial control devices, an LCD
controller as well as a six-channel DMA controller to provide service to these devices:
– An LCD controller with support for passive or active displays
– A universal serial bus (USB) endpoint controller
– A serial controller with supporting 115 Kbps and 4 Mbps IrDA protocols
– A 16550-like UART supporting 230 Kbps
– A CODEC interface supporting Motorola SPI, National Microwire, TI Synchronous
Serial, or the Phillips UCB1100 and UCB1200 protocol
• System Control Module
The system control module (SCM) is also connected to the peripheral bus. It contains five
blocks used for general system functions:
– A real-time clock (RTC) clocked from an independent 32.768 kHz oscillator
– An operating system timer (OST) for general system timer functions as well as a watchdog
mode
SA-1110 Developer’s Manual29
Functional Description
– Twenty-eight general-purpose I/Os (GPIO)
– An interrupt controller
– A power-managementcontroller that handles the transitions in and out of sleep and idle
modes
– A reset controller that handles the various reset sources on the processor
Figure 2-1 shows the functional blocks contained in the SA-1110 integrated processor.
Figure 2-2 is a functional diagram of the SA-111 0.
A[25:0]OCZMemory address bus. This bus signals the addres s requested for memory
D[31:0]ICOCZMemory data bus. Bits 15..0 are used for 16-bit data busses.
nCS[5:0]OCZStatic chip s elects. These signals are chip selects to static memory devices such
RDYICStatic data ready signal for nCS[5:3]. This signal should be connected to the data
nOEOCZMemory output enable. This signal should be connected to the output enables of
nWEOCZMemory write enable. This signal should be connected to the write enables of
nRAS[3:0]/
nSDCS[3:0]
nCAS[3:0]/
DQM[3:0]
nSDRASOCZSDRAM RAS. This signal should be connected to the row address strobe (RAS)
nSDCASOCZSDRAM CAS. This signal should be connected to the column address strobe
SDCKE[1:0]OCZSDRAM and/or SMROM clock enables.
OCZDRAM RAS or S DRAM CS for banks 0 through 3. These signals should be
OCZDRAM CAS or SDRAM DQM for data banks 0 through 3. These signals should be
accesses.
Bits 24..10 carry the 15-bit DRAM address. The static memory devices and the
expansion bus receive addres s bits 25..0.
as ROM and F lash. They are individually programmable in the memory
configuration registers. Bits 5..3 c an be used with variable latency I/O devices.
ready output pins of variable latency I/O devices that require variable data
latencies. Devices select ed by nCS[5:3] can share the RDY pin if they drive it high
prior to tristating and a weak external pull-up is present.
memory devices to control their data bus drivers.
memory devices.This signal is us ed in conjunction with nCAS[3:0] to perform byte
writes.
connected to the row address strobe (RAS) pins for asynchronous DRAM or t he
chip select (CS) pins for SDRAM.
connected to the column address strobe (CAS) pins for asynchronous DRAM or
the data output mask enables (DQM) for SDRAM.
pins for all banks of SDRAM.
(CAS) pins for all banks of SDRAM.
SDCKE 0 should be connected to the clock enable (CKE) pins of SMROM.
SDCKE 0 is asserted upon any rest (including sleep-exit) if static memory
bank 0 (boot space) is configured for synchronous mask ROM (SMROM_EN = 1);
otherwise it is deasser ted upon reset.
SDCKE 1 should be connected to the clock enable pins of SDRAM.They ar e
deasserted (held low) during sleep. SDCKE 1 always is deasserted upon reset.
The memory controller provides control register bits for deassertion of each
SDCKE pin. However, SDCKE 0 cannot be deasserted via program if
SMROM_EN =1.
32SA-1110 Developer’s Manual
Table 2-1.Signal Descriptions (Sheet 2 of 4)
NameTypeDescription
SDCLK[2:0]OCZSDRAM and/or SMROM clock.
SDCLK 0 should be connected to the clock ( CLK) pins of SMROM.
SDCLK 1 and SDCLK 2 should be connected to the clock pins of SDRAM in bank
pairs 0/1 and 2/3, respectively.They are driven by either the internal memory
controller clock (CPU clock divided by 2) or the memory controller clock divided by
2 (CPU clock divided by 4).
All SDCLK pins are held low during sleep mode and start running at CPU clock
divide by 4 upon any reset (including sleep-exit).
The memory controller provides control register bits for clock division and disable
of each SDCLK pin. However, SDCLK 0 cannot be disabled via program if static
memory bank 0 (boot space) is configured for synchronous mask ROM
(SMROM_EN = 1).
RD/nWROCZRead/write direction control for memory and PCMCIA data bus (D[31:0]). T h is
signal is applicable to all memory bus and PCMCIA transfers.
For reads (RD/nWR = 1), system-level bus tran sceivers or directly connected
memory devices should drive D[31:0].
For writes (RD/nWR = 0), the SA-1110 will drive D[31:0].
nPOEOCZPCMCIA output enable. This signal is an output and is used to perform reads from
memory and attribute space.
nPWEOCZPCMCIA write enable. This signal is an output and is used to perform writes to
memory and attribute space.
nPIOWOCZPCMCIA I/O write. This signal is an output and is used to perform write
transactions to the PCMCIA I/O space.
nPIOROCZPCMCIA I/O read. This signal is an output and is used to perform read
transactions from the PCMCIA I/O space.
nPCE[2:1]OCZPCMCIA card enable. These signals are output and are used to select a PCMCIA
card. nPCE 2 enables the high-byte lane and nPCE 1 enables the low-byte lane.
nIOIS16ICI/OSelect 16. This signal is an input and is an acknowledgment from t he PCM CIA
card that it can perform 16-bit I/O data transfers.
nPWAITICPCMCIA wait. This signal is an input and is driven low by the PCMCIA card to
extend the duration of transfers to/from the SA -1110.
PSKTSELOCZPCMCIA socket select. This signal is an output and is used by external steering
logic to route control, address, and data signals to one of the PCMCIA sockets.
When PSKTSEL is low, socket zero is selected. When PSKTSEL is high, socket
one is selected. This signal has t he same timing as the address lines.
nPREGOCZPCMCIA register select. This signal is an output and indicates that, on a memory
transaction, the target address is attribute space. This signal has the same timing
as address.
L_DD[7:0]OCZLCD controller display data.
L_FCLKOCZLCD frame clock.
L_LCLKOCZLCD line clock.
L_PCLKOCZLCD pixel clock.
L_BIASOCZLCD ac bias drive.
TXD_COCZCODEC transmit.
RXD_CICCODEC receive.
Functional Description
SA-1110 Developer’s Manual33
Functional Description
Table 2-1.Signal Descriptions (Sheet 3 of 4)
NameTypeDescription
SCLK_COCZCODEC clock.
SFRM_COCZCODEC frame signal.
UDC+ICOCZSerial port zero bidirectional, differential signalling pin (UDC).
UDC-ICOCZSerial port zero bidirectional, differential signalling pin (UDC).
TXD_1OCZSerial port one transmit pin (UART).
RXD_1ICSerial port one receive pin (UART).
TXD_2OCZSerial port two transmit pin (IrDA).
RXD_2ICSerial port two receive pin (IrDA).
TXD_3OCZSerial port three transmit pin (UART).
RXD_3ICSerial port three receive pin (UART).
GP[27:0]ICOCZGeneral-purpose input output.
SMROM_ENICSynchronous mask ROM (SMROM) enable. This pin is used to determine if the
ROM_SELICROM select. This pin is used to configure the ROM width. It is either grounded or
PXTALICInput connection for 3.686-MHz crystal (non-CMOS threshold).
PEXTALOCZOutput connection for 3.686-MHz crystal (non-CMOS level).
TXTALICInput connection for 32.768-kHz crystal (non-CMOS threshold).
TEXTALOCZOutput connection for 32.768-kHz crystal (non-CMOS level).
PWR_ENOCZPower enable. Active high. PWR_EN enables the external VDD power supply.
BATT_FAULTICBattery fault. Signals the SA-1110 that the main power source is going away
VDD_FAULTICVDD fault. Signals the SA-1110 that the main power supply is going out of
nRESETICHard reset. This active low signal is a level-sensitive input used to start th e
nRESET_OUT OCZReset out. This signal is asserted when nRESET is asserted and deasserts when
nTRSTICTest interface reset. Note this pin has an internal pull-down resistor and must be
boot ROM (static memory bank 0) is async h ronous or synchronous. If
asynchronous, boot ROM is selected (SMROM_EN = 0) and its width is
determined by the state of the ROM_SEL pin. SMROM is supported only on 32-bit
data busses.
pulled high. If ROM_SEL is grounded, the ROM width is 16 bits. If ROM_SEL is
pulled up, the ROM width is 32 bits.
Deasserting it signals the power supply that the syst em is going into sleep mode
and that the VDD power supply should be removed.
(battery is low or has been removed from the system). The assertion of
BATT_FAULT causes the SA-1110 to enter sleep mode. The SA-1110 will not
recognize a wake-up event while this signal is asserted.
regulation (shorted card is inserted). VDD_FAULT will cause the SA-1110to enter
sleep mode. VDD_FAULTis ignored after a wake-up event until the power supply
timer completes (approximately 10 ms).
processor from a known address. A low level will cause the c u rrent instruction to
terminate abnormally, and the on-chip caches, MMU , and write buffer to be
disabled.
When nRESET is driven high, the processor will restart from address 0. nRESET
must remain low until the power supply is stable and the internal 3.686-MHz
oscillator has come up to speed. While nRESET is low, the processor will perform
idle cycles.
the processor has completed resetting. nRESET_OUT is also asserted for " soft"
reset events (sleep and watchdog).
driven high to enable the JTAG circuitry. If left unconnected, this pin is pulled low
and disables JTAG operation.
34SA-1110 Developer’s Manual
Table 2-1.Signal Descriptions (Sheet 4 of 4)
NameTypeDescription
TDIICJTAG test interface data input. Note this pin has an internal pull-up resistor.
TDOOCZJTAGtest interface data out put . Note this pin does not have an internal pull-up
resistor.
TMSICJTAG test interface mode select. Note this pin has an internal pull-up resistor.
TCKICJTAGtest interface reference clock. This times all the transfers on the JTAG test
interface. Note this pin has an internal pull-down resistor.
TCK_BYPICTest clock PLL bypass. When TCK_BYP is high, the TESTCLK is used as the
core clock in place of the PLL clock; when low, the internal PLL output is used.
This signal has no relation to the JTAG TCK pin.
TESTCLKICTest clock. TESTCLK is used to provide the core clock when TCK_BYP is high. It
should be tied low if TCK_BYP is low. This pin should be used for test purposes
only.An end user should ground this pin.
VDD—Positive supply for the core. Nine pins are allocated to this supply; eight pins are
labeled VDD. The ninth pin, labeled VDDP is dedicated to the PLL supply and
should have its own dedicat ed decoupling capacitor.Also, it should be tied directly
to the VDD power plane with the other eight VDD pins.
VDDX—Positive supply for the pins. See Chapter 14 for a count of VDDX pins. All of the
pins allocated to VDDX (labeled VDDX1, VDDX2, and V DDX3) should be tied
directly to the VDDX power plane and are all required to remain powered up at all
times for proper device operation. VDDX3 is connected to an internal voltage
regulator and should have its own dedicated decoupling capacitor.
VSS—Ground supply. Nine pins are allocated to VSS, including one for the PLL.
VSSX—Ground supply for the I/O pins. See Chapter 14, “Package and Pinout,” for a count
of VSSX pins.
Functional Description
SA-1110 Developer’s Manual35
Functional Description
2.4Memory Map
Figure 2-3 shows the SA-1110 memory map. The map is divided into four main partitions of
1 Gbyte each.
• Physical address: 0h0000 0000 to 0h3FFF FFFF.
This partition is dedicated to static memory devices (ROM, SRAM, and Flash) and to the
PCMCIA expansion bus area. This space is divided into:
— Four 128 Mbyte blocks for static memory devices
The static memory space is intended for ROM, SRAM, and Flash memory. The bottom
partition (at 0h0000 0000) is assumed to be ROM at boot time. The SMROM_EN pin is
used to determine if the boot ROM is asynchronous or synchronous. If asynchronous,
boot ROM is selected (SMROM_EN = 0), its width (16-bit or 32-bit) is determined by the
state of the ROM_SEL pin. SMROM is supported only on 32-bit data busses.
Note: The upper 64MBytes of each 128MByte static bank select cannot be acces sed
because only 26 bits of the physical address are available on external pins. Attempts to
accesses any static bank selects upper 64Mbyte will actually cause an access to that bank
selects lower 64MByte, because the missing (27th) physical address bit is ignored.
— Two 256 Mbyte blocks for the PCMCIA interface
The PCMCIA interface is divided into Socket 0 and Socket 1 space. These partitions are
further subdivided into I/O, memory and attribute space.
• Physical address: 0h4000 0000 to 0h7FFF FFFF
This partition includes:
— Two 128 Mbyte blocks for static memory or variable latency I/O devices. This block
differs from the other three status memory spaces because it can be used for variable
latency I/O but not SRAM.
Note: The upper 64MBytes of each 128MByte static bank select cannot be acces sed
because only 26 bits of the physical address are available on external pins. Attempts to
accesses any static bank selects upper 64Mbyte will actually cause an access to that bank
selects lower 64MByte, because the missing (27th) physical address bit is ignored.
— One 768 Mbyte block of reserved space. Accessing this reserved space results in a data
abort exception.
• Physical address: 0h8000 0000 to 0hBFFF FFFF
This partition contains all on-chip registers (except those specified by the ARM V4
architecture). This block is further divided into four 256 Mbyte blocks that contain control
registers for the following major functional blocks within the processor:
— Peripheral Control Module Registers
— System Control Module Registers
— Memory and Expansion Registers
— LCD and DMA Registers
• Physical address: 0hC000 0000 to 0hFFFF FFFF
This partition contains DRAM memory and is divided into:
— Four banks of DRAM fixed at 128 Mbyte each. With multiple banks implemented, there
probably will be gaps in the map that should be mapped through the
memory-management unit.
36SA-1110 Developer’s Manual
Functional Description
— One 128 Mbyte block that is mapped within the memory controller and returns zeros
when read. This function is intended to facilitate rapid cache f lushing by n ot requiring an
external memory access to load data into the cache. This space is burstable. Writes to this
space have no effect.
— One 384 Mbyte block of reserved space. Accessing this reserved space results in a data
abort exception.
SA-1110 Developer’s Manual37
Functional Description
Figure 2-3.SA-1110 Memory Map
Reserved (384 Mbytes)
Zeros Bank (128 Mbytes)
DRAM Bank 3 (128 Mbytes)
Cache flush replacement data.
Reads return zero
128 Mbytes
0hC000 0000
0h8000 0000
0h5000 0000
0h4000 0000
0h2000 0000
0h0000 0000
DRAM Bank 2 (128 Mbytes)
DRAM Bank 1 (128 Mbytes)
DRAM Bank 0 (128 Mbytes)
LCD and DMA Registers
(256 Mbytes)
Memory and Expansion Registers
(256 Mbytes)
System Control Module Registers
(256 Mbytes)
Peripheral Control Module Registers
(256 Mbytes)
Reserved (768 Mbytes)
Static Bank Select 5 (128 Mbytes)
Static Bank Select 4 (128 Mbytes)
PCMCIA Socket 1 Space
(256 Mbytes)
PCMCIA Socket 0 Space
(256 Mbytes)
Static Bank Select 3 (128 Mbytes)
Static Bank Select 2 (128 Mbytes)
Static Bank Select 1 (128 Mbytes)
Static Bank Select 0 (128 Mbytes)
Dynamic Memory Interface
512 Mbytes
Internal Registers
1 Gbyte
Static Memory or Variable
Latency I/O Interface
256 Mbytes
Note: The upper 64MBytes of each 128MByte static bank select cannot be accessed because only 26 bits
of the physical address are available on external pins. Attempts to accesses any static bank selects
upper 64Mbyte will actually cause an access to that bank s elects lower 64MByte, because the
missing (27th) physical address bit is ignored.
38SA-1110 Developer’s Manual
ARM Implementation Options3
The following sections describe ARM*architecture options that are implemented by the
®
StrongARM*SA-1110 Microprocessor (SA-1110).
Intel
3.1Big and Little Endian
Note: The Big Endian implementation scheme is not supported in t he B4 stepping and above.
The big endian bit in the control register set s whether the SA-1110 treats words stored in memory
as being stored in big endian or little endian format. Memory is viewed as a linear collection of
bytes numbered upwards from 0. Bytes 0 to 3 hold the first stored word, bytes 4 to 7 hold the
second, and so on.
In the little endian scheme, the lowest numbered byte in a word is considered to be the least
significant byte of the word and the highest numbered byte is the most significant. Byte 0 of the
memory system should be connected to data lines 7 through 0 (D[7:0]) in this scheme.
In the big endian scheme, the most significant byte of a word is stored at the lowest numbered byte
and the least significant byte is stored at the highest numbered byte. Therefore, byte 0 of the
memory system should be connected to data lines 31 through 24 (D[31:24]).
The state of the big endian bit changes the location of the bytes only within a 32-bit word. The
accessed bytes are changed for the load byte, store byte, load halfword, and store halfword
instructions only. Instruction fetches and word load and stores are not changed by the state of the
big endian bit, except when those accesses are performed with memory on 16-bit busses. See
Chapter 10, “Memory and PC-Card Control Module” for d etails on configuring data bus widths for
various memory types.
These conventions are identical to those of the SA-110. In addition, the SA-1110 DMA controller
is programmable by channel as to the endian format of the transfer. For DMA transfers, all memory
accesses are words. Then the data is buffered and transferred to/from the device as halfwords or
bytes. When the words are assembled or disassembled, the endian format of the channel is
observed. For details on how DMA data is transferred relative to the endian format of the channel,
see the Section 11.6, “DMA Controller” on page 11-210in Chapter 11, “Peripheral Control
Module”.
3.2Exceptions
Exceptions arise whenever there is a need for the normal flow of program execution to be broken;
for example, so that the processor can be diverted to handle an interrupt from a peripheral. The
processor state just prior to handling the exception must be preserved so that the original program
resumes when the exception routine has completed. Many exceptions may arise at the same time.
The SA-1110 handles exceptions by making use of banked registers to save state. The contents of
PC and CPSR are copied into the appropriate R14 and SPSR, and the PC and mode bits in the
CPSR bits are forced to a value that depends on the exception.
SA-1110 Developer’s Manual39
ARM Implementation Options
Interrupt disable flags are set where required to prevent otherwise unmanageable nestings of
exceptions. In the case of a reentrant interrupt handler, R14 and the SPSR should be saved onto a
stack in main memory before reenabling the interrupt; when transferring the SPSR register to and
from a stack, it is important to transfer the whole 32-bit value, and not just the flag or control fields.
When multiple exceptions arise simultaneously,a fixed priority determines the order in which they
are handled. The priorities are listed later in this chapter. Most exceptions are fully defined in the
ARM Architectural Reference. The following sections specify the exceptions where the SA-1110
implementation differs from the ARM Architectural Reference.
SA-1110initiates all exceptions in 32-bit mode. When an exception occurs while running in 26-bit
mode, the SA-1110 saves only t he PC in R14 and the CPSR in the SPSR of the exception mode.
The 32-bit handler must merge the condition codes, the interrupt enables, and the mode from the
SPSR into R14 if a handler is to run in 26-bit mode.
3.2.1Power-Up Reset
When the nRESET signal is low, SA-1110 stops executing instructions, asserts the nRESET_OUT
pin, and then performs idle cycles on the bus.
When nRESET is high again, SA-1110 does the following:
1. O verwrites R14_svc and SPSR_svc by copying the current values of the PC and CPSR into
them. The values of the saved PC and CPSR are not defined.
2. Forces M 4:0 =10011 (32-bit supervisor mode) and sets the I and F bits in the CPSR.
3. F orces the PC to fetch the next instruction from address 0x0000 0000.
4. Based on the state of the ROM_SEL pin, fetches this first instruction from either 16-bit
(ROM_SEL low) or 32-bit (ROM_SEL high) space. The SA-1110 memory controller
assembles the data into words in the case of a 16-bit wide ROM.
At the end of the reset sequence, the MMU, Icache, Dcache, and write buffer are disabled.
Alignment faults are also disabled, and little- endian mode is enabled. During power-up, nRESET
must be negated no earlier than 150 milliseconds after VDD and VDDx are stable to allow the
internal 3.686-MHz oscillator to stabilize. After the negation of nRESET, the PLL begins its
internally timed locking sequence. Note that the assertion of nRESET is destructive because the
state of the real-time clock and the contents of DRAM are lost.
The SA-1110 has three types of reset. See Section 1 6.2, “Reset” on page 16-414 in the
Boundary-Scan Test Interface for details.
3.2.2ROM Size Select
The ROM width may be selected using the ROM_SEL pin. This pin is sampled during the assertion
of nRESET. The value is stored in the memory controller for use during ROM accesses. If this
signal is high during RESET, then the ROM is selected to be 32 bits wide. If it is low during
RESET, then the ROM width is 16 bits. There is no provision for 8-bit ROMs in the SA-1110.
40SA-1110 Developer’s Manual
3.2.3Abort
An abort can be signalled by the internal memory-management unit, through a data breakpoint, or
by a reference to reserved memory. An abort indicates that the current memory access cannot be
completed or that a prespecified breakpoint address and (optionally) data pattern has been reached.
For instance, in a virtual memory s ystem, the data corresponding to the current address may have
been moved out of memory onto a disk, and considerable processor activity may be required to
recover the data before the access can be performed successfully.The SA-1110 checks for an abort
during memory access cycles. When aborted, the SA-1110 responds in one of two ways:
1. If the abort occurred during an instruction prefetch (a prefetch abort), the prefetched
instruction is marked as invalid but the abort exception does not occur immediately. If the
instruction is not executed, for example, as a result of a branch being taken while it is in the
pipeline, no abort will occur. An abort will take place if the instruction reaches the head of the
pipeline and is about to be executed.
2. If the abort occurred during a data access (a data abort), the action depends on the instruction
type.
a. Single data transfer instructions (LDR, STR) will abort with no registers modified.
b. The swap instruction (SWP) is aborted as though it had not executed, though externally
c. Block data transfer instructions (LDM, STM) abort on the first access that cannot
ARM Implementation Options
the read access may take place.
complete. If write-back is set, the base is NOT updated. If the instruction would normally
have overwritten the base with data (for example, an LDM instruction with the base in the
transfer list), the original value in the base register is restored.
When either a prefetch or data abort occurs, the SA-1110 performs the following:
1. Saves the address of the aborted instruction plus 4 (for prefetch aborts) or 8 (for data aborts) in
R14_abt; saves CPSR in SPSR_abt.
2. Forces M 4:0 =10111 (abort mode) and sets the I bit in the CPSR.
3. Forces the PC to fetch the next instruction from either address 0x0C (prefetch abort) or address
0x10 (data abort).
To return after fixing the reason for the abort, use SUBS PC,R14_abt,#4 (for a prefetch abort) or
SUBS PC,R14_abt,#8 (for a data abort). This will restore both the PC and the CPSR, and retry t he
aborted instruction.
The abort mechanism allows a demand paged virtual memory system to be implemented when
suitable memory management software is available. The processor is allowed to generate arbitrary
addresses, and when the data at an address is unavailable, the MMU signals an abort. The processor
traps into system software, which must work out the cause of the abort, make the requested data
available, and retry the aborted instruction. The application program needs no knowledge of the
amount of memory available to it, nor is its state in any way affected by the abort.
SA-1110 Developer’s Manual41
ARM Implementation Options
3.2.4Vector S ummary
Table 3-1 lists byte addresses, and they normally contain branch instructions pointing to the
relevant routines. These addresses (except the reset v ector) can be changed (to 0xFFFF xxxx)
through the vector adjust facility (bit 13, register 1, coprocessor 15). The vector adjust is cleared at
reset and cannot modify the reset vector.
Note that not all exceptions can occur at once. Undefined instructions and software interrupts are
mutually exclusive because they correspond to particular (nonoverlapping) decodings of the
current instruction.
If a data abort occurs at the same time as a FIQ, and FIQs are enabled (that is, the F flag in the
CPSR is clear), the SA-1110 will enter the data abort handler and then immediately proceed to the
FIQ vector. A normal return from FIQ will cause the data abort h andler to resume execution.
Placing data abort at a higher priority than FIQ is necessary to ensure that the transfer error does
not escape detection; the t ime for this exception entry should be added to worst-case FIQ latency
calculations.
42SA-1110 Developer’s Manual
3.2.6Interrupt Latencies and Enable Timing
The ability to recognize an IRQ or FIQ interrupt is, in part, determined by the I and F bits of the
CPSR. To ensure that a pending interrupt is taken, an interrupt-enabling write to CPSR (msr
instruction) must be separated from an interrupt-disabling write to the CPSR by at least two
instructions.
3.3Coprocessors
The SA-1110 has no external coprocessor bus, so it is not possible to add external coprocessors to
this device.
The SA-1110uses the internal coprocessor designated 15 for control of the on-chip MMU, caches,
clocks, and breakpoints. Coprocessor 15 is also used for read-buffer fills and flushes. If a
coprocessor other than 15 is used, then the SA-1110 will take the undefined instruction trap. The
coprocessor load, store, and data operation instructions also take the undefined instruction trap.
Permissions are set so that access to coprocessor 15 is privileged except where protection is
programmable with respect to the read buffer operations.
Note: The write buffer must be flushed prior to loading the read buffer to maintain coherency between the
two buffers. But, if user-mode MCR access is enabled for the read buffer and the flush is attempted
while in user mode, an undefined instruction exception will occur. In this case, the exception
handler must perform the write buffer flush, then return to user mode to execute the read buffer
load. Alternatively, an SWI instruction can be used as a service call to flush the write buffer.
ARM Implementation Options
SA-1110 Developer’s Manual43
Instruction Set4
This section describes the instruction timing for the Intel®StrongARM*SA-1110 Microprocessor
(SA-1110).
4.1Instruction Set
The SA-1110implements the ARM*V4 architecture as defined in the ARM Architecture R eference,
28-July-1995, with previously noted options and additions.
4.2Instruction Timing
Table 4-1 lists the instruction timing for the SA-1110. The result delay is the number of cycles that
the next sequential instruction would stall if it used the result as an input. The issue cycles are the
number of cycles that this instruction takes to issue. For most instructions, the result delay is zero
and the issue cycles is one. For load and stores, the timing is for cache hits.
Table 4-1.Instruction Timing
Instruction GroupResult DelayIssue Cycles
Data processing01
Mul or Mul/Add giving 32-bit result1..31
Mul or Mul/Add giving 64-bit result1..32
Load single – write-bac k of base01
Load single – load data zer o extended11
Load single – load data sign extended21
Store single – write-back of base01
Load multiple (delay for last register)1
Store multiple – write-back of base0
Branch or branch and link01
MCR21
MRC11
MSR to control03
MRS01
Swap22
MAX
(2, number of re gisters loaded)
MAX
(2, number of re gisters loaded)
SA-1110 Developer’s Manual45
Caches, Write Buffer, and Read Buffer5
To reduce effective memory access time, the Intel®StrongARM*SA-1110 Microprocessor
(SA-1110) has an instruction cache, a data cache, a write buffer, and a read buffer. All except the
read buffer are transparent to program execution. The following sections describe each of these
units and give all necessary programming information.
5.1Instruction Cache (Icache)
The SA-1110 contains a 16 Kbyte instruction cache (Icache). The Icache has 512 lines of 32 bytes
(8 words), arranged as a 32-way set associative cache, and uses the virtual addresses generated by
the processor core. The Icache is always reloaded a line at a time (8 words). It may be enabled or
disabled via the SA-1110 control register, and is disabled on the assertion of nRESET or through a
software or sleep reset sequence. (See Chapter 9, “System Control Module” for details.) The
operation of the cache, when memory management is enabled, is further controlled by the
cacheable or C bit stored in the memory-management page table. If memory management is
disabled, all addresses are marked as cacheable (C=1). When memory management is enabled, the
C bit in each page table entry can disable caching for an area of virtual memory.
5.1.1Icache Operation
In the SA-1110, the instruction cache is searched regardless of the state of the C bit; only reads that
miss the cache are affected. If, on an Icache miss, the C bit is a one or the Memory Management
Unit (MMU) is disabled, a line fetch of 8 words is performed and it is placed in a cache bank with
a round-robin replacement algorithm. If, on a miss, the MMU is enabled and the C bit is a zero for
the given virtual address, an external memory access for a single word is performed and the cache
is not written.The Icache should be enabled as soon as possible after reset for best performance.
5.1.2Icache Validity
The Icache operates with virtual addresses, so care must be taken to ensure that its contents remain
consistent with the virtual-to-physical mappings performed by the memory management u nit. If the
memory mappings are changed, the Icache validity must be ensured. The Icache is not coherent
with stores to memory, so programs that write cacheable instruction locations must ensure the
Icache validity. Instruction fetches do not check the write buffer, so data must not only be pushed
out of the cache but the write buffer must also be drained.
5.1.2.1Software Icache Flush
The entire Icache can be invalidated by writing to the SA-1110 cache operations register (register
7). The cache is flushed immediately when the register is written, but note that the following
instruction fetches may come from the cache before the register is written.
SA-1110 Developer’s Manual47
Caches, Write Buffer, and Read Buffer
5.1.3Icache Enable/Disable and Reset
The Icache is automatically disabled and flushed on the assertion of nRESET. Once enabled,
cacheable read accesses cause lines to be placed in the cache. If the Icache is subsequently
disabled, no new lines are placed in the cache, but the cache is still searched and if the data is
found, it will be used by the processor. If the data in the cache must not be used, then the cache
must be flushed.
5.1.3.1Enabling the Icache
To enable the Icache, set bit 12 in the control register. The MMU and Icache may be enabled
simultaneously with a single control register write.
5.1.3.2Disabling the Icache
To disable the Icache, clear bit 12 in the control r egister.
5.2Data Caches (Dcaches)
The SA-1110 contains two logically separate data caches: the main data cache and the mini data
cache (or minicache). The main data cache, an 8 Kbyte write-back Dcache, has 256 lines of 32
bytes (8words) in a 32-way set-associative organization. It is intended for use during most data
accesses. This cache allocates on loads to spaces marked B=1 and C=1. Replacements in the main
data cache are selected according to a set of round-robin pointers. At reset, the pointer in each
block of the Dcache points to way zero of each 32-way block. As lines are allocated, the pointers
are incremented to the next way of the set. After way 31 is allocated, the next line fill replaces (and
copies back to memory, if dirty) the data in way zero. The m inicache is a 512-byte write-back
cache. It has 16 lines of 32 bytes (8 words) in a two-way set-associative organization and provides
an alternate caching structure for dealing with large data structures that could thrash the main data
cache. This cache allocates on loads to spaces marked B=0 and C=1. Unlike the main data cache,
the minicache implements a least-recently-used (LRU) replacement algorithm.
The Dcaches are accessed in parallel and the design ensures that a p articul ar line entry will exist in
only one of the two at any time. Both Dcaches use the virtual address generated by the processor
and allocate only on loads (write misses never allocate in the cache). Each line entry contains the
physical address of the line and two dirty bits. The dirty bits indicate the status of the first and the
second halves of the line. When a store hits in the Dcaches, the dirty bit associated with it is set.
When a line is evicted from the Dcaches, the dirty bits are used to decide if all, half, or none of the
line will be written back to memory using the physical address stored with the line. The Dcaches
are always reloaded a line at a time (8 words).
The Dcaches allocate only on loads and according to the settings of the B and C bits in the MMU.
If B=0 and C=1, the memory access allocates into the minicache. If B=1 and C=1, the memory
access allocates into the main data cache. The Dcaches should be flushed prior to changing the
bufferable and/or cacheable state of the page table mapping.
The main data cache and the minicache are enabled and disabled via the SA-1110 control register,
and are disabled on nRESET as well as software, sleep, and watchdog reset. The operation of the
Dcaches is further controlled by the cacheable or C bit and the bufferable or B bit stored in the
memory-management page table. For this reason, to use the Dcaches, the MMU must be enabled.
The two functions may be enabled simultaneously with a single write to the control register.
48SA-1110 Developer’s Manual
Note: The Dcaches operate with virtual addresses, so care must be taken to ensure that their contents
remain consistent with the virtual-to-physical mappings performed by the memory-management
unit. If the memory mappings are changed, the validity of the Dcaches must be ensured.
5.2.1Cacheable Bit – C
The cacheable bit determines whether, on load misses, the data being read should be placed in one
of the two data caches. Cache hits are not affected by the cacheable bit; if a data access hits in the
cache, the data is assumed to be valid and the load or store is p erformed. Typically, main m emory i s
marked as cacheable to improve system performance and I/O space as noncacheable to stop the
data from being stored in SA-1110's cache. For example, if the processor is polling a hardware flag
in I/O space, it is important that the processor is forced to read data from the external peripheral,
and not a copy of initial data held in the cache.
5.2.1.1Cacheable Reads – C=1
A linefetch of 8 words will be performed and it wi ll be placed in a cache b ank with a round-robin
replacement algorithm.
5.2.1.2Noncacheable Reads – C=0
Caches, Write Buffer, and Read Buffer
An external memory access will be performed and the cache will not be written.
5.2.2Bufferable Bit – B
The bufferable bit does not affect writes that hit the Dcaches. If a store hits i n the Dcaches, the s tore
is assumed to be bufferable. Write-backs of dirty lines are treated as bufferable writes. See the
Section 5.3, “Write Buffer (WB)” on page 5-51 for more information on the B bit.
Table 5-1 summarizes the effects of the B and C bits on the Dcaches.
T a ble 5-1.Effects of the Cacheable and Bufferable Bits on the Data Caches
LoadStore
BC
00Deliver cache data.Load from memo ry.
01Deliver cache data.Allocate to minicache.Store to either cache.
10Deliver cache data.Load from memo ry.
11Deliver cache data.Allocate to main data cache. Store to either cache.
Cache HitCache MissCache HitCache Miss
– No allocate.
– No allocate.
Store to either cache.
– Mark line dirty.
– Mark line dirty.
Store to either cache.
– Mark line dirty.
– Mark line dirty.
Store to memory.
– No allocate.
Store to memory.
– No allocate.
Store to memory.
– No allocate.
Store to memory.
– No allocate.
SA-1110 Developer’s Manual49
Caches, Write Buffer, and Read Buffer
5.2.3Software Dcache Flush
The SA-1110 supports the flush and clean operations on single entries of the Dcaches by writes to
the cache operations registers. The flush whole cache is also supported. Note that since this is a
write-back cache, to prevent the loss of data, a flush whole must be preceded by a sequence of
loads to cause the cache to write back any dirty entries. The memory controller in the SA-1110
provides an internally decoded memory space to perform coherent Dcache flushing. This space
resides in the upper 512 megabytes of the memory map (starting at virtual address
0hE000 0000) and, when accessed, is detected by the memory controller, which then returns zeros
without incurring an external memory latency.
The following code causes the main data cache to flush all dirty entries:
;+
;Call:
; R0 points to the start of a 8192 byte region of readable data used
A similar routine may be written to flush the minicache. To perform this flush, the MMU B and C
settings must be as described above. The invalidate-all operation also invalidates the minicache.
5.2.3.1Doubly Mapped Space
Since the Dcaches work with virtual addresses, it is assumed that every virtual address maps to a
different physical address. If the same physical location is accessed by more than one virtual
address, the cache cannot maintain consistency, since each virtual address has a separate entry in
the cache, and only one entry is updated on a processor write operation. To avoid any cache
inconsistencies, doubly mapped virtual addresses should be m arked as noncacheable.
5.2.4Dcaches Enable/Disable and Reset
The Dcaches are automatically disabled and f lushed on the assertion of nRESET. Once enabled,
cacheable read accesses cause lines to be placed in the Dcaches. If subsequently disabled, no new
lines are placed in the Dcaches, but they are still searched and if the data is found, it is used by the
processor. Write operations continue to update the Dcaches, thus m aint aining consistency with the
external memory. If the data in the Dcaches must not be used, then the Dcaches must be flushed.
50SA-1110 Developer’s Manual
5.2.4.1Enabling the Dcaches
To enable the Dcaches, make sure that the MMU is enabled first by setting bit 0 in the control
register,then enable the Dcaches by s e tting bit 2 in the control register. The MMU and Dcaches can
be enabled simultaneously with a single control register write.
5.2.4.2Disabling the Dcaches
To disable t he Dcache, clear bit 2 in the control register.
5.3Write Buffer (WB)
The SA-1110 write buffer is used to improve system performance by buffering up to 8 blocks of
data of 1 to 16 bytes, at independent addresses. It can be enabled or disabled via the W bit (bit 3) in
the SA-1110 control register. The buffer is disabled and all entries are marked empty fol lowing
reset. Operation of the write buffer is further controlled by the cacheable or C bit and the
bufferable or B bit, which are stored in the memory-management page tables. For this reason, to
use the write buffer, the MMU must be enabled. The two functions can be enabled simultaneously
with a single write to the control register. For a write to use the write buffer, both the W bit in the
control register and the B bit in the corresponding page table must b e set. It is not possible to abort
buffered writes externally. Stores will not merge with other data at the same line address in the
write buffer with the exception of store multiples, which do merge.
Caches, Write Buffer, and Read Buffer
5.3.1Bufferable Bit
This bit controls whether a write operation may use the write buffer. Typically, main memory is
bufferable and I/O space unbufferable.
5.3.2Write Buffer Operation
When the CPU performs a store, the Dcaches are first checked. If one of the Dcaches hits on the
store and the protection for the location and mode of the store allows the write, then the write
completes in the Dcaches and the write buffer is not used. If the location misses in the Dcaches,
then the translation entry for that address is inspected and the state of the B and C bits determines
which of the three following actions are performed. If the write buffer is disabled via the SA-1110
control register, writes are treated as if the B bit is a zero.
5.3.2.1Writes to a Bufferable and Cacheable Location (B=1,C=1)
If the write buffer is enabled and the processor performs a write to a bufferable and cacheable
location, and the data is in one of the caches, then the data is written to that cache, and the cache
line is marked dirty. If a write to a bufferable area misses in both data caches, the data is placed in
the write buffer and the CPU continues execution. The write buffer performs the external write
sometime later. If a write is performed and the write buffer is full, then the processor is stalled until
there is sufficient space in the buffer. No write buffer merging is allowed in the SA-1110 except
during store multiples.
SA-1110 Developer’s Manual51
Caches, Write Buffer, and Read Buffer
5.3.2.2Writes to a Bufferable and Noncacheable Location (B=1,C=0)
If the write buffer is enabled and the processor performs a write to a bufferable but noncacheable
location and misses in the Dcaches, the data is placed in the write buffer and the C PU continues
execution. The write buffer performs the external write sometime later. Store multiples are not
merged in the write buffer when B = 1, C = 0.
5.3.2.3Unbufferable and Noncacheable Writes (B=0, C=0)
If the write buffer is disabled or the CPU performs a write to an unbufferable area, the processor is
stalled until the write buffer empties and the write completes externally. This requires several
external clock cycles.
5.3.2.4Writes to a Non-Bufferable and Cacheable Location (B=0, C=1)
When store multiples occur to a page that is cacheable but not b uffereable (B=0,C=1), the write
data will be merged into the write buffer and burst writes will occur to memory.
5.3.3Enabling the Write Buffer
To enable the write buffer, ensure that the MMU is enabled by setting bit 0 in the control register,
then enable the write buffer by setting bit 3 in the control regis ter. The MMU and write buffer can
be enabled simultaneously with a single write to the control register.
5.3.3.1Disabling the Write Buffer
Todisable the write buffer,clear bit 3 in the control register. Any writes already in the write buffer
will complete normally,but a drain write buffer needs to be done to force all writes out to memory.
Note: The write buffer is used to hold dirty copy-back cached lines from the data cache. It must be
enabled along with the data cache.
5.4Read Buffer (RB)
The SA-1110 contains a software-programmable read buffer that can increase the performance of
critical loop code by prefetching data. The RB enables the preallocation of read-only data into one
of four 32-byte buffers without stalling the pipe. For subsequent loads that hit in the RB, data is
sourced from the buffer instead of the Dcaches at a rate of 1 word per core clock (as long as the
load address hits in the TLB of the DMMU). Also, because the programmer specifies which entry
of the RB is used, critical data can be “locked” in to eliminate bus latency.
The RB is controlled using coprocessor 15, register 9, and provides the capability to allocate 1
word, a half-line (4 words), or a full line (8 words) into one of four entries of the RB. (See
Chapter 6, “Coprocessors” for a detailed RB coprocessor description.) Half-line loads are
automatically aligned onto half-block boundaries (the lower four address bits are ignored).
Full-line loads are automatically aligned onto line boundaries (the lower five address bits are
ignored). For partial cache line RB loads, only the words actually fetched are marked valid and can
be sourced from the buffer.A small queue is used to ensure that subsequent RB load instructions go
out in order.
52SA-1110 Developer’s Manual
Caches, Write Buffer, and Read Buffer
When an RB allocate instruction is executed, the virtual address is looked up in the TB to check for
a translation hit and possible access violations. If the access mis ses in the TB, the pipe is stalled
until the page is fetched through the normal hardware tablewalk mechanism. If an access violation
occurs, the RB load is NOP’d. For example, an RB allocate instruction can generate a data abort.
Once the RB allocate has received a TB hit and no access violations, a bus access is requested that
fills the appropriate buffer without stalling the core pipeline. Subsequent load instructions to this
virtual address result in an RB hit and data is sourced from the appropriate entry to the core.
Any two data words with the same virtual address may not be contained in the RB at the same time.
If an RB allocate references a data word that is already contained in another RB entry, then the old
RB entry is invalidated and the new allocation is performed. It is possible for a portion of a cache
block at a given virtual address to be contained in one RB entry while another portion of the same
block is contained in another RB entry. However, a given word can not be in more than one entry at
a time.
If a load instruction misses in the RB, then a normal cache fill is performed (provided the cache is
enabled and the page is marked cacheable). It then presents the possibility of having a partial line
resident in the RB as well as having the line present in one of the Dcaches. This presents coherency
issues that must be managed by software. If this situation does occur and the addressed data is in
both the Dcache and the RB, then the data is sourced from the RB. If an RB entry contains a partial
cache block (1 or 4 words), then those words will be sourced from the RB while the remaining
words are sourced from the data cache or memory.
RB allocate instructions are not affected by the cache enable bit (bit 2 in the control register) or by
the C bit in the MMU. Any RB allocate to a valid RB entry causes that RB entry to be invalidated,
followed by a new allocation for the desired data. This occurs regardless of the address of the data
currently in the buffer. For example, back-to-back RB allocate instructions to the same entry at the
same address will invalidate the entry caused by the first instruction prior to performing the second
fill.
An RB allocate or a load instruction that is issued to an RB entry currently being filled will stall
until the fill completes. If a data abort is signaled on a read buffer allocate, the fill completes. After
that, if a load to that entry is attempted, a data abort exception is issued. The coprocessor 15
register provides the ability to invalidate individual entries in the RB or to invalidate the entire
buffer in one operation. RB coherency must be managed in software. Writes to addresses present in
the read buffer are not w ritten into the buffer. Specific RB entries must be invalidated before
writing to the addresses or changing the page tables of the entries. Coherency is not checked
between the RB and the WB. The WB should be drained prior to performing an RB load.
Note: The write buffer must be flushed prior to loading the read buffer to maintain coherency between the
two buffers. But, if user-mode MCR access is enabled for the read buffer and the flush is attempted
while in user mode, an undefined instruction exception will occur. In this case, the exception
handler must perform the write buffer flush, then return to user mode to execute the read buffer
load. Alternatively, an SWI instruction can be used as a service call to flush the write buffer.
SA-1110 Developer’s Manual53
Coprocessors6
The operation and configuration of the Intel®StrongARM*SA-1110 Microprocessor (SA-1110) is
controlled with coprocessor instructions, configuration pins, and memory-management page
tables. The coprocessor 15 instructions manipulate on-chip registers that control the configuration
of the cache, write buffer, MMU, read buffer, breakpoints, and other configuration options.
Note: The gray areas in the register and translation diagrams are reserved and s hould be programmed 0
for future compatibility.
6.1Internal Coprocessor Instructions
The on-chip cache, MMU, w rite buffer, and read buffers are controlled using MRC instructions and
MCR instructions. These operations to coprocessor 15 are allowed only in nonuser modes except
when read-buffer operations are explicitly enabled. The undefined instruction trap is taken if
accesses are attempted in user mode. Figure 6-1 shows the format of internal coprocessor
instructions MRC and MCR.
Note: The write buffer must be flushed prior to loading the read buffer to maintain coherency between the
two buffers. But, if user-mode MCR access is enabled for the read buffer and the flush is attempted
while in user mode, an undefined instruction exception will occur. In this case, the exception
handler must perform the write buffer flush, then return to user mode to execute the read buffer
load. Alternatively, an SWI instruction can be used as a service call to flush the write buffer."
Figure 6-1.Format of Internal Coprocessor Instructions MRC and MCR
CRnSA-1110 register
RdARM register
OPC_2Function bits for some MRC/MCR instructions
CRmFunction bits for some MRC/MCR instructions
nCRnRd1
0MCRregisterwrite
111
OPC_2
1CRm
SA-1110 Developer’s Manual55
Coprocessors
6.2Coprocessor 15 Definition
The SA-1110 coprocessor 15 contains registers that control the cache, MMU, and write buffer
operation as well as some clocking functions. These registers are accessed using CPRT instructions
to coprocessor 15 with the processor in any privileged mode. Only some of registers 0–15 are
valid; the result of an access to an invalid register is unpredictable. Table 6-1 lists the coprocessor
15 control registers.
Table 6-1.Cache and MMU Control Registers (Coprocessor 15)
RegisterRegister ReadsRegister Writes
0ID
1
2
3
4
5
6
7
8
9
10..12RESERVEDRESERVED
13Read process ID (PID)Write process ID (PID)
14Read breakpointWrite breakpoint
15RESERVEDTest, clock, and idle
ControlControl
Translation table baseTranslation table base
Domain access controlDomain access control
RESERVEDRESERVED
Fault statusFault status
Fault addressFault address
RESERVEDCache operations
RESERVEDTLB operations
RESERVEDRead buffer operations
6.2.1Register 0 – ID
Register 0 is a read-only register that returns an architecture and implementation-defined
identification for the device.
Register 1 is a read/write register containing control bits. All writable bits in this register are forced
low by reset. The shaded bits (also labeled r) are reserved and are not readable or w ritable..
0 – On-chip memory-management unit disabled
1 – On-chip memory- management unit enabled
Address fault enable/disable
0 – Alignment fault disab led
1 – Alignment fault enabled
Data cache enable/disable
0 – Data cache disabled
1 – Data cache enabled
Write buffer enable/disable
0 – Write buffer disabled
1 – Write buffer enabled
32-bit/26-bit exception handlers.
Should always be 1.
32-bit/26-bit Data address range.
Should always be 1.
Implementation defined.
Should always be 1.
Big/little endian
0 – Little endian operat ion
1 – Big endian operation
System
This bit selects the access checks performed by the memory-management unit.
See the ARM Architecture Reference for more information.
ROM
This bit selects the access checks performed by the memory-management unit.
See the ARM Architecture Reference for more information.
Unused.
Undefined on Read. Writes ignored.
Instruction cache enable/disable
0 – Instruction cac he disabled
1 – Instruction cac he enabled
0 – Base address of interrupt vectors is 0h0000 0000
1 – Base address of interrupt vectors is 0hFFFF 0000
Unused.
Undefined on Read. Writes ignored.
XI
6.2.3Register 2 – Translation Table Base
Register 2 is a read/write register that holds the base of the currently active level 1 page table. Bits
[13:0] are undefined on read, ignored on write.
Register 3 is a read/write register that holds the current access control for domains 0 to 15. Refer to
the ARM Architecture Reference for a description of the domain structure.
Accessing register 4 may yield unpredictable results.
6.2.6Register 5 – Fault Status
Reading register 5 returns the current contents of the fault status register (FSR). The FSR is written
when a data memor y fault occurs or can be written by an MCR to the FSR. It is not updated for a
prefetch fault. See Chapter 7, “Memory Management Unit (MMU)” for more details. Bits [31:10]
are undefined on read, ignored on write. Bit 9 is set when a data breakpoint is taken and can be
cleared by an MCR operation. Bit 8 is ignored on write and is always returned as zero. Refer to the
ARM Architecture Reference for a description of the domain and status fields.
Reading register 6 returns the current contents of the fault address register (FAR). The FAR is
written when a data memory fault occurs with the virtual address of the data fault or can be written
by an MCR to the FAR.
Register 7 is a write-only register. The C Rm and OPC_2 fields are used to encode the cache control
operations. Operation for all other values for OPC_2 and CRm is unpredictable.
Flush D single entry0b0010b0110Virtual address
Clean Dcache entry0b0010b1010Virtual address
Drain write buffer0b1000b1010Ignored
Note: The write buffer must be flushed prior to loading the read buffer to maintain coherency between the
two buffers. But, if user-mode MCR access is enabled for the read buffer and the flush i s attempted
while in user mode, an undefined instruction exception will occur. In this case, the exception
handler must perform the write buffer flush, then return to user mode to execute the read buffer
load. Alternatively, an SWI instruction can be used as a service call to flush the write buffer.
6.2.9Register 8 – TLB Operations
Register 8 i s a write-only register. The CRm and OPC_2 fields are used to encode the following
TLB flush operations. Operation for all other values of OPC_2 and CRm is unpredictable.
FunctionO P C_2CRmData
Flush I+D0b0000b0111Ignored
Flush I0b0000b0101Ignored
Flush D0b0000b0110Ignored
Flush D single entry0b0010b0110Virtual address
6.2.10Register 9 – Read-Buffer Operations
The read buffer is controlled and accessed through register 9 of coprocessor 15. The functions
supported are: flush-all buffers, flush-a-single entry, load-an-entry (1, 4 or 8 words), and
enable/disable user mode access.
The CRm and OPC_2 fields are used to encode these control operations. All other values for
OPC_2 and CRm are undefined and the results of using them are unpredictable.
FunctionOPC_2CRmData
Flush all entries0b0000b0000Ignored
Flush Buffer 00b0010b0000Ignored
Flush Buffer 10b0010b0001Ignored
Flush Buffer 20b0010b0010Ignored
Flush Buffer 30b0010b0011Ignored
Load Buffer 0 with one word0b0100b0000Virtualaddress
Load Buffer 0 with four words0b0100b0100Virtual address
Load Buffer 0 with eight words0b0100b1000Virtual address
Load Buffer 1 with one word0b0100b0001Virtualaddress
Load Buffer 1 with four words0b0100b0101Virtual address
Load Buffer 1 with eight words0b0100b1001Virtual address
60SA-1110 Developer’s Manual
Coprocessors
FunctionOPC_2CRmData
Load Buffer 2 with one word0b0100b0010Virtual address
Load Buffer 2 with four words0b0100b0110Virtual address
Load Buffer 2 with eight words0b0100b1010Virtual address
Load Buffer 3 with one word0b0100b0011Virtual address
Load Buffer 3 with four words0b0100b0111Virtual address
Load Buffer 3 with eight words0b0100b1011Virtual address
Disable user-mode MCR access0b1000b0000Ignored
Enable user-mode MCR access0b1010b0000Ignored
See Chapter 5, “Caches, Write Buffer, and Read Buffer” for details on the use and operation of the
read buffer.
Note: The write buffer must be flushed prior to loading the read buffer to maintain coherency between the
two buffers. But, if user-mode MCR access is enabled for the read buffer and the flush is attempted
while in user mode, an undefined instruction exception will occur. In this case, the exception
handler must perform the write buffer flush, then return to user mode to execute the read buffer
load. Alternatively, an SWI instruction can be used as a service call to flush the write buffer.
6.2.11Registers 10 – 12 RESERVED
Accessing registers 10 – 12 may yield unpredictable results.
6.2.12Register 13 – Process ID Virtual Address Mapping
The SA-1110supports the remapping of virtual addresses through a process ID (PID) register. The
6-bit PID value is OR’ed with bits 30..25 of the virtual address when bits 31..25 of the virtual
address are zero. This effectively remaps the address to one of 64 “slots” in the lower 2 Gbyte
address space. The following table shows the OPC_2 and CRm field encodings used t o access the
process ID register.This register is zero at reset and if left unmodified, effectively disables the
remapping function. As such, no explicit enable or disable f unction is necessary. Reserved bits read
as zero and must be written as zero. This register is readable and writable.
FunctionOP C_2CRm
Access process ID register0b0000b0000
The following figure shows the format of the process ID register.
The SA-1110 supports address and data breakpoints through register 14 of coprocessor 15. The
instruction formats follow. For a description of the breakpoint operation, see Chapter 15, “Debug
Support”. The following table shows the OPC_2 and CRm field encodings used to access the
address and data breakpoints.
The DBAR, DBVR, DBMR and DBCR registers are Read/Write registers. The IBCR is a
Write-Only register.
FunctionOPC_2CRm
Access data breakpoint address register (DBAR).0b0000b0000
Access data breakpoint value register (DBVR).0b0000b0001
Access data breakpoint mask register (DBMR).0b0000b0010
Load data breakpoint control register (DBCR).0b0000b0011
Write instruction breakpoint address and control register (IBCR).0b0000b1000
The DBCR register is a 3-bit register used to control the enabling and disabling of the data
breakpoints. Bits 0..2 are valid and positioned as shown below. Bits 3..31 are reserved. These bits
read as zeros and writes have no effect.
0 – Disable store address watch
1 – Enable store address watch
Store data watch
0 – Disable store data watch
1 – Enable store data watch
(DBCR)
Reserved
Read/Write
saw
sdw
The IBCR is a write-only register used to load an address breakpoint address and to set an enable
bit for the function. If an address is loaded with bit 0 (E) set, then the address is enabled as a
breakpoint. If bit zero is cleared, then the breakpoint is disabled. Bit 1 is reserved and should be
written to zero.
0 – Disable
1 – Enable
Reserved.
Should be written as zero.
6.2.14Register 15 – Test, Clock, and Idle Control
Register 15 is a write-only register. The CRm and OPC_2 fields are used to encode the following
control operations. Operation for all other values of OPC_2 and CRm is unpredictable.
E
Reserved
SA-1110 Developer’s Manual63
Coprocessors
FunctionOPC_2CRm
Enable odd-word loading of the linear feedback shift
register ( LFSR)
Enable even-word loading of LFSR0b0010b0010
Clear LFSR0b0010b0100
Move LFSR to R14.abort0b0010b1000
Enable clock switching0b0100b0001
Disable clock switching0b0100b0010
RESERVED0b0100b0100
Wait for interrupt0b0100b1000
0b0010b0001
64SA-1110 Developer’s Manual
Memory Management Unit (MMU)7
This chapter describes the memory management functions.
7.1Overview
The Intel®StrongARM*SA-1110 Microprocessor (SA-1110) implements the standard ARM
memory-management functions using two 32-entry fully associative translation buffers (TBs). One
is used for instruction accesses and the other for data accesses. On a TB miss, the translation table
hardware is invoked to retrieve the translation and access permission information. Once retrieved,
if the entry maps to a valid page or section, then the information is placed into the TB. The
replacement algorithm in the TB is round robin. For an invalid page or section, an abort is
generated and the entry is not placed in the TB.
7.1.1MMU Registers
See Section 6.2, “Coprocessor 15 Definition” on page 6-56 foradescriptionoftheMemory
Management Unit (MMU) coprocessor 15 registers supported by the SA-1110.
7.2MMU Faults and CPU Aborts
The MMU generates four faults:
• Alignment fault
• Translation fault
• Domain fault
• Permission fault
*
Alignment faults are generated by word l oads or stores with the low-order two address bits
nonzero, and by load or store half words when the low-order address bit is a one. Translation faults
are generated by access to pages marked invalid by the memory-management page tables. Domain
faults and permission faults are generated by accesses to memory that are protected by the current
mode, domain, and page protection. See the ARM Architecture Reference for more information. In
addition, an external abort may be raised on external data accesses.
7.3Data Aborts
The SA-1110 takes a data abort exception due to: MMU-generated exceptions, accessing reserved
memory space.
SA-1110 Developer’s Manual65
Memory Management Unit (MMU)
7.3.1Cacheable Reads (Linefetches)
A linefetch can be safely aborted on any word in the transfer. If an abort occurs during the
linefetch, the cache is purged so it will not contain invalid data. If the abort happens before the
word that was requested by the access is returned, the load is aborted. If the abort happens after the
word that was requested by the access is returned, the load completes and the fill is aborted (but no
exception is generated).
7.3.2Buffered Writes
Buffered writes cannot be externally aborted. Therefore, the system should be configured such that it
does not perform buffered writes to areas of memory that are capable of flagging an external abort.
7.4Interaction of the MMU, Icache, Dcache, and Write
Buffer
The MMU, Icache, Dcache, and WB can be enabled or disabled independently. The Icache can be
enabled with the MMU enabled or disabled. However, the Dcache and WB can only be enabled
when the MMU is enabled. Because the write buffer is used to hold dirty copy-back cached lines
from the Dcache, it must be enabled along with the Dcache. Therefore, only four of the eight
combinations of the MMU, Dcache, and WB enables are valid. There are no hardware interlocks
on these restrictions, so invalid combinations will cause undefined results.
Table 7-1.Valid MMU, Dcache, and Write Buffer Combinations
MMUDcacheWrite Buffer
OffOffOff
OnOffOff
OnOffOn
OnOnOn
The following procedures must be observed.
To enable the MMU:
1. Program the translation table base and domain access control registers.
2. P r ogram level 1 and level 2 page tables as required.
3. Enable the MMU by setting bit 0 in the control register.
66SA-1110 Developer’s Manual
Memory Management Unit (MMU)
Note: Care must be taken if the translated address differs from the untranslated address because the three
instructions following the enabling of the MMU will have been fetched using “flat translation”, and
enabling the MMU may be considered a branch with delayed execution. A similar situation occurs
when the MMU is disabled. Consider the following code sequence:
1. Disable the WB by clearing bit 3 in the control register.
2. Disable the Dcache by clearing bit 2 in the control register.
3. Disable the Icache by clearing bit 12 in the control register.
4. Disable the MMU by clearing bit 0 in the control register.
Note: If the MMU is disabled and subsequently reenabled, the contents of the TB is preserved. If the
contents are now invalid, the TB should be flushed before reenabling the MMU.
7.5Mini Data Cache
The mini data cache is a 16-entry, 2-way set-associative data cache. It is accessed in parallel with
the main data cache. A data reference is allocated into the mini data cache if the B and C bits in
the MMU are 0 and 1, respectively. A line of data can reside only in one of the two Dcaches at any
one time. BothDcaches must be flushed prior to any page table manipulation that could change the
allocation policy.
SA-1110 Developer’s Manual67
Clocks8
This section describes the Intel®StrongARM*SA-1110 Microprocessor (SA-1110) clocks. The
following diagram shows the distribution of clocks in the SA-1110. The 3.6864-MHz oscillator
feeds both PLLs. The primary PLL provides clocks for the core logic and a 7.36-MHz clock for
several of the serial controllers. The core, Dcaches, and read and write buffers use either the
full-speed core clock or the divided-down clock. The LCD controller, DMA, memory controller,
and GPIO use the core clock divided by 2 (RCLK). The 32.768-kHz oscillator feeds the real-time
clock (RTC)and the power manager logic. The secondary PLL provides the clock for the UDC, the
ICP, and the MCP. The oscillators and PLLs are completely integrated with the SA-1110 and
require no external devices other than the crystals for operation.The following figure shows a block
diagram of the clocking system for the SA-1110.
Figure 8-1.SA-1110 Clock System Block Diagram
Intel® ARM*
SA-1 Core
Divide
32.768 kHz
Oscillator
3.6864 MHz
Oscillator
by 2
Primary PLL
59 MHz - 200 MHz
I-Cache
D-Cache
Write Buffer
Read Buffer
Memory
Controller
GPIO 27
Secondary PLL
48 MHz
RTC and Power
Manager
Peripherals
UART: 7.36 MHz
ICP: 7.36 or 48 MHz
MCP/SSP: 7.36 or 12 MHz
PPC: 7.36 MHz
UDC: 48 MHz
LCD
Controller
DMA
Controller
8.1Intel®StrongARM SA-1110 Crystal Oscillators
The SA-1110 clocks are derived from two crystals connected to on–chip oscillators. The first clock
source is a 3.6864-MHz crystal that feeds the CPU PLL and the 48-MHz PLL. The CPU PLL
multiplies the oscillator output up to the core frequency. This frequency is then divided down to
generate baud rates for the serial ports. If the UARTs are not being used or do not need standard
I/O
Controller
A8054-01
SA-1110 Developer’s Manual69
Clocks
baud rates, then the 3.6864 -Hz oscillator may be replaced with a 3.5795-MHz crystal to generate
frequencies as shown in Table 8-1.The second oscillator is connected to a 32.768-kHz crystal. The
output of this oscillator clocks the power management controller and the real-time clock (RTC).
See Appendix B, “3.6864–MHz Oscillator Specifications” and Appendix C, “32.768–KHz
Oscillator Specifications” for detailed specifications of the crystal oscillators.
8.2Core Clock Configuration Register
The core clock frequency is configured by software through the core cl ock configuration field
(CCF[4:0]) in the power manager phase-locked loop (PLL) configuration register (PPCR). This
field should be programmed during the boot sequence for the desired full-speed operation.
nRESET clears the field by selecting the lowest frequency operation.
See Section 9.5, “Power Manager” on page 9-99 for the physical address used to access this
register.
Table 8-1 shows the core clock frequency as a function of the CCF setting.
The actual core clock (DCLK) can switch between being driven by the high speed core clock
(CCLK, set by CCF[4:0]) and the memory clock (MCLK), which runs at half the frequency of
CCLK. CCLK is used except when the SA-1110 is wait ing for fills to complete after a cache miss.
At reset, clock switching is disabled and the DCLK is driven by MCLK. Clock switching can also
be disabled by writing to CP15 register 15 with OPC_2 = 2 and CRm = 2 (see Section 6.2.14).
Clock switching is enabled by writing to CP15 register 15 with OPC_2 = 2 and CRm = 1.
Disabling clock switching only disables switching for DCLK; it does not force the DCLK to
MCLK. However, DCLK can be forced to MCLK by forcing an instruction or data cache miss after
clock switching is disabled.
70SA-1110 Developer’s Manual
Clocks
8.2.1Restrictions on Changing the Core Clock Configuration
When the CPU writes to the PPCR, the core clock PLL and the 48-MHz PLL are stopped for a
period of time to allow the core clock PLL to relock to the new frequency. When these PLLs are
stopped, the core clock and all clocks derived from that clock are stopped. When this happens,
certain units within the SA-1110 (the LCD controller, all serial controllers, the DMA controller,
and the OS timer) will experience an interruption in operation for approximately 150 microseconds
after the PPCR is written.
Because of these restrictions, it is recommended that the user not change the PPCR except
immediately following a hard reset or immediately following wake-up from sleep mode. The LCD
controller, all ser ial controllers (except the UDC), the DMA controller, and the OS timer are
already disabled and are not affected by an interruption in their clock stream. In addition to these
restrictions, the PPCR must be written prior to enabling clock switching. Note that the 32.768-kHz
clock is not affected by any change in the PPCR and units using this clock (power management,
RTC) do not see any interruption in service during the 150 microsecond period.
8.3DrivingIntel®StrongARM SA-1110 Crystal Pins from
an External Source
In most applications, a 3.6864-MHz crystal will be connected between the PXTAL and the
PEXTAL pins. Similarly, a 32.768-kHz crystal will be connected between the TXTAL and
TEXTAL pins. In some applications, supplying these clocks from an external source may be
preferred. This is accommodated in the SA-1110 design by:
• Supplying the 32.768-kHz clock from an external source
— Only the TXTAL pin is driven. The TEXTAL pin must be left floating.
— The peak-to-peak voltage swing on TXTAL must be at least 0.6 V and the voltage on the
pin must remain within the range of 0 V to 1 V, independent of the other power supply
voltages applied to the processor.
• Supplying a 3.6864-MHz clock from an external source
— Both PXTAL and PEXTAL are driven with complementary signals.
— The peak-to-peak voltage swing on PXTAL and PEXTAL must be at least 0.6 V and the
voltage on the pin must remain in the range of 0 V to 1 V, independent of the other power
supply voltages applied to the processor.
— When an external clock is being used, the pull-down path in the i nternal 3.6864 MHz
oscillator is active. To limit the current into the internal oscillator, it is recommended that
the minimum impedance to the positive supply be controlled. The maximum current
sourced by the external clock source when the clock is at its maximum positive voltage
should be about 1 mA.
— The maximum impedance of the external clock source is set by the minimum slew rate at
the PXTAL and PEXTAL pins, approximately 1 V per 100 ns.
†
These constraints can be satisfied by the following suggestions:
†
†
†
• For applications in which a pulse generator is available, drive differential 1-V signals through
series 1-K resistors (after the usual 50-ohm terminators-to-ground).
SA-1110 Developer’s Manual71
Clocks
• To supply external clock s ignals from a 3.3-V supply, drive signals with open collector or
tristateable drivers. Set high lev el with 3.3 K from 3.3 V to the output and 1.3 K from the
output to ground.
• To supply external clock s ignals from a 1.5-V supply, drive signals with open collector or
tristatable drivers. Set high level with 1.5 K from 1.5 V to the output and 2.7 K from output to
ground. This solution may be preferred in portable applications that turn off the 1.5-V supply
in sleep mode because this would eliminate the current through the resistors in sleep mode.
The two pairs of crystal pins are located close to each other on the processor. This arrangement is
advantageous when there are crystals connected to the pins because the low signal swings and slow
edges result in limited noise coupling between the pins. If one of the crystals is replaced by an
independent signal source and the other is not, some degradation of the remaining crystal oscillator
performance can result due to increased noise coupling. If only one crystal is being used, this effect
can be reduced by limiting the speed of the edge rate on the pin driven by the independent source.
If the PXTAL or TXTAL pin is driven above the voltage indicated, there will be no permanent
damage to the processor for pin voltages less than 2.5 V. However, ESD diodes on these pins will
attempt to clamp the voltage at approximately 1.5 V. The clamping action results in significant
noise injected into an internally generated supply used by several sensitive circuits on the
processor. Consequently, driving this pin higher than the 1 V limit can result i n unpredictable
operation not obviously connected with the crystal pins. It is advised to not drive the crystal pins
higher than 1 V even if there is no obvious side effect.
Note: In every system, there must be a provision for both a 3.6864-MHz and a 32.768-kHz source either
from an external oscillator or a crystal.
8.4Clocking During Test
If TCK_BYP is high, then the PLLs and oscillators are not used and the high-speed core clock is
supplied externally on the TESTCLK pin. This mode is for testing only and is not supported for
standard operation.
72SA-1110 Developer’s Manual
System Control Module9
This chapter describes the system control module that controls several processor-wide system
functions. The units contained in the system control module are: the general-purpose I/O ports, the
interrupt controller, the real-time clock, the operating system timer, the power manager, and the
reset controller.
9.1General-Purpose I/O
The Intel®StrongARM*SA-1110 Microprocessor (SA-1110) provides 28 general-purpose I/O
(GPIO) port pins for use in generating and capturing application-specific input and output signals.
Each pin is programmable as an input or output and as an interrupt source. All 28 pins are
configured as inputs during the assertion of reset, and remain inputs until they are configured
otherwise.
Each GPIO pin can be configured as an input or an output by programming the GPIO pin direction
register (GPDR). When programmed as an output, the pin can be controlled by writing to the GPIO
pin output set register (GPSR) and the GPIO pin output clear register (GPCR). Writing to these
registers controls the output data register, which is not directly readable or writable. The set and
clear registers can be written regardless of whether the pin is configured as an input or an output.
The programmed o utput state will take effect when the pin is reconfigured as an output.
When programmed as an input, the current state of each GPIO pin can be read through the GPIO
pin-level register (GPLR). This regist er can be read at any time and can be used to confirm the state
of the pin when it is configured as an output. In addition, each GPIO pin can be programmed to
detect a rising and/or falling edge through the GPIO rising-edge detect register (GRER) and GPIO
falling-edge detect register (GFER). The state of the edge detect can be read through the GPIO
edge detect status register (GEDR). These edge detects can be programmed to generate an interrupt
(see the Section 9.2, “Interrupt Controller” on page 9-83) or to serve as a wake-up event to bring
the SA-1110 out of sleep mode (see the Section 9.5, “Power Manager” on page 9-99).
When the SA-1110 enters sleep mode, the contents of the power manager sleep state register
(PGSR) is loaded into the output data register. If the particular pin is programmed as an output,
then the state in the PGSR will be driven onto the pin b efore entering sleep. When the SA-1110
exits sleep mode, these values remain until reprogrammed by writing to the GPSR and GPCR.
Some GPIO pins can also serve an alternate function within the SA-1110. Certain modes within the
serial controllers and LCD controller require extra pins. These functions are hard–wired into
specific GPIO pins. How these functions are used is described in the following sections. Even
though a GPIO pin has been taken over for an alternate function, you must still p rogram the correct
direction of that pin through the GPDR. Details on alternate functions are also provided in
following sections. Figure 9-1 shows a block diagram of a single GPIO pin.
SA-1110 Developer’s Manual73
System Control Module
Figure 9 -1.General-Purpose I/O Block Diagram
Pin Direction
Register
Alternate Function
Register
0
GPIO Pin
1
Edge
Detect
9.1.1GPIO Register Definitions
There are a total of eight registers within the GPIO control block: one is used to monitor pin state;
two are used to control pin state; one is used to control pin d irection; two are used to specify a pin’s
edge type that should be detected; and one is used to flag when specified edge types are detected on
pins.
Pin Set and
Clear Registers
Alternate Function
(Output)
Alternate Function
(Input)
Edge Detect
Status Register
Rising Edge Detect
Enable Register
Falling Edge Detect
Enable Register
Pin-Level
Register
The last register indicates whether a pin is used as normal GPIO or whether it is taken over by the
alternate function. The values in all other GPIO registers are unknown following reset and must be
initialized by software.
Note: A question mark (?) signifies that the Reset value of that bit is undefined when the processor has
completed its reset cycle.
74SA-1110 Developer’s Manual
9.1.1.1GPIO Pin-Level Register (GPLR)
The state of each of the GPIO port pins is visible through the GPIO pin-level register (GPLR).
Each bit number corresponds to the port pin number from bit 0 to bit 27. This is a read-only register
that is used to determine the current level of a particular pin (regardless of the programmed pin
direction).
The following table shows the locations of the 28 pin-level bits within the GPLR. This is a
read-only register.For reserved bits, reads return zero; a question mark indicates that the values are
unknown at reset.
GPIO port pin level n (where n = 0 through 27).
0 – Pin state is low.
1 – Pin state is high
PL9
PL8
PL7
PL6
PL5
PL4
PL3
PL2
PL11
PL10
PL1
Note: A question mark (?) signifies that the Reset value of that bit is undefined when the processor has
completed its reset cycle.
PL0
SA-1110 Developer’s Manual75
System Control Module
9.1.1.2GPIO Pin Direction Register (GPDR)
Pin direction is controlled by programming the GPIO pin direction register (GPDR). The GPDR
contains one direction control bit for each of the 28 port pins. If a direction bit is programmed to a
one, the port is an output. If it is programmed to a zero, it is an input. At hardware reset, all bits in
this register are cleared, configuring all GPIO pins as inputs. Soft resets and sleep reset have no
effect on this register. For reserved bits, writes are ignored and reads return zero. The following
table shows the location of each pin direction bit in the GPIO pin direction register.
GPIO port pin direction n (where n = 0 through 27).
0 – Pin configured as an input.
1 – Pin configured as an output.
PD13
PD12
PD9
PD8
PD7
PD6
PD5
PD4
PD3
PD2
PD11
PD10
PD1
PD0
76SA-1110 Developer’s Manual
System Control Module
9.1.1.3GPIO Pin Output Set Register (GPSR) and Pin Output Clear Register
(GPCR)
When a port is configured as an output, the user controls the state of the pin by writing to either the
GPIO pin output set register (GPSR) or the GPIO pin output clear register (GPCR). An output pin
is set by writing a one to its corresponding bit within the GPSR. To clear an output pin, a one is
written to the corresponding bit within the GPCR. These are write-only registers. Reads return
unpredictable values. Writing a zero to any of the GPSR or GPCR bits has no effect. Writing a one
to a GPSR or GPCR bit corresponding to a pin that is configured as an input has no effect. For
reserved bits, writes are ignored. The following tables show the locations of the GPSR bits and the
locations of the GPCR bits. These are write-only registers and reset values do not apply.
GPIO output pin set n (where n = 0 through 27).
0 – Pin level unaffected.
1 – If pin conf igured as an output, set pin level high (one).
0h 9004 000CGPCRWrite-Only
PC27
PC26
PC25
PC24
PC23
PC22
PC21
PC20
PC19
PC18
PC17
PC16
PC15
PC14
PC13
PC12
GPIO output pin clear n (where n = 0 through 27).
0 – Pin level unaffected.
1 – If pin conf igured as an output, clear pin level low (zero).
PS9
PS8
PS7
PS6
PS5
PS4
PS3
PS2
PS11
PS10
PC9
PC8
PC7
PC6
PC5
PC11
PC10
PC4
PS1
PC3
PC2
PC1
PS0
PC0
The user can test a bit within the GPLR corresponding to a pin that is configured as an output after
having set or cleared the pin state to determine if there is an external conflict on the pin. For
example, if an off-chip device is driving a GPIO output pin high and the user has cleared the pin’s
state by writing a one to its GPCR bit, the user can read the GPLR, then compare the written value
(zero) to the actual value (one) to detect the conflict.
SA-1110 Developer’s Manual77
System Control Module
9.1.1.4GPIO Rising-Edge Detect Register (GRER) and Falling-Edge Detect
Register (GFER)
Each GPIO port can also be programmed to detect a rising-edge, falling-edge, or either transition
on a pin. When an edge is detected that matches the type of edge programmed for the pin, a status
bit is set. The interrupt controller can be programmed to signal an interrupt to the CPU or wake up
the SA-1110 from sleep mode when any one of these status bits is set.
The GPIO rising-edge and falling-edge detect registers (GRER and GFER, respectively) are used
to select the type of transition on a GPIO pin that causes a bit within the GPIO edge detect status
register (GEDR) to be set. For a given GPIO port pin, its corresponding GRER bit is set to cause a
GEDR status bit to be set when the pin transitions from logic level zero (0) to one (1). Likewise,
GFER is used to set the corresponding GEDR status bit when a transition from logic level one (1)
to zero (0) occurs. When the corresponding bits are set in both registers, either a falling- or a
rising-edge transition causes the corresponding GEDR status bit to be set.
The following table shows both the rising-edge and falling-edge enable bit locations corresponding
to all 28 port pins. For reserved bits, writes are ignored and reads return zero; a question mark
indicates that the values are unknown at reset.
GPIO pin n rising-edge det ect (where n = 0 through 27).
0 – Disable rising-edge detect.
1 – Set corresponding GEDR status bit when a rising edge is detected on the GPIO pin.
0h 9004 0014GFERRead/Write
FE27
FE26
FE25
FE24
FE23
FE22
FE21
FE20
FE19
FE18
FE17
FE16
FE15
FE14
FE13
FE12
GPIO pin n falling-edge det ect (where n = 0 through 27).
0 – Disable falling-edge detect.
1 – Set corresponding GEDR status bit when a falling edge is detected on the GPIO pin.
RE9
RE8
RE7
RE6
RE5
RE4
RE3
RE2
RE11
RE10
FE9
FE8
FE7
FE6
FE5
FE11
FE10
FE4
RE1
FE3
FE2
FE1
RE0
FE0
78SA-1110 Developer’s Manual
9.1.1.5GPIO Edge Detect Status Register (GEDR)
The GPIO edge detect status register (GEDR) contains 28 status bits that correspond to the 28
GPIO port pins. When an edge detect occurs on a pin that matches the type of edge programmed in
the GRER and/or GFER registers, the corresponding status bit is set in GEDR. Once a GEDR bit is
set, the CPU must clear it. GEDR status bits are cleared by writing a one to them. Writing a zero to
a GEDR status bit has no effect.
Each edge detect that sets the corresponding GEDR status bit for GPIO pins 0 – 27 can trigger an
interrupt request. Pins 27 – 11 together form a group that can cause one interrupt request to be
triggered when any one of the GEDR status bits 27 – 11 is set. Each of GPIO pins 10 – 0 causes an
independent first-level interrupt. See the Section 9.2, “ Interrupt Controller” on page 9-83 for a
description of the programming of GPIO interrupts. The following table shows a summary of
GEDR; a question mark indicates that the values are unknown at reset.
GPIO edge detect status n (where n = 0 t hrough 27).
0 – No edge detect has occurred on pin as specified in GRER and/or GFER.
1 – Edge detect has occurred on pin as specified in GRER and/or GFER.
ED9
ED8
ED7
ED6
ED5
ED4
ED3
ED2
ED11
ED10
ED1
ED0
SA-1110 Developer’s Manual79
System Control Module
9.1.1.6GPIO Alternate Function Register (GAFR)
The GPIO alternate function register (GAFR) contains 28 control bits that correspond to the 28
GPIO port pins. When the processor sets a bit in the GAFR, the corresponding GPIO pin is
switched over to that pin’s alternate function. See the following section for details on alternate
functions. This register is cleared to all zeros on all reset conditions.
GPIO alternate function bits (where n = 0 through 27).
A bit set in this register indicates that the corresponding GPIO pin is to be used for its
alternate function. A zero in this register indicates that the corresponding GPIO pin is to be
used for its normal GPIO function.
AF9
AF8
AF7
AF6
AF5
AF4
AF3
AF2
AF11
AF10
AF1
AF0
80SA-1110 Developer’s Manual
9.1.2GPIO Alternate Fun ctions
Most GPIO pins have an alternate function that can be invoked to enable additional functionality
within the SA-1110. If a GPIO is used for this alternate function, then it cannot be used as a GPIO
at the same time. Pins 0 and 1 are reserved because of their special use during sleep mode and are
not available for any alternate function. The following table shows each GPIO pin and its
corresponding al ternate function. For more details on an alternate function, see the section that
corresponds to its name in the Unit column in the table.
GP 2732KHZ_OUT
GP 26RCLK_OUT
GP 25RTC clock
GP 24Reserved
GP 23TREQB
GP 22TREQA
GP 21TIC_ACK
GP 21MCP_CLK
GP 20UART_SCLK3
GP 19SSP_CLK
GP 18UART_SCLK1
GP 17Reserved
GP 16GPCLK_OUT
GP 15UART_RXD
GP 14UART_TXD
GP 13SSP_SFRM
GP 12SSP_SCLK
GP 11SSP_RXD
GP 10SSP_TXD
GP 2..9LDD 8..15
GP 1Reserved
GP 0Reserved
†
†
†
/MBREQInputTest controllerEither TIC request A or MBREQ
†
/MBGNTOutputTest controller
OutputClocksRaw 32.768-kHz oscillator output
OutputClocksInternal clock/2
OutputRTCReal time clock
———
InputTest controllerTIC request B
InputSerial port 4M CP clock in
InputSerial port 3:UARTSample clock input
InputSerial port 4:SSPSample clock input
InputSerial port 1:UARTSample clock input
———
OutputSerial port 1General-purpose clock out
InputSerial port 1:UARTUART receive
OutputSerial port 1:UARTUART transmit
OutputSerial Port 4:SSPS SP frame clock
OutputSerial port 4:SSPSSP se rial clock
InputSerial port 4:SSPSSP receive
OutputSerial port 4:SSPSSP transmit
OutputLCD controller
——No alternate function
—-—No alternate function
System Control Module
EitherTIC acknowledge or
MBGNT
High-order data pins for
split-screen color LCD support
† Toenable RCLK_OUT, it is also necessary to set bits [31:29] of the Test Unit Control Register (TUCR) =
0b100. See Appendix D, “Internal Test”for more information a bout the TUCR.
† The signals, TREQA, TREQB, and TIC_ACK are reserved by Intel for test purposes.
SA-1110 Developer’s Manual81
System Control Module
9.1.2.13.6864 MHz Option for GP 27 Alternate Output Function
When GP 27 is configured for its alternate output function by setting bit 27 in both the GAFR and
GPDR, b it 29 of the test unit control register (TUCR) at physical address 0x9003 0008 can be set to
select the 3.6864 MHz oscillator output instead of the 32.768 KHz oscillator output. When
TUCR 29 is cleared the 32.768 KHz oscillator output is selected again. Neither option provides a
fixed phase relationship with any other pin signals; and some glitching may occur when switching
between the two options.
The 3.6864 MHz option is particularly useful for companion chips that require some clock cycles
after assertion of VDD_FAULT or BATT_FAULT. The oscillato r output will continue through the
first step of the sleep shutdown sequence, which lasts for one cycle of the power manager’s 32.768
KHz clock (~30 microseconds). Thus, at least 112 cycles of 3.6864 MHz oscillation are provided
prior to shutdown. S ee Section 9.5.3 for a detailed description of sleep mode and the sleep
shutdown sequence.
9.1.3GPIO Register Locations
The following table shows the registers associated with the GPIO block and the physical addresses
used to access them.
AddressNameDescription
0h 9004 0000GPLRG PIO pin-level register
0h 9004 0004GPDRGPIO pin direction register
0h 9004 0008GPSRGPIO pin output set register
0h 9004 000CGPCRGPIO pin output clear register
0h 9004 0010GRERGPIO rising-edge detect register
0h 9004 0014GFERGPIO falling-edge detect register
0h 9004 0018GEDRGPIO edge detect status register
0h 9004 001CGAFRGPIO alternate f unct ion register
82SA-1110 Developer’s Manual
9.2Interrupt Controller
The SA-1110 interrupt controller provides masking capability for all interrupt sources and
combines them into their final state, either an FIQ or IRQ processor interrupt. The interrupt
hierarchy of the SA-1110 is a two-level structure.
The first level of the structure, represented by the interrupt controller IRQ pending register (ICIP)
and the interrupt controller FIQ pending register (ICFP) contain the all-enabled and unmasked
interrupt sources. The interrupt controller p ending register (ICPR) shows both IRQ and FIQ
pending interrupts. Interrupts are enabled at their source and unmasked in the interrupt controller
mask register (ICMR). The ICIP contains the interrupts that are programmed to generate an IRQ
interrupt. The ICFP contains all valid interrupts that are programmed to generate an FIQ interrupt.
This routing is programmed via the interrupt controller level register (ICLR).
The second level o f the interrupt structure is represented by registers contained in the source device
(the device generating the first-level interrupt bit). S econd-level interrupt status gives additional
information about the interrupt and is used inside the interrupt service routine. In general, multiple
second-level interrupts are OR’ed to produce a first- level interrupt bit. The enabling of interrupts
is performed inside the source device.
In most cases, the root source of an interrupt can be determined through reading two register
locations: the ICIP or ICFP (depending on which interrupt handler the software is in) to determine
the interrupting device, followed by the status register within that device to find the exact function
needing service. When the SA-1110 is in idle mode (see the Section 9.5, “Power M anager” on
page 9-99), any enabled interrupt causes it to resume operation. The interrupt mask is ignored
during idle mode if the DIM bit in the interrupt controller control register (ICCR) is set to zero (0).
Figure 9-2 shows a block diagram of the interrupt controller.
System Control Module
Figure 9-2.Interrupt Controller Block Diagram
Interrupt Controller
Level Register (ICLR)
Interrupt Controller
Mask Register (ICMR)
Interrupt Source
Bit
Interrupt Controller
Pending Register (ICPR)
Interrupt Controller
IRQ Pending Register (ICIP)
Interrupt Controller
FIQ Pending Register (ICFP)
All Other Qualified
Interrupt Bits
3131
FIQ
Interrupt
to
Processor
IRQ
Interrupt
to
Processor
SA-1110 Developer’s Manual83
System Control Module
9.2.1Interrupt Controller Register Definitions
The interrupt controller contains four registers: the interrupt controller IRQ pending register
(ICIP), the interrupt controller FIQ pending register (ICFP), the interrupt controller mask register
(ICMR), and the interrupt controller level register (ICLR). Following reset, the FIQ and IRQ
interrupts are disabled within the CPU, and the states of all of the interrupt controller’s registers are
unknown and must be initialized by software before interrupts are enabled within the CPU.
The ICPR is a 32-bit read-only register that shows all active interrupts in the system. These bits are
not affected by the state of the mask register (ICMR). The following table shows the pending
interrupt source assigned to each bit position in the ICPR. Also included in the table are the source
units for the interrupts and the number of second-level interrupts associated with each. For more
detail on the second-level interrupts, see the section describing that unit.
Bit PositionUnitSource Module# of Level 2 SourcesBit Field Description
IP 31
IP 301One Hz clock TIC occurred.
IP 29
IP 281OS timer equals match register 2.
IP 271OS timer equals match register 1.
IP 261OS timer equals match register 0.
IP 25
IP 243Channel 4 service request.
IP 233Channel 3 service request.
IP 223Channel 2 service request.
IP 213Channel 1 service request.
IP 203Channel 0 service request.
IP 19Serial port 4b3SSP service request.
IP 18Serial port 4a8MCP service request.
IP 17Serial port 36UART service request.
IP 16Serial port 26+6UART/HSSP service request.
IP 15Serial port 1b6UART service request.
IP 14Reserved
IP 13Serial port 06UDC service request.
IP 12LCD controller12LCD controller service request.
System
Peripheral
Real-time clock
Operating system timer
DMA controller
1RTC equals alarm register.
1OS timer equals match register 3.
3Channel 5 service request.
—
Reserved.
84SA-1110 Developer’s Manual
System Control Module
Bit PositionUnitSource Module# of Level 2 SourcesBit Field Description
IP 11SystemGeneral-purpose I/O17“OR” of GPIO edge detects 27-11.
IP101GPIO10edgedetect.
IP 91GPIO 9 edge detect.
IP 81GPIO 8 edge detect.
IP 71GPIO 7 edge detect.
IP 61GPIO 6 edge detect.
IP 51GPIO 5 edge detect.
IP 41GPIO 4 edge detect.
IP 31GPIO 3 edge detect.
IP 21GPIO 2 edge detect.
IP 11GPIO 1 edge detect.
IP 01GPIO 0 edge detect.
Total level 2 interrupt
sources
110
Several units have more than one source per interrupt signal. When an interrupt is signalled from
one of these units, the interrupt handler routine identifies which interrupt was signalled using the
interrupt controller’s flag register (this identifies the unit that made the request, but not the exact
source). The handler then reads the interrupting unit’s status register to identify which source
within the unit signalled the interrupt. For all interrupts that have one corresponding source, the
interrupt handler routine needs to use only the interrupt controller’s registers to identify the exact
cause of the interrupt.
The ICIP and the ICFP contain one flag per interrupt (32 total) that indicates an interrupt request
has been made by a unit. Inside the interrupt service routine, the ICIP and ICFP are read to
determine the interrupt source. In general, software then reads status registers within the
interrupting device to determine how to service the interrupt.
Bits within the ICPR are read only, and represent the logical OR of status bits for a given interrupt
within the source unit. Once an interrupt has been serviced, the handler clears the pending interrupt
at the source by writing a one to the necessary status bit. Clearing the interrupt status bit at the
source automatically clears the corresponding ICIP and ICFP flag provided there are no other
interrupt status bits set within the source unit.
All interrupt source status bits are cleared by writing a one to them. Writing a zero to an interrupt
status bit has no effect. The following table shows the bit locations corresponding to the 32
separate interrupt pending status flags in the ICIP. The next table shows the bit locations
corresponding to the 32 separate interrupt pending status flags in the ICFP. This is a read-only
register.
These flags reflect the OR of the reset state of the individual interrupt status bits at the
source unit.
FP25
FP24
FP23
FP22
FP21
FP20
FP19
FP18
FP17
FP16
FP15
FP14
These flags reflect the OR of the reset state of the individual interrupt status bits at the
source unit.
IP11
IP13
IP12
IP10
FP9
FP8
FP7
FP6
FP5
FP11
FP13
FP12
FP10
FP4
IP1
FP3
FP2
FP1
IP0
FP0
86SA-1110 Developer’s Manual
9.2.1.3Interrupt Controller Mask Register (ICMR)
The interrupt controller mask register (ICMR) contains one mask bit per pending interrupt bit (32
total). The mask bits control whether a pending interrupt bit will generate a processor interrupt
(IRQ or FIQ). When a pending interrupt becomes active, it is sent to the CPU only if its
corresponding ICMR mask bit is set to a one.
Note: When the DIM bit in the Interrupt Controller Control Register (ICCR) is set to a 0 the mask bits are
ignored when the SA-1110 is in idle mode. While in idle, if any interrupt source makes a request,
the corresponding pending bit is set and the interrupt automatically becomes active, regardless of
the state of its mask bit.
Mask bits serve two purposes. First, they allow periodic software polling of interruptible sources
while preventing them from actually causing an interrupt. Second, they allow the interrupt handler
routine to prevent interrupts of lower priority from occurring while still maintaining a list of
pending interrupts that may have occurred previously (or during the servicing of another interrupt).
The ICMR is not initialized at r eset; a question mark indicates that the values are unknown at reset.
The following table shows the bit locations corresponding to the 32 separate interrupt mask bits.
Interrupt mask n (where n = 0 through 31).
0 – Pending interrupt is masked from becoming active (interrupts not sent to CPU, Power
nIMn
Manager).
1 – Pending interrupt is allowed to become active (interrupt sent to CPU, Power Manager).
Note: IM bits are ignored during idle mode.
IM11
IM13
IM12
IM10
IM1
IM0
SA-1110 Developer’s Manual87
System Control Module
9.2.1.4Interrupt Controller Level Register (ICLR)
The interrupt controller level register (ICLR) controls whether a pending interrupt generates an
FIQ or an IRQ CPU interrupt. If a pending interrupt is unmasked, the correspondingICLR bit field
is decoded to select which CPU interrupt should be asserted. If the interrupt is masked, then the
corresponding bit in t he ICLR has no effect. The following table shows the location of all interrupt
level bits i n the ICLR; question marks indicate that the values are unknown at reset.
0 – Interrupt routed to CPU IRQ interrupt input.
1 – Interrupt routed to CPU FIQ interrupt input.
IL11
IL13
IL12
IL10
IL2
IL1
IL0
88SA-1110 Developer’s Manual
9.2.1.5Interrupt Controller Control Register (ICCR)
The interrupt controller control register (ICCR) contains a single control bit, the disable idle mask
bit (DIM). When set, this bit inhibits the idle mode operation where the output of the ICMR is
OR’ed to all ones. If this bit is set, then the interrupts that are capable of bringing the SA-1110 out
of idle mode are defined by the contents of the ICMR. The following table shows the location of all
interrupt level bits in the ICCR.
0 – All enabled interrupts will bring the SA-1110out of idle mode.
1 – Only enabled and unmasked (as defined in the ICMR) will bring the SA-1110 out of idle
mode. This bit is cleared during all resets.
DIM
SA-1110 Developer’s Manual89
System Control Module
9.2.2Interrupt Controller Register Locations
The following table shows the registers associated with the interrupt controller block and the
physical addresses used to access them.
The SA-1110 contains a real-time clock (RTC) that provides a general-purpose real-time reference
for use by the system. The RTC is uninitialized after a hardware reset (nRESET) and must be
written by the user to the desired value. Thereafter, the counter will remain valid until another
hardware reset (assumed to be infrequent). The value of the counter is unaffected by transitions
into and out of sleep, idle, software reset, or a watchdog reset. The counter is incremented on rising
edges of the 1-Hz clock.
In addition to the counter [ RTC counter register (RCNR) ], the RTC incorporates a 32-bit alarm
register (RTAR). The RTAR may be programmed with a value to be compared against the counter.
RCNR is incremented on each rising edge of the 1-Hz clock. Throughout each 1-Hz clock period
RCNR is compared to RTAR. If the values match and the alarm interrupt is enabled, then a status
bit is set. This status bit is also routed to the interrupt controller and may be programmed to
generate a CPU interrupt.
Another status bit is available that is set whenever the 1 Hz clock interrupt occurs. Each status bit
may be cleared by writing a one to the status register in the desired bit position. The 1-Hz clock is
generated by dividing down the 32.768-kHz crystal oscillator output. This divider logic is
programmable to allow the user to “trim” the counter to adjust for inherent inaccuracies in the
crystal’sfrequency. This trimming mechanism permits the user to adjust the RTC to an accuracy of
+/- 5 seconds per month. The trimming procedure is described later in this section.
Note: Th e 32.768 kHz crystal may take 2-10 seconds to stabilize after a hardware reset. The Power
Manager Oscillator Status Register (0x9002001c) bit Oscillator OK (bit 0) is set when the 32.768
kHz clock has stabilized after a hardware reset.
9.3.1RTC Counter Register (RCNR)
The RTC counter register (RCNR) is a read/write register and is not cleared by any reset source.
The counter may be written by the processor at any time although it is recommended that the
operating system prevent inadvertent writes to the RCNR through the use of the MMU protection
mechanisms.
90SA-1110 Developer’s Manual
Because of the asynchronous nature of the 1-Hz clock relative to the processor clock, writes to this
counter are controlled by a hardware mechanism that delays the actual write to the counter by up to
one 32-kHz-clock (~ 3 0 µs) after the processor store is performed.
After the processor writes to the RCNR, all other writes to this register location are ignored until
the new value is actually loaded into the counter. The RCNR may be read at any time. Reads reflect
the value in the counter immediately after it increments or loads.
Note: When a value is written to the RTC registers RTTR or RCNR registers, the value is stored
correctly, but doing a read immediately after the write will read an incorrect value. A
one-instruction delay is needed for the values to propagate through the RTC's logic before the
stored value can be read back correctly. This delay can be accomplished by doing two reads, but
only using the results of t he second read.
9.3.2RTC Alarm Register (RTAR)
The real-time clock alarm register is a 32-bit register that is readable and writable by the processor.
Throughout each 1-Hz clock period, RCNR is compared to RTAR. If the two are equal and the
enable bit is set, then the alarm bit in the RTC status register is set. The value in this register is
undefined after the assertion of nRESET.
System Control Module
9.3.3RTC Status Register (RTSR)
The following table shows the location of all bits in the RTSR. All reserved bits are read as zeros
and are unaffected by writes; a question mark indicates that the value is unknown at reset. The AL
and HZ bits in this register are routed to the interrupt controller where they may be enabled to
cause an interrupt. The AL and HZ bits are cleared by writing ones to them. The ALE interrupt
enable bit must be set by software to allow the RTC's assertion of the AL bit and the RTC alarm
interrupt.
0 – No alarm interrupt has been detected.
1 – An alarm interrupt has been detected (RTNR matched RTAR).
1-Hz rising-edge interrupt det ect ed.
0 – No rising-edge interrupt has been detected.
1 – A rising-edge interrupt has been detected.
RTC alarm interrupt enable.
0 – The RTC alarm interrupt is not enabled.
1 – The RTC alarm interrupt is enabled.
0 – The 1-Hz interrupt is not enabled.
1 – The 1-Hz interrupt is enabled.
HZE
ALE
HZ
Note: W h en the AL bit goes high indicating that the alarm has occurred, the alarm interrupt bit (ALE)
must first be disabled (by writing a 0 to it) before the AL bit can be cleared (by writing a 0 to it).
AL
92SA-1110 Developer’s Manual
9.3.4RTC Trim Register (RTTR)
Program the RTTR to select the frequency of the Real Time Clock (RTC). If this register is not
programmed and left at i ts reset value (all zeros), then the RTC will actually be running at 32.768
kHz. Refer to Section 9.5.7.8, “Power Manager Oscillator Status Register (POSR)” on page 9-114
to understand when the Real Time Clock is stable. Refer to Section 9.3.5.2, “RTTR Value
Calculations” on page 9-94 for details on how to calculate the value of the RTTR. The following
table shows the location of all bits in the RTTR. All reserved bits are read as zeros and are
unaffected by writes.
Clock divider count.
This value is the integer portion of the clock trim logic.
Trim delete count.
This value represents the number of 32-kHz clocks to delete when clock trimming begins .
System Control Module
9.3.5Trim Procedure
The 1-Hz clock feeding the RTC is obtained by dividing the output of the 32.768-kHz oscillator
down. Since 32768 is a power of two, a 15-bit divider will generate a 1-Hz clock (given a perfect
crystal and perfect board environment). The inherent inaccuracies of crystals, aggravated by
varying capacitance of the board connections, and so on, cause the timebase to be somewhat
inaccurate, requiring a periodic adjustment in the 1 Hz clock period. The SA-1110, through the
RTTR, allows the user to adjust or "trim" the 1 Hz timebase to an accuracy of +/- 5 seconds per
month. At reset, the RTTR contains zeros that disable the trim circuitry. When the trim circuitry is
disabled, the 1-Hz clock feeding the RTC is the same frequency as the output of the 32.768-kHz
oscillator. The RTTR is reset to all zeros each time the nRESET signal is asserted.
9.3.5.1Oscillator Frequency Calibration
To generate the value to be entered into the RTTR, the user must first measure the output frequency
of the 32.768-kHz oscillator using an accurate timebase, such as a frequency counter. This clock is
made externally visible by selecting the alternate function for GPIO 27. To gain access to the clock,
this pin must be programmed as an output and then switched over to the alternate function. See the
Section 9.1, “General-Purpose I/O” on page 9-73 in this chapter for details on how to gain access
to the clock. The trim is accomplished by dividing the output of the oscillator by an integer value
and then doing fine-grain fractional adjustment by periodically deleting clocks from the stream
feeding this integer divider.
SA-1110 Developer’s Manual93
System Control Module
9.3.5.2RTTR Value Calculations
After the true frequency of the oscillator is known, it must be split into integer and fractional
portions. The integer portion of the value (minus one) is loaded into the C0-C15 field of the RTTR .
This value is compared against a 16-bit counter clocked by the output of the 32.768-kHz oscillator.
The counter resets and generates a pulse when the two values are equal. This pulse constitutes the
raw 1-Hz signal.
The fractional part of the adjustment is done by periodically deleting clocks from the clock stream
feeding the integer counter. The period, called the "trim interval," is hard–wired to be 2
seconds (approximately 17 minutes). The number of clocks deleted, called the "trim delete value,"
is a 10-bit programmable counter allowing from 0 to 2
input clock stream once per trim interval. D0-D9 represents the number of clocks deleted per trim
operation. In summary, every 2
10
-1 seconds, the integer counter stops clocking for a period equal
10
-1 32-kHz clocks to be deleted from the
10
-1
to the fractional error that has accumulated. If this counter is programmed to a zero (as it is at a
hard reset), then no trim operations will occur and the RTC will be clocked with the raw
32.768-kHz clock. The relationship between the nominal 1-Hz clock frequency and the nominal
32.768-kHz clock (f1 and f32K respectively) is shown in the following equation.
(2^10-1)*(C 15..0 +1) -D 9..0
f1=
(2^10-1)*(C 15..0 +1)
f32k
*
(C 15..0 +1)
Trim Example #1 – Measured Value Has No Fractional Component
In this example, the oscillator output is measured to be 36045.000 cycles/s (Hz). This output is
exactly 3277 cycles over the nominal frequency of the crystal and has no fractional component. As
such, only the integer trim function is needed and no fractional trim is required. Accordingly, the
C0-C15 field of the RTTR is loaded with the binary equivalent of 36045-1, or 0x8CCC. The
D0-D9 field is left at zero (power-up state) to disable fractional trimming. This trim exercise leaves
an error o f zero in trimming.
Trim Example #2 – Measured Value Has a Fractional Component
This example is a more common case in that the measur ed frequency of the oscillator has a
fractional component. If the oscillator output is measured to be 32768.92 cycles/s (Hz), an integer
trim is necessary so that the average number of cycles counted before g enerating one 1-Hz clock is
32768.92. Similar to the previous example, the integer field D0-D15 is loaded with the
hexadecimal equivalent of 32768-1 or 0x7FFF.
Because the actual clock frequency is 0.92 cycles per second faster than the integer value, the 1-Hz
clock generated by just the integer trimming is slightly faster than needed and must be slowed
down. Accordingly, the fractional trim must be programmed to delete 0.92 cycles per second on
average to bring the 1-Hz output frequency down to the proper value. Since the trimming
procedure is performed only every 2
10
-1=1023 seconds, the trim must be set to delete (.92*1023)
= 941.16 clocks every 1023 seconds. The fractional component of this value cannot be trimmed
out and constitutes the error in trimming, described below. The counter should be loaded with the
hexadecimal equivalent of 941, or 0x3AD.
94SA-1110 Developer’s Manual
System Control Module
This trim setting leaves an error of .16 cycles per 1023 seconds. The error calculation yields (in
parts-per-million or ppm):
Error
0.16 cycles
-------------------------- 1023 sec
1cycle
-------------------- 1023 sec
5sec
-------------- month
Error
Maximum Error Calculation Versus Real-Time Clock Accuracy
As seen from trim example #2, the maximum possible error approaches 1 clock per 2
Calculating the ppm error for this scenario yields:
Error (maximum)
To maintain an accuracy of +/- 5 seconds per month, the required accuracy is calculated to be:
This calculation indicates that the accuracy of the SA-1110 trim mechanism is more than adequate
to compensate for the static environmental and manufacturing variables, and still provides
acceptable accuracy.
1sec
------------------------------ -0 . 0 02 ppm==
X
32768 cycles
1sec
------------------------------ -0 . 0 3 p p m==
X
32768 cycles
1month
----------------------------- -1.9 ppm==
X
2592000 sec
9.3.6Real-Time Clock Register Locations
10
-1 seconds.
The following table describes the real-time clock registers.
AddressNameDescription
0h 9001 0000RTARRTC alarm register
0h 9001 0004RCNRRT C count register
0h 9001 0008RTTRRTC timer trim register
0h 9001 0010RTSRRTC status register
9.4Operating System Timer
The SA-1110 contains a 32-bit operating system timer that is clocked by the 3.6864-MHz oscillator .
The operating system count register (OSCR) is a free-running up-counter that is not cleared during
any reset (contains unknown value after reset). The OS timer also contains four 32-bit match registers
(OSMR[3:0]). Each register can be written and read by the user. When the value in the OSCR
matches (is equal to) the value within any of the match registers, and the interrupt enable bit is set, the
corresponding bit in the OSSR is set. These bits are also routed to the interrupt controller where they
can be programmed to cause an interrupt. OSMR 3 also serves as a watchdog match register that
resets the SA-1110 when the OWER:WME bit is set and a match occurs. The user must initialize all
other registers and clear any set status bits before the FIQ and IRQ interrupts are enabled within the
CPU.
SA-1110 Developer’s Manual95
System Control Module
9.4.1OS Timer Count Register (OSCR)
The OS timer count register is a 32-bit counter that increments on rising edges of the 3.6864-MHz
clock. This counter can be read or written at any time. It is recommended that the system
write-protect this register through the MMU protection mechanisms.
These registers are 32 bits wide and are readable and writable by the processor. They are compared
against the OSCR following every rising edge of the 3.6864-MHz clock. If any of these registers
match the counter at this time, then the corresponding OS timer interrupt channel is enabled via the
OIER, and the corresponding status bit in the OSSR is set. The status bits are routed to the interrupt
controller where they can be unmasked to cause a CPU interrupt.
OSMR 3 may also serve as a watchdog timer. See the Section 9.4.6, “Watchdog Timer” on
page 9-98 for operation information.
9.4.3OS Timer Watchdog Match Enable Register (OWER)
The watchdog enable register contains a single control bit (bit 0) that enables the watchdog
function. This bit is set by writing a one to it. It can only be cleared by one of the reset functions
(hardware reset, software reset) and by entering sleep mode. A watchdog reset also clears the
watchdog enable bit. The format of this register follows:
Watchdog matc h enable.
0 – OS timer match register 3 matches cause an interrupt request.
0WME
31..1—Reserved
1 – OS time r match register 3 matches cause a reset of the SA-1110
Note: This is a write-once bit that once written, can only be changed after a hardware (pin),
software (SWR), or sleep mode reset.
.
WME
96SA-1110 Developer’s Manual
System Control Module
9.4.4OS Timer Status Register (OSSR)
This status register contains status bits indicating whether a match has occurred on any of the four
match registers. These bits are set when the event occurs (following the rising edge of the
3.6864-MHz clock) and the corresponding OS timer interrupt channel is enabled via the OIER.
They are cleared by writing a one to the proper bit position. Writing zeros to this register has no
effect. All reserved bits read as zeros and are unaffected by writes; a question mark indicates that
the value is unknown at reset.
0 – OS timer match register 0 has not matched the OS timer counter since the last cle ar.
1 – OS timer match register 0 has mat ched the OS timer counter.
Match status channel 1.
0 – OS timer match register 1 has not matched the OS timer counter since the last cle ar.
1 – OS timer match register 1 has mat ched the OS timer counter.
Match status channel 2.
0 – OS timer match register 2 has not matched the OS timer counter since the last cle ar.
1 – OS timer match register 2 has mat ched the OS timer counter.
Match status channel 3.
0 – OS timer match register 3 has not matched the OS timer counter since the last cle ar.
1 – OS timer match register 3 has mat ched the OS timer counter.
M3M2M1
M0
SA-1110 Developer’s Manual97
System Control Module
9.4.5OS Timer Interrupt Enable Register (OIER)
This register contains four enable bits i ndicating whether a match between one of the match
registers and the OS timer counter will set a status bit in the OSSR. Each match register has a
corresponding enable bit. Clearing an enable bit does not clear the corresponding interrupt status
bit if that bit is already set.
This bit is set by software and allows a match between match register OSMR[0] and the OS
timer to assert interrupt bit M0 in the OSS R .
Interrupt enable channel 1.
This bit is set by software and allows a match between match register OSMR[1] and the OS
timer to assert interrupt bit M1 in the OSS R .
Interrupt enable channel 2.
This bit is set by software and allows a match between match register OSMR[2] and the OS
timer to assert interrupt bit M2 in the OSS R .
Interrupt enable channel 3.
This bit is set by software and allows a match between match register OSMR[3] and the OS
timer to assert interrupt bit M3 in the OSS R .
E3E2E1
E0
9.4.6Watchdog Timer
OSMR 3 may also serve as a watchdog compare register. This function is enabled by setting bit 0 in
the OWER. When a compare against this register occurs and the watchdog is enabled
(OWER:WME=1 and OIER:E3=1), reset is applied to the SA-1110 and most internal states are
cleared (with exceptions listed below). Internal reset is asserted for 256 processor clocks and then
removed, allowing the SA-1110 to boot. Units that do not receive this internal reset are: the power
manager, the refresh timer, and the PLL configuration. Watchdog reset affects the SA-1110 similar
to a software reset. See the Section 9.6, “Reset Controller” on page 9-115 for details on what is
affected by each kind of reset. When the SA-1110 comes out of a watchdog reset, a bit is set in the
reset controller status register (RCSR) to indicate that the event happened.
The user must clear OSSR:M3 before setting up a watchdog reset. The following procedure is
suggested when using OSMR 3 as a watchdog: each time the operating system services the register,
the current value of the counter is read, and a number is then added to the value read,
corresponding to t he amount of time before the next time-out (care must be taken to account for
counter wrap–around). This number is then written back to OSMR 3. The OS code must repeat this
procedure periodically before each match occurs. If the match occurs, the OS timer will assert a
reset.
98SA-1110 Developer’s Manual
9.4.7OS Timer Register Locations
Table 9-1 shows the registers associated with the OS timer and the physical addresses used to
The SA-1110 contains power management logic that controls the transition between three different
modes of operation: run, idle, and sleep. These modes are used to reduce processor power
consumption at times when some functions are not needed, or when the system’s power supply is
low or out of regulation. Each of the respective modes is associated with a reduced level of power
consumption. Idle mode is entered via software. Sleep mode is entered either via software or by
asserting one of two input p ins that indicate a power supply fault. Idle mode is exited through an
interrupt. Sleep mode is exited through a preprogrammed wake-up condition. Both modes may be
exited in extreme cases via hardware reset. If none of the power management modes is active and
the SA-1110 is out of reset, then it is said to be in run mode.
9.5.1Run Mode
Run mode is the normal operating mode of the SA-1110: all power supplies are enabled, al l clocks
are running, and every on-chip resource is functional. This is the normal state of operation for the
processor while it is executing code. Under usual conditions, the processor enters run mode after
successful power-up and reset of the part.
9.5.2Idle Mode
Idle mode allows a software application to stop the CPU when not in use, while continuing to
monitor interrupt service requests both on or off-chip. When an interrupt occurs, the CPU is
reactivated. During idle mode, the SCM, PM, and MPCM are each fully operational.
In idle mode, the CPU clock is stopped. Since the SA-1110 is static, all CPU state information is
saved. This allows the part to be switched back to run mode, starting operation exactly where it left
off. During idle mode, all other on-chip resources are active, including: all system unit modules
(real-time clock, operating system timer, interrupt controller, general-purpose I/O, and power
SA-1110 Developer’s Manual99
System Control Module
manager); all peripheral unit modules (DMA controller, LCD controller, serial controller 0-4); and
all memory controller resources. The PLL also remains in lock so that the part can be brought out
of idle mode quickly when an interrupt occurs.
9.5.2.1Entering Idle Mode
Idle mode is entered while in run mode by executing a three instruction sequence consisting of the
privileged on-chip coprocessor 15 instruction ‘disable clock switching’, a load from a
noncacheable memory location (C=B=0), and the privileged on-chip coprocessor 15 instruction
‘wait for interrupt’. This sequence must reside in the first three words of an instruction cache line,
which requires that the linker align the idle mode instruction sequence on an eight word boundary.
Idle mode is entered by following the exact code sequence:
AREA Idle$$Code , CODE, READONLY, ALIGN=5
;Aligned to 8 word boundary
;p15 = coprocessor 15
;r0 = register 0 (contents not used)
;c15 = test, clk, and idle cntl register
Any enabled interrupt from the system unit or peripheral unit causes a transition from idle mode
back to run mode. An interrupt is masked or unmasked u si ng the Interrupt Controller Mask
Register (ICMR). The DIM (Disable Idle Mask) bit in the Interrupt Controller Control Register
(ICCR) controls which enabled interrupts bring the SA-1110 out of idle mode.
• When DIM=0, the ICMR register is ignored. Any enabled interrupt, masked or unmasked,
brings the SA-1110 out of idle mode.
• When DIM=1, the ICMR register is not ignored. Interrupts that are specifically enabled and
unmasked bring the SA-1110 out of idle mode.
Note: Refer to Section 9.2.1.5, “Interrupt Controller Control Register (ICCR)” on page 9-89 for detailed
information on the ICCR Disable Idle Mask bit.
When an interrupt occurs, the CPU clocks are reactivated, the wait-for-interrupt instruction is
completed, and run-program flow resumes.
If the interrupt bringing the SA-1110 out of idle mode is masked, program flow resumes in a linear
fashion. If the interrupt bringing the SA-1110 out of idle mode is unmasked, program flow
resumes as i n any other interrupt service routine. You must reenable clock switching for both
circumstances.
A transition from idle to run mode also occurs when asserting the nRESET pin, or by having
OSMR 3 configured as a watchdog (OWER:WME=1 and OIER:E3=1) and incurring a match
which causes the assertion of reset. Since the watchdog timer (when enabled) is functional during
idle, you must set the watchdog match register far enough in advance to ensure that another
interrupt is guaranteed to bring the SA-1110 out of idle before the watchdog reset occurs. It is
recommended that either an RTC alarm or another OS timer channel be used for this purpose.
100SA-1110 Developer’s Manual
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.