LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
DOCUMENT REVISION HISTORY
2003 Dec 03:
• Prototype LPC2119/2129/2194/2292/2294 User Manual created from the design specification.
2003 Dec 09:
• External Memory Controller and Pin Connect Block chapters updated.
2003 Dec 15/16:
• System Control Block chapter updated.
2003 Dec 18:
• A/D Converter Block chapter updated.
2004 Jan 07:
• CAN and PLL related material updated.
2004 Jan 26:
• System Control Block (Crystal Oscillator section - new frequencies added) and CAN Chapter updated.
2004 Feb 03:
• Introduction chapter (register list) updated.
2004 May 03:
• P0.16 description in "Pin Connect Block" chapter corrected from "Reserved" to "Capture 0.2 (TIMER0)".
• LPC2212 Flash size corrected in "Introduction" chapter corrected from 256 to 128 kB.
• Interrupt source #17 in "Vectored Interrupt Controller (VIC)" corrected from "EINT2" to "EINT3".
• Parallel ports 2 and 3 related registers added to "Introduction" and "GPIO" chapters
• Trigger levels deter mined by bits 7 and 6 in U0 FCR and U1FCR ("UART0" and "UART1" chapters) now showed in both decim al
and hexadecimal notations
• References to DBGSEL pin removed from entire document (pin does not exist in this family of microcontrollers)
• Pin 20 in figure showing 64-pin package ("Pin Configuration" chapter) corrected from "1.3" to "1.31"
•V
replaced with V3A in "A/D Converter" chapter and V3A description updated in "Pin Configuration" chapter
ddA
• Warning on analog input levels added to "A/D Converter" chapter
• On-chip upper RAM boundary corrected from 0x4000 1FFF to 0x4000 3FFF in "LPC2119/2129/2292/2294 Memory
Addressing" chapter
• Port pin tolerance, pull-up presence and voltage considerations added in "Pin Configuration" and "A/D Converter" chapter
• Baudrates in "Flash Memory System and Programming" corrected: 115200 and 230400 instead of 115000 and 230000
• CAN related interrupt sources fixed in "Vectored Interrupt Controller (VIC)" chapter
• ERRBIT field in CANICR CAN register ("Vectored Interrupt Controller (VIC)" chapter) updated
• Number of the on-ch ip Fla sh era se and wr it e c ycles a dde d i nto "Introduction" and "Fl ash M em ory Sy ste m and Prog ram ming"
chapters
• Pins capable of providing an External Interrupt functionality are acounted and listed in "System Control Block" chapter
• Access to ports with respect to GPIO configured pins clarified in "GPIO" and "Pin Connect Block" chapters
• Description of Code Read Protection feature added in "Flash Memory System and Programming" chapter
14May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
• IOPIN0 and IOPIN1 tyopografic errors corrected in "System Control Block" chapter
• PINSEL2 added to to "Introduction" chapter
• T0IR, T0CCR, T0TCR, T1TCR, T0EMR and PCONP updated in "Introduction" chapter
• EXTMODE and EXTPOLAR registers added in "Introduction" chapter and updated in "System Control Block" chapter
• Power Control Usage Notes for reducing the total power added to "System Control Block" chapter
• PINSEL2 register as well as booting procedure updated in "Pin Connect Block" and "Watchdog" chapters
• references to the pclk in "External Memory Controller (EMC)" chapter corrected to the cclk
• LPC2292/2294 PINSEL2 table in "Pin Connect Block" chapter corrected
• A/D pin description in "A/D Converter" chapter rephrased
• Information on Spurious Interrupts added into "Vectored Interrupt Controller (VIC)" chapter
• Details on the checksum generation in case of Read Memory and Write to RAM ISP commands added in "Flash Memory
System and Programming" chapter
15May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
1. INTRODUCTION
GENERAL DESCRIPTION
The LPC2119/2129/2194/2292/2294 are based on a 16/32 bit ARM7TDMI-STM CPU with real-time emulation and embedded
trace support, together with 128/256 kilobytes (kB) of embedded high speed flash memory. A 128-bit wide internal memory
interface and a unique accelerator architecture enable 32-bit code execution at maximum clock rate. For critical code size
applications, the alternative 16-bit Thumb Mode reduces code by more than 30% with minimal performance penalty.
With their comapct 64 and 144 pin packages, low power con sumption, various 32 -bit timers, combination of 4-channel 10-bit ADC
and 2/4 advanced CAN channels or 8-channel 10-bit ADC and 2/4 advanced CAN channels (64 and 144 pin packages
respectively), and up to 9 external interrupt pins these microcontrollers are particularly suitable for industrial control, medical
systems, access control and point-of-sale.
Number of availabl e GPIOs goes up to 46 in 64 pin package. In 144 pin packages number of available GPIOs tops 76 (with
external memory i n us e) th rou gh 1 12 (s in gle - ch ip a ppl ic ati on). Being equipped wide ran ge o f se rial co mm unications interfaces ,
they are also very well suited for communication gateways, protocol converters and embedded soft modems as well as many
other general-purpose applications.
FEATURES
• 16/32-bit ARM7TDMI-S microcontroller in a 64 or 144 pin package.
• 16 kB on-chip Static RAM
• 128/256 kB on-chip Flash Progra m Memory (at least 10,000 erat e/write cycles over the whole temperature range). 128-bit wi de
interface/accelerator enables high speed 60 MHz operation.
• External 8, 16 or 32-bit bus (144 pin package only)
• In-System Programming (ISP) and In-Application Programming (IAP) via on-chip boot-loader software. Flash programming
takes 1 ms per 512 byte line. Single sector or full chip erase takes 400 ms.
• EmbeddedICE-RT interface enables breakpoints and watch points. Interrupt service routines can continue to execute whilst
the foreground task is debugged with the on-chip RealMonitor software.
• Embedded Trace Macrocell enables non-intrusive high speed real-time tracing of instruction execution.
• Two/four interconnected CAN interfaces with advanced acceptance filters.
• Four/eight channel (64/144 pin package) 10-bit A/D converter with conversion time as low as 2.44 ms.
• Two 32-bit timers (with 4 capture and 4 compare channels), PWM unit (6 outputs), Real Time Clock and Watchdog.
2
• Multiple serial interfaces including two UARTs (16C550), Fast I
• 60 MHz maximum CPU clock available from programmable on-chip Phase-Locked Loop.
• Vectored Interrupt Controller with configurable priorities and vector addresses.
• Up to forty-six (64 pin) and hundred-twelve (144 pin package) 5 V tolerant general purpose I/O pins. Up to 12 independent
external interrupt pins available (EIN and CAP functions).
• On-chip crystal oscillator with an operating range of 1 MHz to 30 MHz.
• Two low power modes, Idle and Power-down.
• Processor wake-up from Power-down mode via external interrupt.
• Individual enable/disable of peripheral functions for power optimization.
• Dual power supply.
- CPU operating voltage range of 1.65V to 1.95V (1.8V +/- 8.3%).
- I/O power supply range of 3.0V to 3.6V (3.3V +/- 10%).
C (400 kbits/s) and two SPIs™.
Introduction16May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
APPLICATIONS
• Industrial control
• Medical systems
• Access control
• Point-of-sale
• Communication gateway
• Embedded soft modem
• general purpose applicatio ns
DEVICE INFORMATION
Table 1: LPC2119/2129/2194/2292/2294 device information
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
ARCHITECTURAL OVERVIEW
The LPC2119/2129/2194 /2292/2294 consist s of an ARM7TDMI-S CPU with emulati on support, the ARM7 Local Bus for interface
to on-chip memory contro llers, the AMBA Ad vanced High-performanc e Bus (AHB) for interf ace to the inte rrupt controller, a nd the
VLSI Peripheral Bus (VPB, a comp atible superset of ARM’s AMBA Advanced Peripheral Bu s) for connection to on-c hip peripheral
functions. The LPC2119/2129/2194/2292/2294 configures the ARM7TDMI-S processor in little-endian byte order.
AHB peripherals are allocated a 2 megabyte range of addresses at the very top of the 4 gigabyte ARM memory space. Each
AHB peripheral is allocated a 16 kilobyte address space within the AHB address space. LPC2119/2129/2194/2292/2294
peripheral functions (other than the interrupt controller) are connected to the VPB bus. The AHB to VPB bridge interfaces the
VPB bus to the AHB bus. VPB peripherals are also allocated a 2 megabyte range of addresses, beginning at the 3.5 gigabyte
address point. Each VPB peripheral is allocated a 16 kilobyte address space within the VPB address space.
The connection of on-chip pe ripherals to d evice pins i s controlled by a Pin Conne ction Block. This must be configured by software
to fit specific application requirements for the use of peripheral functions and pins.
ARM7TDMI-S PROCESSOR
The ARM7TDMI-S is a general purpose 32-bit microproce ssor, which offers high perfo rmance and very low pow er consumption .
The ARM architecture is based on Reduced Instruction Set Computer (RISC) principles, and the instruction set and related
decode mechanism are much simpler than those of microprogrammed Complex Instruction Set Computers. This simplicity
results in a high instruction throughput and impressive real-time interrupt response from a small and cost-effective processor
core.
Pipeline techniques are em plo ye d so tha t all parts of the processing and memory sy stems can operate continuou sly. Typically,
while one instruction is being executed, its successor is being decoded, and a third instruction is being fetched from memory.
The ARM7TDMI-S processor also employs a unique architectural strategy known as THUMB, which makes it ideally suited to
high-volume applications with memory restrictions, or applications where code density is an issue.
The key idea behind THUMB is that of a super-reduced instruction set. Essentially, the ARM7TDMI-S processor has two
instruction sets:
• The standard 32-bit ARM instruction set.
• A 16-bit THUMB instruction se t.
The THUMB set’s 16-bit ins truc tio n l eng th al lo ws it to ap proa ch tw ic e th e de ns ity of s tan dard AR M c ode while retaining most of
the ARM’s performance advantage over a traditional 16-bit processor using 16-bit registers. This is possible because THUMB
code operates on the same 32-bit register set as ARM code.
THUMB code is able to provide up to 65% of the code size of ARM, and 160% of the performance of an equivalent ARM
processor connected to a 16-bit memory system.
The ARM7TDMI-S processor is described in detail in the ARM7TDMI-S Datasheet that can be found on official ARM website.
ON-CHIP FLASH MEMORY SYSTEM
The LPC2219 incorporat e a 128 kB Flash m emory system, while LPC2129/ 2194/2292 /2294 incorpo rate a 256 kB Flash memory
system. This mem ory ma y be u sed fo r both c ode an d data storage . Program ming of the Flash memo ry may be ac comp lishe d in
several ways: over the serial built-in JTAG interface, using In System Programming (ISP) and UART0, or by means of In
Application Programmi ng (IAP) capabilities. Th e application pro gram, using the In Appli cation Programmin g (IAP) functions, may
also erase and/or program the Flash while the application is running, allowing a great degree of flexibility for data storage field
firmware up grades, etc.
Introduction18May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
ON-CHIP STATIC RAM
The LPC2119/2129/2194/2292/2294 provide a 16 kB static RAM memory that may be used for code and/or data storage. The
SRAM supports 8-bit, 16-bit, and 32-bit accesses.
The SRAM controller inc orpo rate s a wri te-b ac k bu ffer i n ord er to p rev ent CPU stalls during back-to-back writes. The write-back
buffer always holds the last data sent by software to the SRAM. This data is only written to the SRAM when another write is
requested by software (the data is only written to the SRAM when software does another write). If a chip reset occurs, actual
SRAM contents will not reflect the most recent write request (i.e. after a "warm" chip reset, the SRAM does not reflect the last
write operation). Any software that checks SRAM contents after reset must take this into account. Two identical writes to a
location guarantee that the data will be present after a Reset. Alternatively, a dummy write operation before entering idle or
power-down mode will similarly guarantee that the last data written will be present in SRAM after a subsequent Reset.
Introduction19May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
BLOCK DIAGRAM
Internal SRAM
Controller
16 kB
SRAM
EINT3:0
8 x CAP0
8 x MAT
Ain3:0
2
Ain7:4
P0.30:0
P1.31:16, 1:0
P2.31:0
P3.31:0
2
2
ARM7 Local Bus
External
Interrupts
Capture /
Compare
TIMER 0 & 1
Converter
2
General
Purpose I/O
Internal Flash
Controller
128/256 kB
FLASH
A/D
1
1
TMS
TRST
Test/Debug Interface
1
1
1
TDI
TCK
TDO
ARM7TDMI-S
AHB Bridge
AHB to VPB
Bridge
VPB (VLSI
Peripheral Bus)
PLL
System
Module
Emulation Trace
(Advanced High-performance Bus)
VPB
Divider
Clock
AMBA AHB
External Memory
Controller
I2C Serial
Interface
SPI Serial
Interfaces 0 & 1
UART 0 & 1
CAN
Xtal1
System
Functions
Vectored Interrupt
Controller
AHB
Decoder
2
DSR1,CTS1,D
Xtal2
RESET
CS3:0*
A23:0*
BLS3:0*
OE, WE*
D31:0*
SCL
SDA
SCK0,1
MOSI0,1
MISO0,1
SSEL0,1
TxD0,1
RxD0,1
CD1, RI1
TD2,1
RD2,1
TD4:3
RD4,3
3
3
PWM6:1
PWM0
Real Time
Clock
* Shared with GPIO
1
When Test/Debug Interface is used, GPIO/other functions sharing these pins are not available
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
LPC2119/2129/2292/2194/2294 REGISTERS
Accesses to registers in LPC2119/2129/2194/2292/2294 is restricted in the following ways:
1) user must NOT attempt to access any register locations not defined.
2) Access to any defined register locations must be strictly for the functions for the registers.
3) Register bits labeled ’-’, ’0’ or ’1’ can ONLY be written and read as follows:
- ’-’ MUST be written with ’0’, but can return any value when read (even if i t was written with ’0’). It is a reserved bit and may
be used in future derivatives.
- ’0’ MUST be written with ’0’, and will return a ’0’ when read.
- ’1’ MUST be written with ’1’, and will return a ’1’ when read.
The following table shows all registers available in LPC2119/2129/2194/2292/2294 microcontroller sorted according to the
address.
Access to the specific one can be categorized as either read/write, read only or write only (R/W, RO and WO respectively).
"Reset Value" field refe rs to the data stored in us ed/accessible bit s only. It does not inc lude reserved bits cont ent. Some registers
may contain undeterm ined data up on reset. In thi s case, reset value is ca tegorized as "un defined". Classificati on as "NA" is u sed
in case reset value is not applicable. Some registers in RTC are not affected by the chip reset. Their reset value is marked as *
and these registers must be initialized by software if the RTC is enabled.
Registers in LPC2119/2129/2194/2292/2294 are 8, 16 or 32 bits wide. For 8 bit registers shown in Table 2, bit residing in the
MSB (The Most Significant Bit) column corresponds to the bit 7 of that register, while bit in the LSB (The Least Significant Bit)
column corresponds to the bit 0 of the same register.
If a register is 16/3 2 bit wide, the b it res iding in t he top left corne r of i ts d escrip tion, is th e bit corre spond ing to the bit 1 5/31 o f the
register, while the bit in the bottom right corner corresponds to bit 0 of this register.
Examples: bit "EN A6" in PWMPCR register (add res s 0 xE001404C) represents the bit at position 14 in thi s reg ister; bits 15, 8, 7
and 0 in the same register are reserved. Bit "Stop on MR6" in PWMMCR register (0xE001 4014) corresponds to the bit at positi on
20; bits 31 to 21 of the same register are reserved.
Introduction21May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Unused (reserved) bits are marked with "-" and represented as gray fields. Access to them is restricted as already described.
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
WD
0xE0000000
0xE0000004WDTC
0xE0000008
0xE000000CWDTV
TIMER0
0xE0004000T0IR
0xE0004004T0TCR
NameDescriptionMSBLSBAccess
WD
MOD
WD
FEED
Watchdog
mode register
Watchdog
timer
constant
register
Watchdog
feed
sequence
register
Watchdog
timer value
register
T0 Interrupt
Register
T0 Control
Register
----
32 bit dataR/W0xFF
8 bit data (0xAA fallowed by 0x55)WONA
32 bit dataRO0xFF
CR3
Int.
CR2
Int.
------
CR1
Int.
CR0
Int.
WD
INTWDTOF
MR3
Int.
MR2
Int.
WDRE
SET
MR1
Int.
CTR
Reset
Reset
Value
WDENR/W0
MR0
Int.
CTR
Enable
R/W0
R/W0
0xE0004008T0TCT0 Counter32 bit dataRW0
0xE000400CT0PR
0xE0004010T0PC
0xE0004014 T0MCR
0xE0004018T0MR0
0xE000401C T0MR1
0xE0004020T0MR2
0xE0004024T0MR3
T0 Prescale
Register
T0 Prescale
Counter
T0 Match
Control
Register
T0 Match
Register 0
T0 Match
Register 1
T0 Match
Register 2
T0 Match
Register 3
4 reserved (-) bits
Reset
MR2
on
Int. on
MR2
Stop
on
MR1
32 bit dataR/W0
32 bit dataR/W0
Stop
MR3
Reset
MR1
Int. on
on
MR1
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
on
Reset
on
MR3
Stop
on
MR0
Int. on
MR3
Reset
on
MR0
Stop
on
MR2
R/W0
Int. on
MR0
Introduction22May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE0004028 T0CCR
0xE000402C T0CR0
0xE0004030T0CR1
0xE0004034T0CR2
0xE000403C T0EMR
TIMER1
0xE0008000T1IR
NameDescriptionMSBLSBAccess
T0 Capture
Control
Register
T0 Capture
Register 0
T0 Capture
Register 1
T0 Capture
Register 2
T0 External
Match
Register
T1 Interrupt
Register
4 reserved (-) bits
Int. on
Cpt.2
falling
External Match
CR3
Int. on
Cpt.2
rising
4 reserved (-) bits
Control 1
CR2
Int.
Int.
Control 0
Int.
Int. on
Cpt.1
falling
32 bit dataRO0
32 bit dataRO0
32 bit dataRO0
CR0
Int.
Int. on
Cpt.1
External Match
CR1
Control 3
Ext.
Int.
Int. on
Cpt.3
falling
Int. on
Cpt.0
Ext.
Mtch2.
MR2
Int.
Int. on
Cpt.3
Int. on
Cpt.1
rising
External Match
Mtch3.
MR3
Int. on
Cpt.3
rising
Int. on
Cpt.0
falling
External Match
Mtch.1
MR1
Control 2
Ext.
Int.
Int. on
Cpt.2
Int. on
Cpt.0
rising
Ext.
Mtch.0
MR0
Int.
Reset
Value
R/W0
R/W0
R/W0
0xE0008004T1TCR
0xE0008008T1TCT1 Counter32 bit dataRW0
0xE000800CT1PR
0xE0008010T1PC
0xE0008014 T1MCR
0xE0008018T1MR0
0xE000801C T1MR1
0xE0008020T1MR2
0xE0008024T1MR3
T1 Control
Register
T1 Prescale
Register
T1 Prescale
Counter
T1 Match
Control
Register
T1 Match
Register 0
T1 Match
Register 1
T1 Match
Register 2
T1 Match
Register 3
------
32 bit dataR/W0
32 bit dataR/W0
Stop
4 reserved (-) bits
Reset
MR2
on
Int. on
MR2
Stop
on
MR1
Reset
on
MR1
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
on
MR3
Int. on
MR1
Reset
MR3
Stop
MR0
on
on
CTR
Reset
Int. on
MR3
Reset
on
MR0
CTR
Enable
Stop
on
MR2
Int. on
MR0
R/W0
R/W0
Introduction23May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
NameDescriptionMSBLSBAccess
0xE0008028 T1CCR
0xE000802C T1CR0
0xE0008030T1CR1
0xE0008034T1CR2
0xE0008038T1CR3
0xE000803C T1EMR
UART0
U0RBR
(DLAB=0)
T1 Capture
Control
Register
T1 Capture
Register 0
T1 Capture
Register 1
T1 Capture
Register 2
T1 Capture
Register 3
T1 External
Match
Register
U0 Receiver
Buffer
Register
4 reserved (-) bits
Int. on
Cpt.2
falling
Int. on
Cpt.2
rising
4 reserved (-) bits
External Match
Control 1
Int. on
Cpt.1
Int. on
Cpt.1
falling
32 bit dataRO0
32 bit dataRO0
32 bit dataRO0
32 bit dataRO0
External Match
Control 0
8 bit dataRO
Int. on
Cpt.3
Int. on
Cpt.1
rising
Int. on
Cpt.3
falling
Int. on
Cpt.0
External Match
Control 3
Ext.
Mtch.3
Ext.
Mtch2.
Int. on
Cpt.3
rising
Int. on
Cpt.0
falling
Int. on
Cpt.2
Int. on
Cpt.0
rising
External Match
Control 2
Ext.
Mtch.1
Ext.
Mtch.0
Reset
Value
R/W0
R/W0
un-
defined
0xE000C000
U0THR
(DLAB=0)
U0DLL
(DLAB=1)
U0IER
0xE000C004
(DLAB=0)
U0DLM
(DLAB=1)
U0IIR
0xE000C008
U0FCR
0xE000C00C U0LCR
U0 Transmit
Holding
Register
U0 Divisor
Latch LSB
U0 Interrupt
Enable
Register
U0 Divisor
Latch MSB
U0 Interrupt
ID Register
U0 FIFO
Control
Register
U0 Line
Control
Register
8 bit dataWONA
8 bit dataR/W0x01
En. Rx
00000
Status
Line
Int.
Enable
THRE
Int.
En. Rx
Data
Av.Int.
R/W0
8 bit dataR/W0
FIFOs Enabled00IIR3IIR2IIR1IIR0RO0x01
Rx Trigger
DLAB
Set
Break
---
Stick
Parity
Even
Parity
Select
Parity
Enable
U0 Tx
FIFO
Reset
Nm. of
Stop
Bits
U0 Rx
FIFO
Reset
U0
FIFO
Enable
Word Length
Select
WO0
R/W0
Introduction24May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
NameDescriptionMSBLSBAccess
0xE000C014U0LSR
0xE000C01C U0SCR
UART1
U1RBR
(DLAB=0)
0xE0010000
U1THR
(DLAB=0)
U1DLL
(DLAB=1)
U1IER
0xE0010004
(DLAB=0)
U1DLM
(DLAB=1)
U0 Line
Status
Register
U0 Scratch
Pad Register
U1 Receiver
Buffer
Register
U1 Transmit
Holding
Register
U1 Divisor
Latch LSB
U1 Interrupt
Enable
Register
U1 Divisor
Latch MSB
Rx
FIFO
TEMT THREBIFEPEOEDRRO0x60
Error
8 bit dataR/W0
8 bit dataRO
8 bit dataWONA
8 bit dataR/W0x01
0000
8 bit dataR/W0
En.
Mdem
Satus
Int.
En. Rx
Line
Status
Int.
Enable
THRE
Int.
En. Rx
Data
Av.Int.
Reset
Value
un-
defined
R/W0
U1IIR
0xE0010008
U1FCR
0xE001000C U1LCR
0xE0010010
U1
MCR
0xE0010014U1LSR
0xE001001C U1SCR
0xE0010018
U1
MSR
PWM
U1 Interrupt
ID Register
U1 FIFO
Control
Register
U1 Line
Control
Register
U1 Modem
Control
Register
U1 Line
Status
Register
U1 Scratch
Pad Register
U1 Modem
Status
Register
FIFOs Enabled00IIR3IIR2IIR1IIR0RO0x01
Rx Trigger
DLAB
Set
Break
---
Stick
Parity
000
Even
Parity
Select
Loop
Back
U0 Tx
FIFO
Reset
Parity
Enable
Nm. of
Stop
00RTSDTRR/W0
Bits
U0 Rx
FIFO
Reset
U0
FIFO
Enable
Word Length
Select
WO0
R/W0
Rx
FIFO
TEMT THREBIFEPEOEDRRO0x60
Error
8 bit dataR/W0
DCDRIDSRCTS
Delta
DCD
Trailing
Edge
RI
Delta
DSR
Delta
CTS
RO0
Introduction25May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE0014000
0xE0014004
0xE0014008
0xE001400C
0xE0014010
0xE0014014
NameDescriptionMSBLSBAccess
IR
PR
PC
PWM
Interrupt
Register
PWM Timer
Control
Register
Counter
PWM
Prescale
Register
PWM
Prescale
Counter
PWM Match
Control
Register
PWM
PWM
TCR
PWMTCPWM Timer
PWM
PWM
PWM
MCR
-----
----
----
32 bit dataRW0
32 bit dataR/W0
32 bit dataR/W0
Stop
11 reserved (-) bits
Int. on
MR5
Stop
on
MR4
Reset
on
MR4
on
MR6
Int. on
MR4
MR3
Int.
PWM
Enable
Reset
on
MR6
Stop
on
MR3
MR6
Int.
MR2
Int.
Int. on
MR6
Reset
MR3
-
on
MR5
Int.
MR1
Int.
CTR
Reset
Stop
on
MR5
Int. on
MR3
MR4
Int.
MR0
Int.
CTR
Enable
Reset
on
MR5
Stop
on
MR2
R/W0
R/W0
R/W0
Reset
Value
0xE0014018
0xE001401C
0xE0014020
0xE0014024
0xE0014040
0xE0014044
0xE0014048
0xE001404C
PWM
MR0
PWM
MR1
PWM
MR2
PWM
MR3
PWM
MR4
PWM
MR5
PWM
MR6
PWM
PCR
PWM Match
Register 0
PWM Match
Register 1
PWM Match
Register 2
PWM Match
Register 3
PWM Match
Register 4
PWM Match
Register 5
PWM Match
Register 6
PWM Control
Register
Reset
MR2
Int. on
on
MR2
-ENA6ENA5ENA4ENA3ENA2ENA1-
-SEL6SEL5SEL4SEL3SEL2SEL1-
Stop
MR1
on
Reset
MR1
Int. on
on
MR1
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
32 bit dataR/W0
Stop
MR0
on
Reset
on
MR0
Int. on
MR0
R/W0
Introduction26May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE0014050
2
C
I
0xE001C000
NameDescriptionMSBLSBAccess
PWM
LER
I2CONSETI
0xE001C004 I2STAT
0xE001C008I2DAT
0xE001C00C
0xE001C010
0xE001C014
0xE001C018
I2
ADR
I2
SCLH
I2
SCLL
I2CONC
LR
PWM Latch
Enable
Register
2
C Control
Set Register
2
C Status
I
Register
2
C Data
I
Register
2
C Slave
I
Address
Register
SCL Duty
Cycle
Register High
Half Word
SCL Duty
Cycle
Register Low
Half Word
2
C Control
I
Clear
Register
Reset
Value
Ena.
PWM
M6
Latch
Ena.
PWM
M5
Latch
Ena.
PWM
M4
Latch
Ena.
PWM
M3
Latch
Ena.
PWM
M2
Latch
Ena.
PWM
M1
Latch
Ena.
PWM
M0
Latch
R/W0
-I2ENSTASTOSIAA --R/W0
5 bit Status000RO0xF8
8 bit dataR/W0
7 bit dataGCR/W0
16 bit dataR/W0x04
16 bit dataR/W0x04
-I2ENC STAC-SICAAC--WONA
SPI0
0xE0020000
0xE0020004
0xE0020008
0xE002000C
0xE002001C
SPCR
S0
SPSR
S0
SPDR
S0
SPCCR
S0
SPINT
SPI0 Control
Register
SPI0 Status
Register
SPI0 Data
Register
SPI0 Clock
Counter
Register
SPI0
Interrupt Flag
SPIELSBFMSTR CPOLCPHA
SPIFWCOL ROVR MODF ABRT---RO0
8 bit dataR/W0
8 bit dataR/W0
-------
---R/W0
SPI
Int.
R/W0
S0
SPI1
0xE0030000
SPCR
SPI1 Control
Register
SPIELSBFMSTR CPOLCPHA
---R/W0
S1
Introduction27May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE0030004
0xE0030008
0xE003000C
0xE003001C
NameDescriptionMSBLSBAccess
S1
SPSR
S1
SPDR
S1
SPCCR
S1
SPINT
RTC
0xE0024000ILR
0xE0024004CTC
0xE0024008CCR
0xE002400CCIIR
0xE0024010AMR
SPI1 Status
Register
SPI1 Data
Register
SPI1 Clock
Counter
Register
SPI1
Interrupt Flag
Interrupt
Location
Register
Clock Tick
Counter
Clock Control
Register
Counter
Increment
Interrupt
Register
Alarm Mask
Register
Reset
Value
SPIFWCOL ROVR MODF ABRT---RO0
8 bit dataR/W0
8 bit dataR/W0
-------
------
RTC
ALF
15 bit data
----CTTEST
CTC
RST
IM
YEARIMMONIMDOYIMDOWIMDOMIMHOURIMMINIMSEC
AMR
YEAR
AMR
MON
AMR
DOY
AMR
DOW
AMR
DOM
AMR
HOUR
AMR
MIN
SPI
Int.
RTC
CIF
R/W0
R/W*
-RO*
CLK
EN
R/W*
R/W*
AMR
SEC
R/W*
-----3 bit Day of Week
0xE0024014
CTIME0
Consolidated
Time
Register 0
---5 bit Hours
RO*
--6 bit Minutes
--6 bit Seconds
----
0xE0024018
CTIME1
Consolidated
Time
Register 1
----4 bit Month
12 bit Year
RO*
---5 bit Day of Month
Consolidated
0xE002401C
CTIME2
Time
reserved (-) 20 bits12 bit Day of YearRO*
Register 2
0xE0024020SEC
0xE0024024MIN
0xE0024028HOUR
Seconds
Register
Minutes
Register
Hours
Register
--6 bit dataR/W*
--6 bit dataR/W*
---5 bit dataR/W*
Introduction28May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE002402CDOM
0xE0024030DOW
0xE0024034DOY
0xE0024038
0xE002403CYEARYear Register
0xE0024060
0xE0024064
0xE0024068
0xE002406C
0xE0024070
NameDescriptionMSBLSBAccess
Day of Month
Register
Day of Week
Register
Day of Year
Register
AL
AL
AL
AL
AL
Months
Register
Alarm value
for Seconds
Alarm value
for Minutes
Alarm value
for Hours
Alarm value
for Day of
Month
Alarm value
for Day of
Week
MONTH
SEC
MIN
HOUR
DOM
DOW
Reset
Value
---5 bit dataR/W*
-----3 bit dataR/W*
reserved (-) 7 bits9 bit dataR/W*
----4 bit dataR/W*
reserved (-) 4 bits12 bit dataR/W*
--6 bit dataR/W*
--6 bit dataR/W*
---5 bit dataR/W*
---5 bit dataR/W*
-----3 bit dataR/W*
0xE0024074
0xE0024078
0xE002407C
0xE0024080
0xE0024084
GPIO PORT0
0xE0028000IO0PIN
0xE0028004 IO0SET
0xE0028008 IO0DIR
AL
DOY
AL
MON
AL
YEAR
PRE
INT
PRE
FRAC
Alarm value
for Day of
Year
Alarm value
for Months
Alarm value
for Year
Prescale
value, integer
portion
Prescale
value,
fractional
portion
GPIO 0 Pin
Value reg.
GPIO 0 Out.
Set register
GPIO 0 Dir.
control reg.
reserved (-) 7 bits9 bit dataR/W*
----4 bit dataR/W*
reserved
(-) 4 bits
reserved
(-) 3 bits
-15 bit dataR/W0
32 bit dataRONA
32 bit dataR/W0
32 bit dataR/W0
12 bit dataR/W*
13 bit dataR/W0
Introduction29May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE002800C IO0CLR
GPIO PORT1
0xE0028010IO1PIN
0xE0028014 IO1SET
0xE0028018 IO1DIR
0xE002801C IO1CLR
GPIO PORT2
0xE0028020IO2PIN
0xE0028024 IO2SET
0xE0028028 IO2DIR
NameDescriptionMSBLSBAccess
GPIO 0 Out.
Clear register
GPIO 1 Pin
Value reg.
GPIO 1 Out.
Set register
GPIO 1 Dir.
control reg.
GPIO 1 Out.
Clear register
GPIO 2 Pin
Value reg.
GPIO 2 Out.
Set register
GPIO 2 Dir.
control reg.
Reset
Value
32 bit dataWO0
32 bit dataRONA
32 bit dataR/W0
32 bit dataR/W0
32 bit dataWO0
32 bit dataRONA
32 bit dataR/W0
32 bit dataR/W0
0xE002802C IO2CLR
GPIO PORT3
0xE0028030IO3PIN
0xE0028034 IO3SET
0xE0028038 IO3DIR
0xE002803C IO3CLR
Pin Connet Block
0xE002C000
0xE002C004
PIN
SEL0
PIN
SEL1
GPIO 2 Out.
Clear register
GPIO 3 Pin
Value reg.
GPIO 3 Out.
Set register
GPIO 3 Dir.
control reg.
GPIO 3 Out.
Clear register
Pin function
select
register 0
Pin function
select
register 1
32 bit dataWO0
32 bit dataRONA
32 bit dataR/W0
32 bit dataR/W0
32 bit dataWO0
32 bit dataR/W0
32 bit dataR/W0
Introduction30May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE002C014
NameDescriptionMSBLSBAccess
PIN
SEL2
Pin function
select
register 2
ADC
0xE0034000ADCRADC Control
register
0xE0034004ADDRADC Data
register
24-bit pin configuration data (144 package case)
TEST1:0PDN
DONE
OVER
RUN
-
Reserved bits (64 package case)
configuration
data
-EDGESTART
-CLKS
8 bit data
8 bit data
-CHN
10 bit data
-
Reset
Value
R/W0
-
BURST
RW01
RWx
CAN
0xE0038000-
0xE00387FF
0xE003C000AFMR
0xE003C004 SFF_sa
0xE003C008
SFF_
GRP_sa
0xE003C00C EFF_sa
0xE003C010
0xE003C014
0xE003C018
EFF_
GRP_sa
ENDof
Table
LUT
errAd
Acceptance
Filter Reg.
Standard
Frame Indiv.
Start. Addr.
Standard
Frame Group
Start. Addr.
Extended
Frame Indiv.
Start. Addr.
Extended
Frame Group
Start. Addr.
End of AF
Tables Reg.
LUT Error
Address Reg.
2K RAM (512 x 32) of lookup receive identifiers.RW0
-----
eFCAN
AccBP AccOffRW1
-----9 - bit data
RW0
9 - bit data
--
----10 - bit dat a >>>
RW0
<<< 10 - bit data
--
-----9 - bit data
RW0
9 - bit data
--
----10 - bit dat a >>>
RW0
<<< 10 - bit data
--
----10 - bit dat a >>>
RW0
<<< 10 - bit data
--
-----9 - bit data
RO0
9 - bit data--
Introduction31May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
NameDescriptionMSBLSBAccess
0xE003C01C LUTerr
0xE0040000
0xE0040004
0xE0040008
CAN
TxSR
CAN
RxSR
CAN
MSR
CAN1 Interface
LUT Error
Register
CAN Central
Transmit
Status
Register
CAN Central
Receive
Status
Register
CAN Central
Miscellaneous
Register
Reset
Value
-------ErrorRO 0
--------
----TCS4:1
----TBS4:1
R/O
0x003F
3F00
----TS4:1
--------
----DOS4:1
R/O0
----RBS4:1
----RS4:1
--------
-------RO0
----BS4:1
----ES4:1
--------
0xE0044000 C1MOD
0xE0044004 C1CMR
0xE0044008 C1GSR
0xE004400CC1ICR
CAN1 Mode
Register
CAN1
Command
Register
CAN1 Global
Status
Register
CAN1
Interrupt and
Capture
Register
--------
--------
TM-RPMSMTPMSTMLOMRM
--------
--------
--------
STB3STB2STB1SRRCDORRBATTR
8-bit data TXERR
8-bit data RXERR
--------
BSESTSRSTCSTBSDOSRBS
---ALCBIT
ERRC
ERR
DIR
ERRBIT
-----TI3TI2IDI
BEIALIEPIWUIDOIEITI1RI
R/W
0x0000
0001
W0NA
0x0000
RO
RO
000C
0x0000
0000
Introduction32May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
NameDescriptionMSBLSBAccess
0xE0050030 C4TFI1
0xE0050034 C4TID1
0xE0050038 C4TDA1
0xE005003C C4TDB1
0xE0050040 C4TFI2
CAN4 Tx
Frame
Information
Register
(buffer 1)
CAN4 Tx
Identifier
Register
(buffer 1)
CAN4
Tx Data
Register A
(buffer 1)
CAN4
Tx Data
Register B
(buffer 2)
CAN4 Tx
Frame
Information
Register
(buffer 2)
FFRTR------
----DLC
--------
PRIO
---
29-bit (FF=1) or
11-bit data (FF=0) ID
Data 4
Data 3
Data 2
Data 1
Data 8
Data 7
Data 6
Data 5
FFRTR------
----DLC
--------
PRIO
R/W
R/W
R/W
R/W
R/W
Reset
Value
0x0000
0000
0x0000
0000
0x0000
000
0x0000
000
0x0000
0000
CAN4 Tx
---
0xE0050044 C4TID2
Identifier
Register
29-bit (FF=1) or
11-bit data (FF=0) ID
R/W
0x0000
0000
(buffer 2)
Data 4
0xE0050048 C4TDA2
CAN4
Tx Data
Register A
Data 3
Data 2
R/W
0x0000
000
(buffer 2)
Data 1
Data 8
CAN4
0xE005004C C4TDB2
Tx Data
Register B
(buffer 2)
Data 7
Data 6
R/W
0x0000
000
Data 5
Introduction43May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
NameDescriptionMSBLSBAccess
0xE0050050 C4TFI3
0xE0050054 C4TID3
0xE0050058 C4TDA3
0xE005005C C4TDB3
CAN4 Tx
Frame
Information
Register
(buffer 3)
CAN4 Tx
Identifier
Register
(buffer 3)
CAN4
Tx Data
Register A
(buffer 3)
CAN4
Tx Data
Register B
(buffer 3)
FFRTR------
----DLC
--------
PRIO
---
29-bit (FF=1) or
11-bit data (FF=0) ID
Data 4
Data 3
Data 2
Data 1
Data 8
Data 7
Data 6
Data 5
R/W
R/W
R/W
R/W
Reset
Value
0x0000
0000
0x0000
0000
0x0000
000
0x0000
000
System Control Block
0xE01FC000
0xE01FC004
0xE01FC040
0xE01FC080
0xE01FC084
0xE01FC088
0xE01FC08C
MAMCRMAM control
MAM
TIM
MEM
MAP
PLL
CON
PLL
CFG
PLL
STAT
PLL
FEED
0xE01FC0C0PCON
register
MAM timing
control
Memory
mapping
control
PLL control
register
PLL
configuration
register
PLL status
register
PLL feed
register
Power control
register
------2 bit dataR/W0
-----3 bit dataR/W0x07
------2 bit dataR/W0
------PLLCPLLER/W0
-2bit data PSEL5 bit data MSELR/W0
-----
PLOCK
PLLCPLLE
RO0
-2bit data PSEL5 bit data MSEL
8 bit dataWONA
------PDIDLR/W0
Introduction44May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
NameDescriptionMSBLSBAccess
0xE01FC0C4 PCONP
0xE01FC100
0xE01FC140
0xE01FC144
0xE01FC148
0xE01FC14C
VPB
DIV
EXT
INT
EXT
WAKE
EXT
MODE
EXT
POLAR
Power control
for
peripherals
VPB divider
control
External
interrupt flag
register
External
interrupt
wakeup
register
External
interrupt
mode register
External
interrupt
polarity
register
reserved (-) 19 bitsPCAD-
PC
SPI1PCRTCPCSPI0
R/W0x3BE
PC
I2C
PC
PWM0PCURT1PCURT0PCTIM1PCTIM0
-
------2 bit dataR/W0
----EINT3 EINT2 EINT1 EINT0R/W0
----
----
----
EXT
WAKE
EXT
MODE
EXT
POLAR
EXT
WAKE
3
EXT
MODE
3
EXT
POLAR
3
EXT
WAKE
2
EXT
MODE
2
EXT
POLAR
2
EXT
WAKE0R/W0
1
EXT
MODE0R/W0
1
EXT
POLAR
1
0
R/W0
Reset
Value
External memory Controller - EMC
0xFFE00000 BCFG0
0xFFE00004 BCFG1
0xFFE00008 BCFG2
Conf. Reg. for
mem bank 0
Conf. Reg. for
mem bank 1
Conf. Reg. for
mem bank 2
ATMW (BOOT1:0
)BM WP
WP
ERR
BUS
ERR
-------WST2RBLEWST1
WST1-IDCY
ATMW (0x2)BMWP
WP
ERR
BUS
ERR
-------WST2RBLEWST1
WST1-IDCY
ATMW (0x1)BMWP
WP
ERR
BUS
ERR
-------WST2RBLEWST1
WST1-IDCY
R/W
R/W
R/W
0x0000
FBEF
0x2000
FBEF
0x1000
FBEF
Introduction45May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xFFE0000C BCFG3
NameDescriptionMSBLSBAccess
Conf. Reg. for
mem bank 3
Vectored Interrupt Controller - VIC
0xFFFFF000
0xFFFFF004
0xFFFFF008
0xFFFFF00C
0xFFFFF010
0xFFFFF014
0xFFFFF018
VICIRQ
Status
VICFIQ
Status
VIC
RawIntr
VICInt
Select
VICInt
Enable
VICInt
EnClear
VICSoft
Int
IRQ Status
Register
FIQ Status
Register
Raw Interrupt
Status Reg.
Interrupt
Select Reg.
Interrupt
Enable Reg.
Int. Enable
Clear Reg.
Software
Interrupt Reg.
ATMW (0x0)BMWP
WP
ERR
BUS
ERR
-------WST2RBLEWST1
WST1-IDCY
32-bit dataRO0
32-bit dataRO0
32-bit dataRO0
32-bit dataR/W0
32-bit dataR/W0
32-bit dataWO0
32-bit dataR/W0
R/W
Reset
Value
0x0000
FBEF
0xFFFFF01C
0xFFFFF020
0xFFFFF030
0xFFFFF034
0xFFFFF100
0xFFFFF104
0xFFFFF13C
VICSoftI
ntClear
VIC
Protection
Vect
VIC
Addr
VICDef
ectAddr
Vect
VIC
Addr0
Vect
VIC
Addr1
Vect
VIC
Addr15
Software Int.
Clear Reg.
Protection
Enable Reg.
Vector
Address Reg.
V
Default Vec.
Addr.Reg.
Vector
adr. 0 reg.
Vector
adr. 1 reg.
Vector
adr. 15 reg.
32-bit dataW0
32-bit dataR/W0
32-bit dataR/W0
32-bit dataR/W0
32-bit dataR/W0
32-bit dataR/W0
...
32-bit dataR/W0
Introduction46May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xFFFFF200
0xFFFFF204
0xFFFFF23C
NameDescriptionMSBLSBAccess
Vect
VIC
Cntl0
VIC
Cntl1
Vect
Vect. Control
0 Reg.
Vect. Control
1 Reg.
--
--
1-bit
data
1-bit
data
5-bit dataR/W0
5-bit dataR/W0
...
Vect. Control
Vect
VIC
Cntl15
15 Reg.
--
1-bit
data
5-bit dataR/W0
Reset
Value
Introduction47May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
2. LPC2119/2129/2292/2294 MEMORY ADDRESSING
MEMORY MAPS
The LPC2119/2129/2194/2292/2294 incorporates several distinct memory regions, shown in the following figures. Figure 2
shows the overall map of the entire address space from the user program viewpoint following reset. The interrupt vector area
supports address re-mapping, which is described later in this section.
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Notes:
- AHB section is
128 x 16 kB blocks
(totaling 2 MB).
- VPB section is
128 x 16 kB blocks
(totaling 2 MB).
4.0 GB
4.0 GB - 2 MB
3.75 GB
AHB Peripherals
0xFFFF FFFF
0xFFE0 0000
0xFFDF FFFF
Reserved
0xF000 0000
0xEFFF FFFF
Reserved
3.5 GB + 2 MB
VPB Peripherals
3.5 GB
Figure 3: Peripheral Memory Map
Figures 3 through 5 show different views of the peripheral address space. Both the AHB and VPB peripheral areas are 2
megabyte spaces whic h are divided up into 128 periph erals. Each peripheral space is 16 kilobytes in size . This allows simplifyi ng
the address decod ing for ea ch perip heral. All periphera l registe r addresses are wor d aligned (to 32-bit b oundar ies) regard less of
their size. This eliminate s th e nee d for byte lane mapping hardwa re tha t woul d be requi red to all ow by te (8- bit) o r hal f-w ord (16bit) accesses to occur at smaller boundaries. An implication of this is that word and half-word registers must be accessed all at
once. For example, it is not possible to read or write the upper byte of a word register separately.
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
LPC2119/2129/2194/2292/2294 MEMORY RE-MAPPING AND BOOT BLOCK
Memory Map Concepts and Operating Modes
The basic conce pt on the LPC211 9/2129/2194 /2292/2294 i s that each m emory area h as a "natural" location in the memo ry map.
This is the address range for which code residing in that area is written. The bulk of each memory space remains permanently
fixed in the same location, eliminating the need to have portions of the code designed to run in different address ranges.
Because of the location of the interrupt vectors on the ARM7 processor (at addresses 0x0000 0000 through 0x0000 001C, as
shown in Table 3 below), a sma ll portion of the Boot Blo ck and SRAM spa ces need to be re-ma pped in order to al low alternati ve
uses of interrupts in the different operating modes described in Table 4. Re-mapping of the interrupts is accomplished via the
Memory Mapping Control feature described in the System Control Block section.
*: Identified as reserved in ARM do cumen tation , this loca tion is us ed by the Boot Loader as the Valid User Progra m key. Thi s is
descibed in detail in Flash Memory System and Programming on page 262.
The Boot Loader always
mapped to the bottom of memory to allow handling exceptions and using interrupts
during the Boot Loading process.
Activated by Boot Loader whe n a valid User Program Si gnature is recogni zed in memory
and Boot Loader operation is not forced. Interrupt vectors are not re-mapped and are
found in the bottom of the Flash memory.
Activated by a User Program as de sir ed. In terru pt ve ctors are re-mapped to the bottom
of the Static RAM.
Activated by the Boot Loader when either or both BOOT pins are low at the end of
RESET low. Interrupt vectors are re-mapped from the bottom of the external memory
map.
Note: This mode is available in LPC2292/2294 only!
executes after any reset. The Boot Block interrupt vectors are
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Memory Re-Mapping
In order to allo w for com patibili ty with future der ivatives , the en tire Boot Block i s mapped to the top of t he on -chip mem ory space.
In this manner, the use of larger or smaller flash modules will not require changing the location of the Boot Block (which would
require changing the Boot Loader code itself ) or changing the mappin g of the Boot Block interru pt vectors. Memo ry spaces other
than the interrupt vectors remain in fixed locations. Figure 6 shows the on-chip memory mapping in the modes defined above.
The portion of memory that is re-mapped to allow interrupt processing in different modes includes the interrupt vector area (32
bytes) and an additional 32 bytes, for a total of 64 bytes. The re-mapped code locations ove rlay addresses 0x0000 0000 throu gh
0x0000 003F. A typical u ser progra m in th e Flash memory c an place the entir e FIQ h andler at addre ss 0x0000 001C w ithout a ny
need to consider memory boundaries. The vector contained in the SRAM, external memory, and Boot Block must contain
branches to the actual interrupt handlers, or to other instructions that accomplish the branch to the interrupt handlers.
There are three reasons this configuration was chosen:
1. To give the FIQ handler in the Flash memory the advantage of not having to take a memory boundary caused by the remapping into account.
2. Minimize the need to for th e SRAM and Bo ot Blo ck vec to rs to deal with arbitrary boun dari es in th e mi ddl e of cod e sp ac e.
3. To provide space to store constants for jumping beyond the range of single word branch instructions.
Re-mapped memory are as, includin g the Boot Block and interr upt vectors, con tinue to appear in their original loc ation in additi on
to the re-mapped address.
Details on re-mapping and examples can be found in System Control Block on page 64.
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
PREFETCH ABORT AND DATA ABORT EXCEPTIONS
The LPC2119/2129/2194/2292/2294 generates the appropriate bus cycle abort exception if an access is attempted for an
address that is in a reserved or unassigned address region. The regions are:
• Areas of the memory map that are not implemented for a specific ARM derivative. For the LPC2119/2129/2194/2292/2294,
this is:
- Address space between On-Chip Non-Volatile Memory and On-Chip SRAM, labelled "Reserved for On-Chip Memory" in
Figure 2 and Figure 6 . For 128 kB Fla sh devic e, this is me mory a ddress range from 0x 0002 0 000 to 0 x3FFF FFFF, while for
256 kB Flash device this range is from 0x0004 0000 to 0x3FFF FFFF.
- Address space between On-Chip Static RAM and External Memory. Labelled "Reserved for On-Chip Memory" in Figure 2.
This is an address range from 0x4000 3FFF to 0x7FFF DFFF.
- External Memory other than that provided by the EMC in the 144-pin package.
- Reserved regions of the AHB and VPB spaces. See Figure 3.
• Unassigned AHB peripheral spaces. See Figure 4.
• Unassigned VPB peripheral spaces. See Figure 5.
For these areas, both atte mpted data acc ess and instruc tion fetch gen erate an excep tion. In additi on, a Prefetch Abort exceptio n
is generated for any instruction fetch that maps to an AHB or VPB peripheral address.
Within the addres s spa ce of an ex is tin g VPB peri phe ral, a data abort exce pti on is not generated in response to an access to an
undefined address. Address decoding within each peri pheral is limited to that neede d to distinguish defined reg ist ers within th e
peripheral itself. Fo r example, an access to address 0xE0 00D000 (an un defined add ress wit hin the UART0 space) may result in
an access to the register defined at address 0xE000C000. Details of such address aliasing within a peripheral space are not
defined in the LPC2119/2129/2194/2292/2294 documentation and are not a supported feature.
Note that the ARM core stores the Prefetch Abort flag along with the associated instruction (which will be meaningless) in the
pipeline and processes the abort only if an attempt is made to execute the instruction fetched from the illegal address. This
prevents acciden tal abort s that co uld be ca used by prefetc hes tha t occur w hen co de is exec uted ve ry ne ar a memo ry boun dary.
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
3. EXTERNAL MEMORY CONTROLLER (EMC)
This module is available in LPC2292 and LPC2294 only.
FEATURES
• Supports static memory-mapped devices including RAM, ROM, flash, burst ROM, and some external I/O devices.
• Asynchronous page mode read operation in non-clocked memory subsystems
• Asynchronous burst mode read access to burst mode ROM devices
• Independent configuration for up to four banks, each up to 16M Bytes
• Programmable bus turnaround (idle) cycles (1 to 16)
• Programmable read and write WAIT states (up to 32), for static RAM devices
• Programmable initial and subsequent burst read WAIT state, for burst ROM devices
• Programmable write protection
• Programmable burst mode operation
• Programmable external data width, 8, 16, or 32 bits
• Programmable read byte lane enable control
DESCRIPTION
The external Static Memory Controller is an AMBA AHB slave module which provides an interface between an AMBA AHB
system bus and externa l (off-chip) m emory devic es. It provide s support fo r up to four indep endently c onfigurabl e memory b anks
simultaneously. Ea ch memory bank is capable of s upporting SRAM, R OM, Flash EPROM, Burst ROM memory, o r some external
I/O devices
Each memory bank may be 8, 16, or 32 bits wide.
This module is avai lable in LP C2219 and LPC2 294only. Since this 1 44 pin packa ge pins out ad dress lines A[ 23:0], the deco ding
among the four banks uses address bits A[25:24]. The native location of the four banks is at the start of the External Memory
area identified in Figure 2 on page 48, but Bank 0 can b e used for ini tial booti ng under c ontrol of t he stat e of the BOOT [1:0] pi ns.
The external memory controller contains 4 registers as shown in Table 7.
NameDescriptionAccess
BCFG0Configuration register for memory bank 0Read/Write0x0000 FBEF0xFFE00000
BCFG1Configuration register for memory bank 1Read/Write0x2000 FBEF0xFFE00004
BCFG2Configuration register for memory bank 2Read/Write0x1000 FBEF0xFFE00008
BCFG3Configuration register for memory bank 3Read/Write0x0000 FBEF0xFFE0000C
Table 7: External Memory Controller Register Map
Each register selects the following options for its memory bank:
• The number of idle clock cycles inserted between between read and write accesses in this bank, and between an access in
another bank and an access in this bank, to avoid bus contention between devices (1 to 17 clocks)
• the length of read accesses, except for subsequent reads from a burst ROM (3 to 35 clocks)
• the length of write accesses (3 to 19 clocks)
• whether the bank is write-protected
• whether the bank is 8, 16, or 32 bits wide
Reset Value
(see Table 9)
Address
External Memory Controller (EMC)57May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Bank Configuration Registers 0 - 3 (BCFG0-3 - 0xFFE00000-0C).
BCFG0-3NameFunctionReset Value
This field controls the minimum number of “idle” CCLK cycles that the EMC maintains
3:0IDCY
between read and write accesse s in this bank, and betw een an access in anothe r bank
and an access in this bank, to avoid bus contention between devices. The number of
idle CCLK cycles between such accesses is the value in this field plus 1.
1111
4Reserved
9:5WST1
10RBLE
15:11WST2
16:23Reserved
24BUSERR
25WPERR
26WPA 1 in this bit write-protects the bank.0
Reserved, user software should not wri te ones to res erved bits. The va lue read from a
reserved bit is not defined.
This field controls the length of read accesses, except for subsequent reads from a
burst ROM. The length of such rea d accesses , in CCLK cycles, is the value in this fiel d
plus 3.
This bit should be 0 for banks composed of byte-wide or non-b yte -par titi one d de vices,
so that the EMC d rives the BLS3:0 lin es Hig h during read access es. Thi s bit sh ould be
1 for banks compos ed of 16 -bi t and 32 -bit w ide de vices that i nclud e byte selec t inpu ts,
so that the EMC drives the BLS3:0 lines Low during read accesses.
For SRAM banks, this field controls the length of write accesses, which consist of:
• one CCLK cycle of address setup with CS, BLS, and WE high,
• (this value plus 1) CCLK cycles with address valid and CS, BLS, and WE low, and
• one CCLK cycle with address valid, CS low, BLS and WE high.
For burst ROM banks, thi s field co ntro ls the leng th of subs equent accesse s, whic h are
(this value plus 1) CCLK cycles long.
Reserved, user software should not wri te ones to res erved bits. The va lue read from a
reserved bit is not defined.
The only known case in which this bit is s et is if th e EM C detects an AMBA req ues t for
more than 32 bits of data. The ARM7TDMI-S will not make such a request.
This bit is set if software attem pts to wr ite to a bank that ha s the W P bit 1. Write a 1 to
this bit to clear it.
NA
11111
0
11111
NA
0
0
27BMA 1 in this bit identifies a burst-ROM bank.0
29:28MW
31:30ATAlways write 00 to this field.00
Table 8: Bank Configuration Registers 0-3 (BCFG0-3 - 0xFFE00000-0C)
The table below shows the state of BCFG0[29:28] after the Boot Loader has run. The hardware reset state of these bits is 10.
Bank BOOT[1:0] during Reset BCFG[29:28] Reset value Memory Width
This field controls the width of the data bus for this bank:
00=8 bit, 01=16 bit, 10=32 bit, 11=reserved
see Table 9
External Memory Controller (EMC)58May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
EXTERNAL MEMORY INTERFACE
External memory interface depends on the bank width (32, 16 or 8 bit selected via MW bits in corresponding BCFG register).
Furthermore, choice of the memory chip(s) will require an adequate setup of RBLE bit in BCFG register, too. RBLE = 0 in case
of 8-bit based external memories, while memory chips capable of accepting 16 or 32 bit wide data will work with RBLE = 1.
If a memory bank is configured to be 32 bits wide, address lines A0 and A1 can be used as non-address lines. Memory bank
configured to 16 bits wide will not require A0, while 8 bit wide memory bank will require address lines down to A0. Configuring
A1 and/or A0 line(s) to provide address or non-address function is acomplished using bits 23 and 24 in Pin Function Select
Register 2 (PINSEL2 register).
Symbol "a_b" in follo wing figures refers to the highest orde r address line in the d ata bus. Symbol " a_m" refers to the high est order
address line of the memory chip used in the external memory interface
CS
OE
BLS[3]
CE
OE
WE
BLS[2]
CE
OE
WE
BLS[1]
CE
OE
WE
BLS[0]
CE
OE
WE
D[31:24]
A[a_b:2]
CS
OE
WE
BLS[3]
BLS[2]
D[31:16]
A[a_b:2]
b) 32 bit wide memory bank interfac ed t o 16 bit memory chips
IO[7:0]
A[a_m:0]
CE
OE
WE
UB
LB
IO[15:0]
A[a_m:0]
D[23:16]
a) 32 bit wide memory bank interfac ed to 8 bit memory chips
BLS[1]
BLS[0]
D[15:0]
IO[7:0]
A[a_m:0]
CE
OE
WE
UB
LB
IO[15:0]
A[a_m:0]
D[15:8]
IO[7:0]
A[a_m:0]
WE
A[a_b:0]
c) 32 bit wide memory bank interf aced
D[7:0]
CS
OE
BLS[3]
BLS[2]
BLS[1]
BLS[0]
D[31:0]
to 32 bit memory chip
CE
OE
WE
B3
B2
B1
B0
IO[31:0]
A[a_m:0]
IO[7:0]
A[a_m:0]
Figure 7: 32 Bit Bank External Memory Interfaces
External Memory Controller (EMC)59May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
CS
OE
CS
OE
BLS[1]
CE
OE
WE
BLS[0]
CE
OE
WE
WE
BLS[1]
BLS[0]
CE
OE
WE
UB
LB
D[15:8]
IO[7:0]
A[a_m:0]
A[a_b:1]
a) 16 bit wide memory bank interfaced
to 8 bit memory chips
Figure 8: 16 Bit Bank External Memory Interfaces
D[7:0]
IO[7:0]
A[a_m:0]
A[a_b:1]
a) 16 bit wide memory bank interfac ed
to 16 bit memory chips
CS
OE
CE
OE
BLS[0]
D[7:0]
WE
IO[7:0]
A[a_m:0]
A[a_b:0]
Figure 9: 8 Bit Bank External Memory Interface
D[15:0]
IO[15:0]
A[a_m:0]
External Memory Controller (EMC)60May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
TYPICAL BUS SEQUENCES
Following figures show typical external read and write access cycles. XCLK is the clock signal avalable on P3.23. While not
necessary used by external memory, In these examples it is used to provide the time reference (XCLK and CCLK were set to
have the same frequency).
1 wait state (WST1=0)
XCLK
CS
OE
WE/BLS
Addr
Data
XCLK
CS
OE
WE/BLS
Addr
Data
valid address
changevalid data
2 wait states (WST1=1)
valid address
changevalid data
Figure 10: External memory read access (WST1=0 and WST1=1 examples)
WST2=0
XCLK
CS
OE
WE/BLS
Addr
Data
XCLK
CS
OE
WE/BLS
Addr
Data
valid address
valid data
WST2=1
valid address
valid data
Figure 11: External memory write access (WST2=0 and WST2=1 examples)
Figure 10 and Figure 11 are showing typ ical read an d write acces ses to exte rnal memo ry. Howeve r, variation s can be noti ced in
some particular cases.
For example, when the first read access to the memory bank that has just been selected is performed, CS and OE lines may
become low one XCLK cycle earlier than it is shown in Figure 10.
Likewise, in a sequenc e of several consec utive write accesse s to SRAM, the last write acce ss will look like thos e shown in Figure
11. On the other ha nd, lea ding write cycles i n th at ca se w ill h ave data valid one cycle longer. Also, is lo ated write access will be
identical to the one in Figure 11.
External Memory Controller (EMC)61May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
EXTERNAL MEMORY SELECTION
Based on the des cription of the EMC opera tion and ex ternal memo ry in genera l (appropriate read and write access tim es tAA and
t
respecitely), the fo llowing table ca n be construc ted and u sed for ex ternal me mory sel ection. t
WRITE
XCLK cycle (see Fi gure 10 and Fi gure 11 ). f
is the maximum c cl k f r equ enc y ac hie va ble in the s ys tem w ith s ele cte d e xte rnal
max
memory.
Table 10: External memory and system requirements
is the period of a single
CYC
Access
cycle
Standard
Read
Standard
Write
Max. frequency
2 + WST1
f
<= ———————
max
t
RAM
+ 20ns
1 + WST2
<= ———————
f
max
t
RAM
+ 5ns
WST setting
(WST>=0; round up to integer)
WST1>=
t
WST2>=
t
—————————
t
+ 20ns
RAM
—————— - 2
t
CYC
- t
WRITE
CYC
CYC
+ 5ns
Required memory access time
t
RAM
t
WRITE
<= t
*(2+WST1) - 20ns
CYC
<= t
*(1+WST2) - 5ns
CYC
External Memory Controller (EMC)62May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
External Memory Controller (EMC)63May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
4. SYSTEM CONTROL BLOCK
SUMMARY OF SYSTEM CONTROL BLOCK FUNCTIONS
The System Control Block includes several system features and control registers for a number of functions that are not related
to specific peripheral devices. These include:
• Crystal Oscillator.
• External Interrupt Inputs.
• Memory Mapping Control.
• PLL.
• Power Control.
• Reset.
• VPB Divider.
• Wakeup Timer.
Each type of fu nction has it s own reg ister(s) if any are required and unnee ded bits a re defined as reserved i n order to allow future
expansion. Unrelated f unctions never share the same register addresses.
PIN DESCRIPTION
Table 11 shows pins that are associated with System Control block functions.
Table 11: Pin summary
Pin namePin directionPin Description
X1InputCrystal Oscillator Input- Input to the oscillator and internal clock generator circuits.
X2OutputCrystal Oscillator Output- Output from the oscillator amplifier.
External Interrupt Input 0- An ac tive low general p urpose interru pt input. This pin may be
used to wake up the processor from Idle or Po wer down modes.
EINT0Input
EINT1Input
EINT2Input
Pins P0.1 and P0.16 can be selected to perform EINT0 function.
LOW level on this pin immediately after reset is considered as an external hardware
request to start the ISP command ha ndler. More de tails on ISP and Flash memory can be
found in "Flash Memory System and Programming" chapter.
External Interrupt Input 1- See the EINT0 description above.
Pins P0.3 and P0.14 can be selected to perform EINT1 function.
External Interrupt Input 2- See the EINT0 description above.
Pins P0.7 and P0.15 can be selected to perform EINT2 function.
External Interrupt Input 3- See the EINT0 description above.
EINT3Input
Pins P0.9, P0.20 and P0.30 can be selected to perform EINT3 function.
R
ESETInput
External Reset input- A low on this pin resets the chi p, causing I/O ports and periphe rals
to take on their default states, and the processor to begin execution at address 0.
System Control Block64May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
System Control Block65May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
REGISTER DESCRIPTION
All registers, regardless of size, are on word address boundaries. Details of the registers appear in the description of each
function.
PLLCFGPLL Configuration Register.R/W00xE01FC084
PLLSTATPLL Status Register.RO00xE01FC088
PLLFEEDPLL Feed Register.WONA0xE01FC08C
Power Control
PCONP ower Control Register.R/W00xE01FC0C0
PCONPPower Control for Peripherals.R/W0x3BE0xE01FC0C4
VPB Divider
VPBDIVVPB Divider Control.R/W00xE01FC100
Reset
Value*
Address
*Reset Value refers to the data stored in used bits only. It does not include reserved bits content.
System Control Block66May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
CRYSTAL OSCILLATOR
While an input signal of 50-50 duty cycle within a frequency range from 1 MHz to 50 MHz can be used by LPC2119/2129/2194/
2292/2294 if supplie d to its input XTAL1 pin, this micro controller’s onbo ard oscillator circuit sup ports external crystals in t he range
of 1 MHz to 30 MHz only. If on-chip PLL system or b oot-loader is used, input clock frequency is limi ted to ex cl us iv e ran ge of 10
MHz to 25 MHz.
The oscillator output freq uen cy is ca lle d F
equations, etc. else where in t his d ocum ent. F
and the ARM processor clock frequenc y is referred to as cclk for purposes of rate
osc
and cclk are the same val ue unless the PLL is running and con nected. Refer to
osc
the PLL description in this chapter for details and frequency limitations.
Onboard oscillator in LPC2119/2129/2194/2292/2294 can operate in one of two modes: slave mode and oscillation mode.
In slave mode the input cloc k si gna l sho uld be cou pl ed by mean s of a ca pac itor of 100 pF (Cc in Figure 12, drawin g a) , with an
amplitude of at leas t 200mVrms. X2 pin in this co nfig ura tion can be left not connected. If slave mode is se lec ted , F
signal of
osc
50-50 duty cycle can range from 1 MHz to 50 MHz.
External components and models use d in oscilla tion mode are shown in Figure 12, drawings b and c, and in Table 13 . Since the
feedback resistance is integrated on chip, only a crystal and the capacitances C
case of fundamental mod e oscillatio n (the fundamenta l frequency is repr esented by L, C
drawing c, represents the par all el pa ck age cap aci tance and should not be larger than 7 pF. Para me ters F
and CX2 need to be connected externally in
X1
and RS). Capacitance Cp in Figur e 12,
L
, CL, RS and CP are
C
supplied by the crystal manufa ctu rer.
Choosing an oscillation mode as an on-board oscillator mode of operation limits F
LPC2119/29/94
LPC2292/2294
X1X2
C
C
Clock
LPC2119/29/94
LPC2292/2294
X1X2
C
X1
Xtal
C
X2
clock selection to 1 MHz to 30 MHz.
osc
L
<=>
C
R
C
L
S
P
a)b)c)
Figure 12: Oscillator modes and models: a) slave mode of operation, b) oscillation mode of operation,
c) external crystal model used for C
Table 13: Recommended values for C
Fundamental Oscillation
Frequency F
C
Crystal Load
Capacitance C
in oscillation mode (crystal and external components parameters)
X1/X2
Max. Crystal Series
L
Resistence R
X1/X2
evaluation
S
External Load
Capacitors C
X1
, C
X2
10 pFn.a.n.a.
1 - 5 MHz
20 pFn.a.n.a.
30 pF< 300 :58 pF, 58 pF
System Control Block67May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 13: Recommended values for C
Fundamental Oscillation
Frequency F
C
Crystal Load
Capacitance C
5 - 10 MHz
10 - 15 MHz
15 - 20 MHz
20 - 25 MHz
25 - 30 MHz
in oscillation mode (crystal and external components parameters)
(Figure 12, mode a and/or b) (Figure 12, mode a) (Figure 12, mode b)
Figure 13: F
selection algorithm
OSC
System Control Block68May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
EXTERNAL INTERRUPT INPUTS
The LPC2119/2129/2194/2292/2294 includes four External Interrupt Inputs as selectable pin functions. The External Interrupt
Inputs can optionally be used to wake up the processor from the Power Down mode.
Register Description
The external interrupt function has four registers associated with it. The EXTINT register contains the interrupt flags, and the
EXTWAKEUP register contains bits that enable individual external interrupts to wake up the LPC2119/2129/2292/2294 from
Power Down mode. The EXTMODE and EXTPOLAR registers specify the level and edge sensitivity parameters.
Table 14: External Interrupt Registers
AddressNameDescriptionAccess
0xE01FC140EXTINT
0xE01FC144EXTWAKE
0xE01FC148EXTMODE
0xE01FC14CEXTPOLAR
The External Interrupt Flag Register contains interrupt flags for EINT0, EINT1,
and EINT2. See Table 15.
The External Interrupt Wakeup Register contains three enable bits that control
whether each external inte rrup t will ca use the proc es so r to w ake u p fro m Pow e r
Down mode. See Table 16.
The External Interrupt Mode R egister co ntrols whethe r each pin is edge- or levelsensitive.
The External Interrupt Polarity Regi ster controls w hich leve l or edge on ea ch pin
will cause an interrupt.
R/W
R/W
R/W
R/W
External Interrupt Flag Register (EXTINT - 0xE01FC140)
When a pin is selected for its external interrupt function, the level or edge on that pin se le cte d by its bi ts i n the EXT POL AR and
EXTMODE registers will set its interrupt flag in this register. This asserts the corresponding interrupt request to the VIC, which
will cause an intrerrupt if interrupts from the pin are enabled.
Writing ones to bits EINT0 thr ough EINT3 in EXTINT register cl ears the corre sponding bits. In level-se nsitive m ode this action is
efficacious only when the pin is in its innactive state.
System Control Block69May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 15: External Interrupt Flag Register (EXTINT - 0xE01FC140)
EXTINTFunctionDescription
In level-sensitive mode, this bit is set i f the EINT0 func tion is selec ted for its p in, and
the pin is in its active state. In edge-sensitive mode, this bit is set if the EINT0
function is selected for its pin, and the selected edge occurs on the pin.
0EINT0
1EINT1
2EINT2
Up to two pins can be selected to perform EINT0 function (see P0.1 and P0.16
description in "Pin Configuration" chapter.)
This bit is cleared by writi ng a one to it, except in level sensit ive mode when the pi n
is in its active state.
In level-sensitive mode, this bit is set i f the EINT1 func tion is selec ted for its p in, and
the pin is in its active state. In edge-sensitive mode, this bit is set if the EINT1
function is selected for its pin, and the selected edge occurs on the pin.
Up to two pins can be selected to perform EINT1 function (see P0.3 and P0.14
description in "Pin Configuration" chapter.)
This bit is cleared by writi ng a one to it, except in level sensit ive mode when the pi n
is in its active state.
In level-sensitive mode, this bit is set i f the EINT2 func tion is selec ted for its p in, and
the pin is in its active state. In edge-sensitive mode, this bit is set if the EINT2
function is selected for its pin, and the selected edge occurs on the pin.
Up to two pins can be selected to perform EINT2 function (see P0.7 and P0.15
description in "Pin Configuration" chapter.)
Reset
Value
0
0
0
This bit is cleared by writi ng a one to it, except in level sensit ive mode when the pi n
is in its active state.
In level-sensitive mode, this bit is set i f the EINT3 func tion is selec ted for its p in, and
the pin is in its active state. In edge-sensitive mode, this bit is set if the EINT3
function is selected for its pin, and the selected edge occurs on the pin.
3EINT3
7:4Reserved
Up to three pins can be selected to perform EINT3 function (see P0.9, P0.20 and
P0.30 description in "Pin Configuration" chapter.)
This bit is cleared by writi ng a one to it, except in level sensit ive mode when the pi n
is in its active state.
Reserved, user software should not write ones to reserved bits. The value read
from a reserved bit is not defined.
Enable bits in the EXTWAKE register allow the external interrupts to wake up the processor if it is in Power Down mode. The
related EINTn function must be mapped to the pin in order for the wakeup process to take place. It is not necessary for the
interrupt to be enabled in the Vectored Interrupt Controller for a wakeup to take place. This arrangement allows additional
capabilities, such as having an external interrupt input wake up the processor from Power Down mode without causing an
interrupt (simply resuming operation), or allowing an interrupt to be enabled during Power Down without waking the processor
up if it is asserted (eliminating the need to disable the interrupt if the wakeup feature is not desirable in the application).
System Control Block70May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
0EXTWAKE0When one, assert ion of EINT 0
1EXTWAKE1When one, assert ion of EINT 1
2EXTWAKE2When one, assert ion of EINT 2
3EXTWAKE3When one, assert ion of EINT 3 will wake up the processor from Power Down mode.0
7:4Reserved
Reserved, user software should not write ones to reserved bits. The value read
from a reserved bit is not defined.
will wake up the processor from Power Down mode.0
will wake up the processor from Power Down mode.0
will wake up the processor from Power Down mode.0
The bits in thi s registe r select whether ea ch EINT pin is level- o r edge-se nsitive. Only pin s that are select ed for the EINT fu nction
(chapter Pin Connec t Block on pa ge 126) an d enabled via the VI CIntEnable re gister (ch apter Ve ctored Inte rrupt Control ler (VIC)
on page 96) can cause interrupts from the External Interrupt function (though of course pins selected for ) other functions may
cause interrupts from those funct ion s).
Note: Software should only change a bit in this regis ter when its interrupt is disable d in VICIntEnable, and sh ould write
the corresponding 1 to EXTINT before re-enabling the interrupt, to clear the EXTINT bit that could be set by changing
the mode.
0EXTMODE0When 0, level-sensitivity is selected for EINT0. When 1, EINT0 is edge-sensitive.0
1EXTMODE1When 0, level-sensitivity is selected for EINT1. When 1, EINT1 is edge-sensitive.0
2EXTMODE2When 0, level-sensitivity is selected for EINT2. When 1, EINT2 is edge-sensitive.0
3EXTMODE3When 0, level-sensitivity is selected for EINT3. When 1, EINT3 is edge-sensitive.0
7:4Reserved
Reserved, user software should not write ones to reserved bits. The value read
from a reserved bit is not defined.
In level-sensitive mode, the bits in this register select whether the corresponding pin is high- or low-active. In edge-sensitive
mode, they select whether the pin is rising- or falling-edge sensitive. Only pins that are selected for the EINT function (chapter
Pin Connect Block on page 126) a nd e nab led in the VICIntEnable register (ch apt er Vec tore d Int errup t C ont roll er (VIC) on page
96) can cause interrupts from the External Interrupt function (though of course pins selected for other functions may cause
interrupts from those functions ).
Note: Software should only change a bit in this regis ter when its interrupt is disable d in VICIntEnable, and sh ould write
the corresponding 1 to EXTINT before re-enabling the interrupt, to clear the EXTINT bit that could be set by changing
the polarity.
System Control Block71May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
When 0, EINT0 is low-active or falling-edge sensitive (depending on EXTMODE0).
When 1, EINT0 is high-active or rising-edge sensitive (depending on EXTMODE0).
When 0, EINT1 is low-active or falling-edge sensitive (depending on EXTMODE1).
When 1, EINT1 is high-active or rising-edge sensitive (depending on EXTMODE1).
When 0, EINT2 is low-active or falling-edge sensitive (depending on EXTMODE2).
When 1, EINT2 is high-active or rising-edge sensitive (depending on EXTMODE2).
When 0, EINT3 is low-active or falling-edge sensitive (depending on EXTMODE3).
When 1, EINT3 is high-active or rising-edge sensitive (depending on EXTMODE3).
Reserved, user softw are should n ot write o nes to reser ved bits . The valu e read from
a reserved bit is not defined.
Reset
Value
0
0
0
0
NA
Multiple External Interrupt Pins
Software can select multiple pins for each of EINT3:0 in the Pin Select registers, which are described in chapter Pin Connect
Block on page 126. The external inte rrupt logic for each of EINT3:0 recei ves the stat e of al l of it s as so ci ated pin s from the p ins’
receivers, alon g with signals th at indic ate wh ether each p in is selected for the EINT functi on. The e xternal interrupt l ogic ha ndles
the case when more than one pin is so selected, differently according to the state of its Mode and Polarity bits:
• In Low-Active Level Sensitive m ode, the stat es of all pin s selected f or EINT functiona lity are d igitally co mbined using a positive
logic AND gate.
• In High-Active Level Sensitive mode , the states of all p ins selected fo r EINT functionalit y are digitally c ombined using a po sitive
logic OR gate.
• In Edge Sensitive mode, regardless of polarity, the pin with the lowest GPIO port number is used. (Selecting multiple EINT pins
in edge-sensitive mode could be considered a programmi ng error.)
The signal derived by this logic is the EINTi signal in the following logic schematic (Figure 14).
When more than one EINT pi n is logically ORed , the interrupt service ro utine can read the s tates of the pins from G PIO port using
IO0PIN0 and IO1PIN registers, to determine which pin(s) caused the interrupt.
System Control Block72May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
EINTi
EXTPOLARi
EXTMODEi
Write 1 to EXTINTi
VPB Bus Data
Glitch
Filter
Reset
Wakeup Enable
(one bit of EXTWAKE)
QD
pclk
1
S
D
Q
R
Figure 14: External Interrupt Logic
VPB Read
of EXTWAKE
EINTi to
Wakeup Timer
(Figure 16)
Interrupt Flag
(one bit of EXTINT)
S
Q
R
pclkpclk
S
Q
R
to VIC
VPB Read
of EXTINT
System Control Block73May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
MEMORY MAPPING CONTROL
The Memory Mapping Control alters the mapping of the interrupt vectors that appear beginning at address 0x00000000. This
allows code running in different memory spaces to have control of the interrupts.
Memory Mapping Control Register (MEMMAP - 0xE01FC040)
Table 19: MEMMAP Register
AddressNameDescriptionAccess
0xE01FC040MEMMAP
Table 20: Memory Mapping Control Register (MEMMAP - 0xE01FC040)
MEMMAPFunctionDescription
1:0MAP1:0
7:2Reserved
*: The hardware reset value of the MAP bits is 00 for LPC2119/2129/2194/2292/2294 parts. The apparent reset value that the
user will see will be altered by the Boot Loader code, which always runs initially at reset. User documentation will reflect this
difference.
Memory mapping control. Selects whether the ARM interrupt vectors are read
from the Flash Boot Block, User Flash or RAM.
00: Boot Loader Mode. Interrupt vectors are re-mapped to Boot Block.
01: User Flash Mode. Interrupt vectors are not re-mapped and reside in Flash.
10: User RAM Mode. Interrupt vectors are re-mapped to Static RAM.
11: User External memory Mode. Interrupt vectors a re re-mapped to exte rnal memory.
This mode is available in L2292/2294 only and must not be specified when
LPC2119/2129/2194 are used.
Warning: Improper set tin g of t his v alue may result in inco rrect o perati on of the devi ce.
Reserved, user software shou ld not write ones to reserved b its. The value rea d from a
reserved bit is not defined.
R/W
Reset
Value*
0
NA
Memory Mapping Control Usage Notes
Memory Mapping Cont rol simply selects one out of three available sources of data (sets of 64 bytes each) nec essary for handling
ARM exceptions (interrupts).
For example, whenever a Software Interrupt request is generated, ARM core will always fetch 32-bit data "residing" on 0x0000
0008 (see Table 3, “ARM Exception Ve ctor Locations,” o n page 52). This means that wh en MEMMAP[1:0]=10 (User R AM Mode),
read/fetch from 0x0000 0008 will provide data stored in 0x4000 0008. If MEMMAP[1:0]=01 (User Flash Mode), read/fetch from
0x0000 0008 will provide da ta st ored in on-chi p Flash locatio n 0x000 0 0008. In c ase of MEMM AP[1:0]=00 (Boot Lo ader Mod e),
read/fetch from 0x0000 00 08 will provide da ta availbl e also at 0x7FFF E00 8 (Boot Block re mapped from on-c hip Flash memory).
System Control Block74May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
PLL (PHASE LOCKED LOOP)
The PLL accepts an input clock frequency in the range of 10 MHz to 25 MHz only. The input frequency is multiplied up into the
cclk with the range of 10 MHz to 60 MHz using a Current Controlled Osc illator (CCO). Th e multiplier c an be an integ er value from
1 to 32 (in practice, the multiplier value cannot be higher than 6 on the LPC2119/2129/2194/2292/2294 due to the upper
frequency limit of th e CPU ). The CC O op erates in the range o f 156 M Hz to 32 0 MH z, so t here is an add itiona l divi der in the loo p
to keep the CCO within its frequency range while the PLL is providing the desired output frequency. The output divider may be
set to divide by 2, 4, 8, or 16 to pro duc e the outp ut cl oc k. Sin ce the mi ni mu m output divider value is 2, it is insured that the PLL
output has a 50% duty cycle. A block diagram of the PLL i s shown in Figure 15.
PLL activation is con trolled via the PLLC ON register. The PLL mu ltiplier and divider v alues are controlle d by the PLLCFG regist er.
These two registers are protected in order to prevent accidental alteration of PLL parameters or deactivation of the PLL. Since
all chip operations, including the Watchdog Timer, are dependent on the PLL when it is providing the chip clock, accidental
changes to the PLL setup could result in unexpected behavior of the microcontroller. The protection is accomplished by a feed
sequence similar to that of the Watchdog Timer. Details are provided in the description of the PLLFEED register.
The PLL is turned off and bypassed fol lowing a chip Reset and when by entering pow er Down mode. PLL is enabled by software
only. The program must configure and activate the PLL, wait for the PLL to Lock, then connect to the PLL as a clock source.
Register Description
The PLL is controlled by the registers shown in Table 21. More detailed descriptions follow.
Warning: Improper setting of PLL values may result in incorrect operation of the device.
Table 21: PLL Registers
AddressNameDescriptionAccess
PLL Control Register. Holding register for updating PLL control bits. Values
0xE01FC080PLLCON
0xE01FC084PLLCFG
0xE01FC088PLLSTAT
0xE01FC08CPLLFEED
written to this register do not take effect until a valid PLL feed sequ ence has taken
place.
PLL Configuration Register. Holding register for updating PLL configuration
values. Values written to this register do not take effect until a valid PLL feed
sequence has taken place.
PLL Status Register. Read-back register for PLL control and configuration
information. If PLLCON or PLLCFG have been written to, but a PLL feed
sequence has not yet occurred, they will not reflect the current PLL state.
Reading this registe r provides the actual val ues controlling the PL L, as well as the
status of the PLL.
PLL Feed Register. This register enables loading of the PLL control and
configuration information from the PLLCON and PLLCFG registers into the
shadow registers that actually affect PLL operation.
R/W
R/W
RO
WO
System Control Block75May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
PLLC
PLLE
F
OSC
PSEL[1:0]
PLOCK
MSEL[4:0]
Clock
Synchronization
Direct
0
pd
pd
Bypass
0
Phase-
Frequency
Detector
CCO
F
CCO
1
0
cd
/2P
0
1
0
cclk
1
pd
fout
cd
Div-by-M
msel<4:0>
Figure 15: PLL Block Diagram
PLL Control Register (PLLCON - 0xE01FC080)
The PLLCON register contains the bits that enable and connect the PLL. Enabling the PLL allows it to attempt to lock to the
current settings of th e m ul tipl ie r and di vi der va lues. Connecting the PLL causes the process or a nd a ll ch ip functions to run from
the PLL output clock. Changes to the PLLCO N register d o not take effect until a co rrect PLL fee d sequen ce has been given (se e
PLL Feed Register (PLLFEED - 0xE01FC08C) description).
System Control Block76May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 22: PLL Control Register (PLLCON - 0xE01FC080)
PLLCONFunctionDescription
0PLLE
1PLLC
7:2Reserved
The PLL must be set up, enabled, and Lock established before it may be used as a clock source. When switching from the
oscillator clock to the PLL output or vice versa, internal circuitry synchronizes the operation in order to ensure that glitches are
not generated. Hardw are does not insu re that the PLL is lo cked bef ore it is con nected or autom atically di sconnec t the PLL i f lock
is lost during opera tion. In the event of l oss of PLL lock, it i s likely that the o scillator clock has become unst able and disconnecting
the PLL will not remedy the situation.
PLL Enable. When one, and after a valid PLL feed, this bit will activate the PLL and
allow it to lock to the requested frequency. See PLLSTAT register, Table 24.
PLL Connect. When PLLC and PLLE are both set to one, and after a valid PLL feed,
connects the PLL as the clock source for the LPC2119/2129/2194/2292/2294.
Otherwise, the oscil lator clock is used di rectly by the LPC 2119/2129 /2194/229 2/2294 .
See PLLSTAT register, Table 24.
Reserved, user software shou ld not write ones to reserved b its. The value rea d from a
reserved bit is not defined.
Reset
Value
0
0
NA
PLL Configuration Register (PLLCFG - 0xE01FC084)
The PLLCFG register contains the PLL multiplier and divider values. Changes to the PLLCFG register do not take effect until a
correct PLL feed sequenc e has been giv en (see PLL Feed Re gister (PLLFEED - 0xE01FC08C) desc ription). Calcul ations for the
PLL frequency, and multiplier and divider values are found in the PLL Frequency Calculation section.
PLL Multiplier value. Supplies the value "M" in the PLL frequency calculations.
4:0MSEL4:0
6:5PSEL1:0
7Reserved
Note: For details on sele cting the rig ht value for MSEL 4:0 see sec tion "PLL Frequ ency
Calculation" on page 79.
PLL Divider value. Supplies the value "P" in the PLL frequency calculations.
Note: For details on selecting the right val ue for PSEL1:0 see section "PL L Frequency
Calculation" on page 79.
Reserved, user software shou ld not write ones to reserved b its. The value rea d from a
reserved bit is not defined.
Reset
Value
0
0
NA
PLL Status Register (PLLSTAT - 0xE01FC088)
The read-only PLLSTAT register provides the actual PLL parameters that are in effect at the time it is read, as well as the PLL
status. PLLSTAT may di sagree with values foun d in PLLCON and PLLCFG beca use changes to those re gisters do not take effe ct
until a proper PLL feed has occurred (see PLL Feed Register (PLLFEED - 0xE01FC08C) description).
System Control Block77May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 24: PLL Status Register (PLLSTAT - 0xE01FC088)
PLLSTATFunctionDescription
4:0MSEL4:0Read-back for the PLL Multiplier value. This is the value currently used by the PLL.0
6:5PSEL1:0Read-back for the PLL Divider value. This is the value currently used by the PLL.0
7Reserved
8PLLE
9PLLC
10PLOCK
15:11Reserved
PLL Interrupt
The PLOCK bit in the PLLSTAT register is connected to the interrupt controller. This allows for software to turn on the PLL and
continue with other fun ctions without having to wait for the PLL to ach ieve lock. Wh en the interru pt occurs (PLOCK = 1), the PLL
may be connected, and the interrupt disabled.
Reserved, user software shou ld not write ones to reserved bits. The value rea d from
a reserved bit is not defined.
Read-back for the PLL Enable bit. When one, the PLL is currently activated. When
zero, the PLL is turne d off. This bit is aut omatically cleared w hen Power Do wn mode
is activated.
Read-back for the PLL Conne ct bit. W hen PLLC and PLLE are both one, the PLL is
connected as the c lock so urce fo r the LPC 2119 /2129/ 2194/22 92/229 4. W hen ei ther
PLLC or PLLE is zero, the PLL is bypassed and the oscillator clock is used directly
by the LPC2119/212 9/2194/2292/2294 . This bit is automatically c leared when Power
Down mode is activated.
Reflects the PLL Lock status . When zero , the PLL is no t locked. Wh en one, the PLL
is locked onto the requested frequency.
Reserved, user software shou ld not write ones to reserved bits. The value rea d from
a reserved bit is not defined.
Reset
Value
NA
0
0
0
NA
PLL Modes
The combinations of PLLE and PLLC are shown in Table 25.
Table 25: PLL Control Bit Combinations
PLLCPLLEPLL Function
00PLL is turned off and disconnected. The system runs from the unmodified clock input.
01The PLL is active, but not yet connected. The PLL can be connected after PLOCK is asserted.
10
11The PLL is active and has been connected as the system clock source.
Same as 0 0 combination. This preven ts the possibility of the PLL bei ng connected without als o being
enabled.
PLL Feed Register (PLLFEED - 0xE01FC08C)
A correct feed sequence mus t be written to the PLLFEED regi ster in or der for chang es to the PLLCO N and PLLCFG reg isters to
take effect. The feed sequence is:
1. Write the value 0xAA to PLLFEED
2. Write the value 0x55 to PLLFEED.
System Control Block78May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
The two writes must be in the correct sequence, and must be consecutive VPB bus cycles. The latter requirement implies that
interrupts must be disabled for the duration of the PLL feed operation. If either of the feed values is incorrect, or one of the
previously mentioned conditions is not met, any changes to the PLLCON or PLLCFG register will not become effective.
The PLL feed sequence must be written to this register in order for PLL
configuration and control register changes to take effect.
Reset
Value
undefined
PLL and Power Down Mode
Power Down mode automatically turns off and disconnects the PLL. Wakeup from Power Down mode does not automatically
restore the PLL settings, this must be done in software. Typically, a routine to activate the PLL, wait for lock, and then connect
the PLL can be called at the begin ning of a ny inte rrupt service ro utine th at migh t be cal led due to the wake up. It is import ant not
to attempt to restart the PLL by simply feeding it when execution resumes after a wakeup from Power Down mode. This would
enable and connect the PLL at the same time, before PLL lock is established.
PLL Frequency Calculation
The PLL equations use the following parameters:
F
OSC
F
CCO
cclkthe PLL output frequency (also the processor clock frequency)
MPLL Multiplier value from the MSEL bits in the PLLCFG register
PPLL Divider value from the PSEL bits in the PLLCFG register
the frequency from the crystal oscillator
the frequency of the PLL current controlled oscillator
The PLL output frequency (when the PLL is both active and connected) is given by:
F
cclk = M * F
or cclk = ———
osc
cco
2 * P
The CCO frequency can be computed as:
F
= cclk * 2 * P or F
cco
cco
= F
* M * 2 * P
osc
The PLL inputs and settings must meet the following:
• F
is in the range of 10 MHz to 25 MHz.
osc
• cclk is in the range of 10 MHz to F
is in the range of 156 MHz to 320 MHz.
• F
cco
(the maximum allowed frequency for the LPC2119/2129/2194/2292/2294).
max
System Control Block79May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Procedure for Determining PLL Settings
If a particular application uses the PLL, its configuration may be determined as follows:
1. Choose the desired processor operating frequency (cclk). This may be based on processor throughput requirements,
need to support a spec ific set o f UART baud rates, etc. Be ar in m ind that pe riph eral d evices may be run nin g from a lowe r
clock than the processor (see the VPB Divider description in this chapter).
2. Choose an oscillator frequency (F
3. Calculate the value of M to c onfigure the MSEL bits. M = cclk / F
to the MSEL bits in PLLCFG is M - 1 (see Table 28).
4. Find a value for P to con fig ure the PSEL b its, s uc h t hat F
the equation given abov e. P must have on e of the valu es 1, 2, 4, or 8. Th e value writt en to the PSEL bits in PL LCFG is 00
). cclk must be the whole (non-fractional) multiple of F
osc
. M must be in the rang e of 1 to 32 . Th e va lue w ritte n
osc
is within its defined frequency lim its. F
cco
for P = 1; 01 for P = 2; 10 for P = 4; 11 for P = 8 (see Table 27).
Table 27: PLL Divider Values
osc
.
is calculated using
cco
PSEL Bits
(PLLCFG bits 6:5)
001
012
104
118
Table 28: PLL Multiplier Values
MSEL Bits
(PLLCFG bits 4:0)
000001
000012
000103
000114
......
1111031
1111132
Value of P
Value of M
PLL Example
System design asks for F
Based on th ese specific ations, M = cclk / F
Value for P can be derived from P = F
the lowest allowed fre quency for F
= 10 MHz and requires cclk = 60 MHz.
osc
= 60 MHz / 10 MHz = 6. Consequenty, M-1 = 5 will be written as PLLCFG 4:0.
osc
/ (cclk * 2), using condition that F
cco
= 156 MHz, P = 156 MHz / (2*60 MHz) = 1.3. The highest F
cco
must be in range of 156 MHz to 320 M Hz. Assuming
cco
frequency criteria prod uces
cco
P = 2.67. The only solut ion for P tha t sa tis fies both of these requirements and is listed in Table 27 i s P = 2. Th ere fore, PLLCFG
6:5 = 1 will be used.
System Control Block80May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
POWER CONTROL
The LPC2119/2129/2194/2292/2294 supports two reduced power modes: Idle mode and Power Down mode. In Idle mode,
execution of instr uctions is susp ended until ei ther a Reset or i nterrupt occurs. Peri pheral functi ons continue operation during Idle
mode and may generate interrupts to cause the processor to resume execution. Idle mode eliminates power used by the
processor itself, memory systems and related controllers, and internal buses.
In Power Down mode, the oscillator is shut down and the chip receives no internal clocks. The processor state and registers,
peripheral registers, and internal SRAM values are preserved throughout Power Down mode and the logic levels of chip pins
remain static. The Power Down mode can be terminated and normal operation resumed by either a Reset or certain specific
interrupts that are able to function without clocks. Since all dynamic operation of the chip is suspended, Power Down mode
reduces chip power consumption to nearly zero.
Entry to Power Down and Idle mode s must be coord inated with program ex ecution. Wake up from Power Down or Id le modes via
an interrupt resumes program execut ion in such a wa y that no instru ctions are los t, incomplete, or repeated. Wake u p from Power
Down mode is discussed further in the description of the Wakeup Timer later in this chapter.
A Power Control for Peripherals feature allows individual peripherals to be turned off if they are not needed in the application,
resulting in additional power savings.
Register Description
The Power Control function contains two registers, as shown in Table 29. More detailed descriptions follow.
Table 29: Power Control Registers
AddressNameDescriptionAccess
Power Control Register. This register contains control bits that enable the two
0xE01FC0C0PCON
0xE01FC0C4PCONP
reduced power operating modes of the LPC2119/2129/2194/2292/2294. See
Table 30.
Power Control for Peripheral s Register. This register contains control bits that
enable and disable indiv idual pe riphera l functi ons, Allo wing elim inati on of pow er
consumption by peripherals that are not needed.
R/W
R/W
Power Control Register (PCON - 0xE01FC0C0)
The PCON register contai ns two bits. Writin g a one to the corres ponding bit caus es entry to either the Power Down or Idle mode.
If both bits are set, Power Down mode is entered.
System Control Block81May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 30: Power Control Register (PCON - 0xE01FC0C0)
PCONFunctionDescription
Idle mode - when 1, this bit causes the processor clock to be stopped, while on-chip
0IDL
1PD
7:2Reserved
peripherals remain activ e. Any enabled interrupt from a peripheral or an ex ternal interrupt
source will cause the processor to resume execution.
Power Down mode - when 1, this bit causes the oscillator and all on -chip clocks to be
stopped. A wakeup condition from an external interrupt can cause the oscillator to restart, the PD bit to be cleared, and the processor to resume execution.
Reserved, user software should not write ones to reserved bits. The value read from a
reserved bit is not defined.
Reset
Value
0
0
NA
Power Control for Peripherals Register (PCONP - 0xE01FC0C4)
The PCONP register all ows turn ing off selec ted pe riphera l func tions for the p urpose of savin g pow er. A few p eriphe ral fun ctions
cannot be turned off (i.e. the Watchdog timer, GPIO, the Pin Con ne ct blo ck , a nd the Sys te m Co ntro l b loc k ). Ea ch bi t in PC ON P
controls one of the peripherals. The bit numbers correspond to the related peripheral number as shown in the VPB peripheral
map in the LPC2119/2129/2292/2294 Memory Addressing section.
Table 31: Power Control for Peripherals Register for LPC2119/2129/2292 (PCONP - 0xE01FC0C4)
PCONP FunctionDescription
0Reserved
Reserved, user software s hould not writ e ones to res erved bits. The value read fro m a reserve d
bit is not defined.
Reset
Value
0
1PCTIM0 When 1, TIMER0 is enabled. When 0, TIMER0 is disabled to conserve power.1
2PCTIM1 When 1, TIMER1 is enabled. When 0, TIMER1 is disabled to conserve power.1
3PCURT0 When 1, UART0 is enabled. When 0, UART0 is disabled to conserve power.1
4PCURT1 When 1, UART1 is enabled. When 0, UART1 is disabled to conserve power.1
5PCPWM0 When 1, PWM0 is enabled. When 0, PWM0 is disabled to conserve power.1
6Reserved
7PCI2CWhen 1, the I
8PCSPI0When 1, the SPI0 interface is enabled. When 0, the SPI0 is disabled to conserve power.1
9PCRTCWhen 1, the RTC is enabled. When 0, the RTC is disabled to conserve power.1
10PCSPI1When 1, the SPI1 interface is enabled. When 0, the SPI1 is disabled to conserve power.1
11Reserved User software should write 0 here to reduce power consumption.1
User software should not write ones to reserved bits. The value read from a reserved bit is not
defined.
2
C interface is enabled. When 0, the I2C interface is disabled to conserve power.1
0
System Control Block82May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 31: Power Control for Peripherals Register for LPC2119/2129/2292 (PCONP - 0xE01FC0C4)
PCONP FunctionDescription
12PCADWhen 1, the A/D converter is enabled. When 0, the A/D is disabled to conserve power.1
When 1, CAN Controller 1 is enabled. When 0, it is disabled to save power.
13PCCAN1
Note: the Acceptance Filter is enabled if any of CAN Controllers 1-2 is enabled.
14PCCAN2 When 1, CAN Controller 2 is enabled. When 0, it is disabled to save power.1
31:15Reserved
Table 32: Power Control for Peripherals Register for LPC2194/2294 (PCONP - 0xE01FC0C4)
PCONP FunctionDescription
0Reserved
1PCTIM0 When 1, TIMER0 is enabled. When 0, TIMER0 is disabled to conserve power.1
2PCTIM1 When 1, TIMER1 is enabled. When 0, TIMER1 is disabled to conserve power.1
3PCURT0 When 1, UART0 is enabled. When 0, UART0 is disabled to conserve power.1
4PCURT1 When 1, UART1 is enabled. When 0, UART1 is disabled to conserve power.1
Reserved, user software s hould not writ e ones to res erved bits. The value read fro m a reserve d
bit is not defined.
Reserved, user software s hould not writ e ones to res erved bits. The value read fro m a reserve d
bit is not defined.
Reset
Value
1
NA
Reset
Value
0
5PCPWM0 When 1, PWM0 is enabled. When 0, PWM0 is disabled to conserve power.1
6Reserved
7PCI2CWhen 1, the I
8PCSPI0When 1, the SPI0 interface is enabled. When 0, the SPI0 is disabled to conserve power.1
9PCRTCWhen 1, the RTC is enabled. When 0, the RTC is disabled to conserve power.1
10PCSPI1When 1, the SPI1 interface is enabled. When 0, the SPI1 is disabled to conserve power.1
11PCEMC
12PCADWhen 1, the A/D converter is enabled. When 0, the A/D is disabled to conserve power.1
13PCCAN1 When 1, CAN Controller 1 is enabled. When 0, it is disabled to save power.1
14PCCAN2 When 1, CAN Controller 2 is enabled. When 0, it is disabled to save power.1
15PCCAN3 When 1, CAN Controller 3 is enabled. When 0, it is disabled to save power. 1
16PCCAN4 When 1, CAN Controller 4 is enabled. When 0, it is disabled to save power.1
31:17Reserved
User software should not write ones to reserved bits. The value read from a reserved bit is not
defined.
2
C interface is enabled. When 0, the I2C interface is disabled to conserve power.1
When 1, the External Memory Controller is enabled. When 0, the EMC is disabled to conserve
power.
Reserved, user software s hould not writ e ones to res erved bits. The value read fro m a reserve d
bit is not defined.
0
1
0
System Control Block83May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
POWER CONTROL USAGE NOTES
After every reset, PCONP reg ist er contai ns the valu e that en ables al l inte rfaces and periphe rals c ontrol led b y the PCONP to be
enabled. Therefore, apart from proper configuring via peripheral dedicated registers, user’s application has no need to access
the PCONP in order to start using any of the on-board peripherals.
Power saving orien ted s ystems shoul d hav e 1s in the PCONP reg ister only in pos ition s that matc h peri pherals reall y us ed in the
application. All other bits , declare d to be "Rese rved" or ded icate d to the perip herals not used in th e current appli catio n, must be
cleared to 0.
System Control Block84May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
RESET
Reset has two sources on the LPC2119/2129/2194/2292/2294: the RESET pin and Watchdog Reset. The RESET pin is a
Schmitt trigger input pin with an additional glitch filter. Assertion of chip Reset by any source starts the Wakeup Timer (see
Wakeup Timer description later in this chapter), causing reset to remain asserted until the external Reset is de-asserted, the
oscillator is running, a fixed number of clocks have passed, and the Flash controller has completed its initialization. The
relationship between Reset, the oscillator, and the Wakeup Timer are shown in Figure 16.
The Reset glitch fi lter al lows th e proce ssor t o igno re exte rnal reset p ulses that a re very short , and al so de termin es the minim um
duration of R
when crystal oscillator is fully running and an adequate signal is present on the X1 pin of the LPC2119/2129/2194/2292/2294.
Assuming that an external crystal is used in the crystal os cilla tor subs ystem , after power on, the R
for 10 ms. For all subsequent resets when crystal osillator is already running and stable signal is on the X1 pin, the R
needs to be asserted for 300 ns only.
ESET that must be asserted in order to guaran tee a chip reset. Once as serted, RESET pin can be deasserted only
ESET pin should be asserted
ESET pin
Speaking in general, there are no sequence requirements for powering up the supplies (V
proper reset handli ng It is absolut ely necessary to have valid vol tage supply on V
dedicated hardware are powe red by the m. V
Consequently, not providing V
power supply will not affect the reset sequence itself, but will prevent microcontroller from
3
pins enable microcontroller’s interface to the environment via its digit al pins.
3
pins, since on-chi p Reset circuit and o scillator
18
, V3, V
18
and V3A). However, for
18A
communicating with external world.
When the internal Reset is rem oved, the p rocessor be gins executin g at address 0, which is initially the Reset vector mappe d from
the Boot Block. At that po int, all of the processor and peripheral registers have been initialized to predetermined values.
External and internal Resets have some small differences. An external Reset causes the value of certain pins to be latched to
configure the part. External circuitry cannot determine when an internal Reset occurs in order to allow setting up those special
pins, so those latches are not reloaded during an internal Reset. Pins that are examined during an external Reset for various
purposes are: P1.20/TRACESYNC, P1.26/RTCK, BOOT1 and BOOT0 (see chapters Pin Configuration on page 110, Pin
Connect Block on page 126 and External Memory Controller (EMC) on page 56). Pin P0.14 (see Flash Memory System and
Programming on page 262) is exemined by on-chip bootloader when this code is executed after reset.
It is possible for a chip Reset to occur during a Flash programming or erase operation. The Flash memory will interrupt the
ongoing operation and hold off the completion of Reset to the CPU until internal Flash high voltages have settled.
External
Reset
Watchdog
Reset
C
Q
S
Reset to
kFlash shell
Reset to
PCON.PD
Power Down
EINT0 Wakeup
EINT1 Wakeup
EINT2 Wakeup
EINT3 Wakeup
CAN1 Wakeup
CAN2 Wakeup
CAN3 Wakeup*
CAN4 Wakeup*
*LPC2194/2292/2294 only
Oscillator
Output (F
OSC
)
Wakeup Timer
StartCount 2
Write "1"
from VPB
Reset
n
C
Q
S
VPB Read
of PDbit
in PCON
F
OSC
to
PLL
Figure 16: Reset Block Diagram including Wakeup Timer
System Control Block85May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
VPB DIVIDER
The VPB Divider determines the relationshi p between the processor cl ock (cclk) and the clock used by peripheral devices (pcl k).
The VPB Divider serves t wo purpose s. The fi rst is to p rovides peripheral s with desi red pclk v ia VPB bus so that th ey can operate
at the speed c hosen for the ARM p roces sor. In order to ac hieve this, the VP B bu s ma y be slowed dow n to one ha lf or one fo urth
of the processor clock ra te. Beca use the VPB bu s mus t work prope rly at po wer up (an d its ti ming can not be a ltered i f it doe s not
work since the VPB divider control registers reside on the VPB bus), the default condition at reset is for the VPB bus to run at
one quarter speed. The se co nd p urpo se of the VPB Div ide r is to all ow p ower sav in gs when an app lic at ion do es not requ ire any
peripherals to run at the full processor rate.
The connection of the VPB Divider relative to the oscillator and the processor clock is shown in Figure 17. Because the VPB
Divider is connected to the PLL output, the PLL remains active (if it was running) during Idle mode.
VPBDIV Register (VPBDIV - 0xE01FC100)
The VPB Divider register contains two bits, allowing three divider values, as shown in Table 34.
Table 33: VPBDIV Register Map
AddressNameDescriptionAccess
0xE01FC100VPBDIVControls the rate of the VPB clock in relation to the processor clock.R/W
The rate of the VPB clock is as follows:
0 0: VPB bus clock is one fourth of the processor clock.
0 1: VPB bus clock is the same as the processor clock.
1:0VPBDIV
3:2Reserved
5:4XCLKDIV
7:6Reserved
1 0: VPB bus clock is one half of the processor clock.
1 1: Reserved. If this value is written to the VPBDIV register, it has no effect (the
previous setting is retained).
Reserved, user software shou ld not write ones to reserved b its. The value rea d from a
reserved bit is not defined.
In the LPC2292/2294 (part s in 144 packages) o nly, these bits c ontrol the clock that can
be driven onto the A23/XCLK pin. They have the same encoding as the VPBDIV bits
above. A bit in the PINSEL2 register (Pin Conn ect Block on page 126) controls whether
the pin carries A23 or the clock selected by this field.
Note: If this field and VPBDIV ha ve the same value, the same clock is used o n the
VPB and XCLK. (This might be useful for external logic dealing with the VPB
peripherals).
Reserved, user software shou ld not write ones to reserved b its. The value rea d from a
reserved bit is not defined.
Reset
Value
0
0
0
0
System Control Block86May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Crystal Oscillator
or
External Clock Source
)
(F
osc
PLL
Processor Clock
(cclk)
VPB Divider
Figure 17: VPB Divider Connections
VPB Clock
(pclk)
System Control Block87May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
WAKEUP TIMER
The purpose of the wakeup timer is to ensure that the oscillator and other analog functions required for chip operation are fully
functional before the pr ocessor is allowed to e xecute instructi ons. This is important at power on, all types of R eset, and whenever
any of the aforementioned functions are turned off for any reason. Since the oscillator and other functions are turned off during
Power Down mode, any wakeup of the processor from Power Down mode makes use of the Wakeup Timer.
The Wakeup Timer monitors the crystal oscillator as the means of checking whether it is safe to begin code execution. When
power is applied to the chi p, or som e event ca used th e chip to exit Powe r down mode, som e time is req uired fo r the osc illato r to
produce a signal of su fficie nt amplitud e to dr ive the c lock logi c. The am ount of tim e depe nds on m any fact ors, inclu ding the rate
of Vdd ramp (in the cas e o f po w er on ), th e ty pe of c ry sta l a nd i ts ele ctri ca l cha r act eris ti cs (if a quartz crystal is used), as well as
any other external circuit ry (e.g. cap acitor s), and the c haracteris tics of th e oscil lator its elf unde r the exis ting ambien t con ditions.
Once a clock is detected, the Wakeup Timer counts 4096 clocks, then enables the Flash memory to initialize. When the Flash
memory initialization is complete, the processor is released to execute instructions if the external Reset has been de-asserted.
In the case where an external clock source is used in the system (as opposed to a crystal connected to the oscillator pins), the
possibility that there could be l ittle or no d elay for oscilla tor start-up m ust be consi dered. The Wake up Timer desi gn then ens ures
that any other required chip functions will be operational prior to the beginning of program execution.
The LPC2119/2129/2194/2292/2294 does not contain any analog function such as comparators that operate without clocks or
any independent clock source such as a dedicated Watchdog oscillator. The only remaining functions that can operate in the
absence of a clock source are the external interrupts (EINT0, EINT1, EINT2 and EINT3) and the CAN controllers. When an
external interrupt is enabled for wakrup, and its selected event occurs, an oscillator wakeup cycle is started. Similarly,if a CAN
block is enabled for wakeup and activity occurs on its CAN bus , an oscillato r wakeup c ycle is stat rted. The actu al interrupt ( if any)
occurs after the wakeup time expires, and is handled by the Vectored Interrupt Controller (VIC).
However, the pin mu ltiplexi ng on the LPC21 19/2129/21 94/229 2/229 (see Pin Configura tion on p age 110 and Pin Connect Bl ock
on page 126) was d es ign ed to allow other peripherals to, in effect , bri ng the device out of powe r do w n m od e. The fo llo w ing pi n function pairings a llow i nterrupts from event s rela ting to UART0 or 1, SPI 0 or 1, or th e I
/ EINT2, RxD1 / EINT3, DCD1 / EINT1, RI1 / EINT2, SSEL1 / EINT3.
To put the device in power down mode and allow activity on one or more of these buses or lines to power it back up, software
should reprogram the pi n function to Extern al Interrupt, sel ect the appropr iate mode and p olarity for the I nterrupt, and then select
power down mode. Upon wakeup software should restore the pin mulitplexing to the peripheral function.
All of the bus- or line-activity indications in the list above happen to be low-active. If software wants the device to come out of
power -down mode in response to actity on more than one pin that share the same EINTi channel, it should program low-level
sensitivity for that channel, because only in level mode will the channel logically OR the signals to wake the device.
The only flaw in this scheme is that the time to restart the oscillator prevents the LPC2119/2129/2194/2292/229 from capturing
the bus or line activ ity that wa kes it up . Idle mod e is more app ropriat e than power -down mo de for dev ices that must cap ture and
respond to external activity in a timely manner.
To summarize: on the LPC2119/2129/2194/2292/2294, the Wakeup Timer enforces a minimum reset duration based on the
crystal oscillator, and is activated whenever there is a wakeup from Power Down mode or any type of Reset.
2
C: RxD0 / EINT0, SDA / EINT1, SSEL0
System Control Block88May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
System Control Block89May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
5. MEMORY ACCELERATOR MODULE (MAM)
INTRODUCTION
Simply put, the Memory Accelerator Module (MAM) attempts to have the next ARM instruction that will be needed in its latches
in time to prevent CPU fetch stal ls. The me tho d use d is to spli t the Fl as h memory into two bank s, each cap abl e of ind ep end ent
accesses. Each of the two F lash bank s has i ts ow n Prefetc h Buffe r and Bra nch Tra il Buffe r. The Bra nch Trail Buffers for the t wo
banks capture two 128-b it l ine s of Fl as h da ta whe n an In stru ction Fetch is not satisfied b y ei ther the Prefetch buffer nor Branch
Trail buffer for its bank, and for which a prefetch has not been initiated. Each prefetch buffer captures one 128-bit line of
instructions from its Flash bank, at the conclusion of a prefetch cycle initiated speculatively by the MAM.
Each 128 bit value includes four 32-bit ARM instructions or eight 16-bit Thumb instructions. During sequential code execution,
typically one Flash bank contains or is fetching the current instruction and the entire Flash line that contains it. The other bank
contains or is prefetching the next sequential code line. After a code line delivers its last instruction, the bank that contained it
begins to fetch the ne xt line in that bank.
Timing of Flash read operations is programmable and is described later in this section as well as in the System Control Block
section.
Branches and othe r pro gram f low c ha nge s cause a break in the sequential flow of instruction fetches described abo ve. Wh en a
backward branch occurs, there is a distinct possibility that a loop is being executed. In this case the Branch Trail Buffers may
already contain the target instruction. If so, execution continues without the need for a Flash read cycle. For a forward branch,
there is also a chance that the new addres s is already contai ned in on e of the Prefetc h Buffers . If it is, the bra nch is again taken
with no delay.
When a branch outsi de the con ten ts of the Branch Trail an d Prefetc h buffe rs is ta ken, on e Flas h Acces s cy cle is ne ede d to loa d
the Branch Trail buffers . Subseq uently , there wil l typic ally b e no furthe r fetch de lays unti l anothe r such “Instr uct ion Mi ss” occurs.
The Flash memory controller detects data accesses to the Flash memory and uses a separate buffer to store the results in a
manner similar to that us ed during code fetches . This allows faster acces s to data if it is accessed sequ entially. A single lin e buffer
is provided for data accesses, as opposed to the two buffers per Flash bank that are provided for code accesses. There is no
prefetch function for data accesses.
Memory Accelerator Module Blocks
The Memory Accelerator Module is divided into several functional blocks:
• A Flash Address Latch for each bank. An Incrementer function is associated with the Bank 0 Flash Address latch.
• Two Flash Memory Banks.
• Instruction Latches, Data Latches, Address Comparison latches.
• Wait logic
Figure 18 shows a simplified block diagram of the Memory Accelerator Module data paths.
In the following de scriptions, the term “fetch” applies to an ex plicit Flas h read requ est from t he ARM. “prefetch” is used to denote
a Flash read of instructions beyond th e current processor fetch address.
Flash Memory Banks
There are two banks of Flash memory in order to allow two parallel accesses and eliminate delays for sequential accesses.
Memory Accelerator Module (MAM)90May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Flash programming oper ations are not con trolled by the Me mory Ac celera tor Modu le, but are handle d as a separat e fun ction. A
“boot block” sector contains Flash programming algorithms that may be called as part of the application prog ram, and a loader
that may be run to allow serial programming of the Flash memory.
The Flash memories are wired so that each sector exists in both banks, such that a sector erase operation acts on part of both
banks simultaneously. In effect, the existence of two banks is transparent to the programming functions.
Memory Address
Flash Memory
ARM Local Bus
Figure 18: Simplified Block Diagram of the Memory Accelerator Module
Bus
Interface
Bank 0
Selection
Memory Data
Flash Memory
Bank 1
Bank
Instruction Latches and Data Latches
Code and Data accesses are treated separately by the Memory Accelerator Module. There are two sets of 128-bit Instruction
Latches and 12 -bit Com parison Address L atches associated with each Flash Bank . One of the two se ts, called the Branch Trail
Buffer, holds the data and comparison address for that bank from the last Instruction miss. The other set, called the Prefetch
Buffer, holds the data and comparison address from prefetches undertaken speculatively by the MAM. Each Instruction Latch
holds 4 words of code (4 ARM instructions, or 8 Thumb instructions).
Similarly there i s a 1 28-bit Data La tch an d 1 3-bit Data Addr ess l atch, that ar e u sed d uring Da ta cy cles . This sing le se t of la tches
is shared by bot h Flas h bank s. Eac h Data a cces s that is not in the Data latch caus es a F lash f etch o f 4 words of data, wh ich ar e
captured in the Data latch. This speeds up sequential Data operations, but has little or no effect on random accesses.
Flash Programming Issues
Since the Flash memory does not al low accesses durin g programming and erase op erations, it is necessar y for the MAM to force
the CPU to wait if a memory access to a Flash address is requested while the Flash module is busy. (This is accomplished by
asserting the ARM7 TDMI-S local bus signal CLKEN.) Under some conditi ons, this dela y could result in a Watchdog ti me-out. The
user will need to be aw are of this pos sibilit y and take s teps to insu re that an unw anted Watc hdog reset d oes not cau se a system
failure while programming or erasing the Fl ash memory.
Memory Accelerator Module (MAM)91May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
In order to preclude the possibility of stale data being read from the Flash memory, the MAM holding latches are automatically
invalidated at the be ginning of any Fl ash programming o r erase operation . Any subsequen t read from a Flash ad dress will cause
a new fetch to be initiated after the Flash operation has completed.
MEMORY ACCELERATOR MODULE OPERATING MODES
Three modes of operation are defined for the MAM, trading off performance for ease of predictability:
0) MAM off. All memory requests result in a Flash read operation (see note 2 below). There are no instruction prefetches.
1) MAM partially ena bl ed. Sequential instruction accesses ar e fu lfi lle d from the holding la tches if the data is present. Instruction
prefetch is enabled. Non-sequential instruction accesses initiate Flash read operations (see note 2 below). This means that all
branches cause mem ory fe tches . All dat a opera tions c ause a Flash rea d beca use bu ffered d ata ac cess timin g is ha rd to pre dict
and is very situation dependent.
2) MAM fully enabled . Any memory request (code or data) for a value that is contai ned in one of the correspondi ng holding latches
is fulfilled from the latch. Instruction prefetch is enabled. Flash read operations are initiated for instruction prefetch and code or
data values not available in the corresponding holding latches.
Table 35: MAM Responses to Program Accesses of Various Types
Program Memory Request Type
MAM Mode
012
Sequential access, data in MAM latchesInitiate Fetch
2
Use Latched Data
Sequential access, data not in MAM latchesInitiate FetchInitiate Fetch
Non-Sequential access, data in MAM latchesInitiate Fetch
2
Initiate Fetch
Non-Sequential access, data not in MAM latchesInitiate FetchInitiate Fetch
1
1, 2
1
1
Use Latched Data
Initiate Fetch
Use Latched Data
Initiate Fetch
1
1
1
1
Table 36: MAM Responses to Data and DMA Accesses of Various Types
MAM Mode
Data Memory Request Type
012
Sequential access, data in MAM latchesInitiate Fetch
2
Initiate Fetch
2
Use Latched Data
Sequential access, data not in MAM latchesInitiate FetchInitiate FetchInitiate Fetch
Non-Sequential access, data in MAM latchesInitiate Fetch
2
Initiate Fetch
2
Use Latched Data
Non-Sequential access, data not in MAM latchesInitiate FetchInitiate FetchInitiate Fetch
1. Instruction prefetch is enabled in modes 1 and 2.
2. The MAM actually uses lat ched data if it is availa ble, but mimics the t iming of a F lash read o peratio n. This saves power whil e
resulting in the same execution timing. The MAM can truly be turned off by setting the fetch timing value in MAMTIM to one
clock.
Memory Accelerator Module (MAM)92May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
MAM CONFIGURATION
After reset the MAM defaults to the disabled state. Software can turn memory access acceleration on or off at any time. This
allows most of an application to be run at the highest possible performance, while certain functions can be run at a somewhat
slower but more predictable rate if more precise timi ng is required.
REGISTER DESCRIPTION
All registers, regardless of size, are on word address boundaries. Details of the registers appear in the description of each
function.
Table 37: Summary of System Control Registers
NameDescriptionAccess
MAM
Memory Accelerator Module Control Register. Determines the MAM
MAMCR
MAMTIM
*Reset Value refers to the data stored in used bits only. It does not include reserved bits content.
functional mode, that is, to what extent the MAM performance
enhancements are enabled. See Table 38.
Memory Accelerator Module Timing control. Determines the number of
clocks used for Flash memory fetches (1 to 7 processor clocks).
R/W00xE01FC000
R/W0x070xE01FC004
Reset
Value*
Address
Memory Accelerator Module (MAM)93May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
MAM Control Register (MAMCR - 0xE01FC000)
Two configuration bi ts select the three MAM operating modes, as shown in Table 38. Following Reset, MAM functions are
disabled. Changing the MAM operating mode causes the MAM to invalidate all of the holding latches, resulting in new reads of
Flash information as required.
Table 38: MAM Control Register (MAMCR - 0xE01FC000)
MAMCRFunctionDescription
These bits determine the operating mode of the MAM as follows:
1:0
7:2Reserved
MAM mode
control
0 0 - MAM functions disabled.
0 1 - MAM functions partially enabled.
1 0 - MAM functions fully enabled.
1 1 - reserved
Reserved, user software shou ld not write ones to reserved b its. The value rea d from a
reserved bit is not defined.
Reset
Value
0
NA
MAM Timing Register (MAMTIM - 0xE01FC004)
The MAM Timing regis ter determines how many cclk cycles are used to acces s the Flash memory. This al lows tuning MAM timing
to match the processor operating frequency. Flash access times from 1 clock to 7 clocks are possible. Single clock Flash
accesses would esse nti a ll y re mo ve th e M A M fro m ti mi ng c alc ul atio ns . In th is cas e the MAM mo de m ay be se le cted to optimize
power usage.
Table 39: MAM Timing Register (MAMTIM - 0xE01FC004)
MAMTIMFunctionDescription
These bits set the duration of MAM Flash fetch operations as follows:
0 0 0 = 0 - Reserved.
0 0 1 = 1 - MAM fetch cycles are 1 processor clock (cclk) in duration.
0 1 0 = 2 - MAM fetch cycles are 2 processor clocks (cclks) in duration.
0 1 1 = 3 - MAM fetch cycles are 3 processor clocks (cclks) in duration.
1 0 0 = 4 - MAM fetch cycles are 4 processor clocks (cclks) in duration.
1 0 1 = 5 - MAM fetch cycles are 5 processor clocks (cclks) in duration.
1 1 0 = 6 - MAM fetch cycles are 6 processor clocks (cclks) in duration.
1 1 1 = 7 - MAM fetch cycles are 7 processor clocks (cclks) in duration.
2:0
MAM Fetch
Cycle timing
Reset
Value
0x07
Warning: Improper set tin g of t his v alue may result in inco rrect o perati on of the devi ce.
7:3Reserved
Reserved, user software shou ld not write ones to reserved b its. The value rea d from a
reserved bit is not defined.
NA
MAM USAGE NOTES
When changing M AM timing, the MAM mu st f irs t be turn ed off by writing a zero to MAMCR. A new va lue ma y then be written to
MAMTIM. Finally, the MAM may be turned on again by writing a value (1 or 2) corresponding to the desired operating mode to
MAMCR.
For system cloc k sl ower than 2 0 MHz , MAM TIM c an be 001. Fo r sys tem clock betwe en 20 MH z and 40 M Hz, Fl ash acces s ti me
is suggested to be 2 CCLKs, while in systems with system clock faster than 40 MHz, 3 CCLKs are proposed.
Memory Accelerator Module (MAM)94May 03, 2004
Philips SemiconductorsPreliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
• 16 priority levels dynamically assigned to interrupt requests
• Software interrupt generation
DESCRIPTION
The Vectored Interrupt Con troller (VIC) takes 32 interrupt reque st inputs and p rogrammably assig ns them into 3 cate gories, FIQ,
vectored IRQ, and non-vectored IR Q. The pro grammable ass ignment sche me means that priorities of interrupts from the v arious
peripherals can be dynamically assigned and adjusted.
Fast Interrupt reQuest (FIQ) requests have the highest priority. If more than one request is assigned to FIQ, the VIC ORs the
requests to produce the FIQ signal to the ARM processor. The fastest possible FIQ latency is achieved when only one request
is classified as FIQ, be caus e then the FIQ s ervice routin e can simp ly sta rt de aling with tha t de vice . But if m ore th an one request
is assigned to the FIQ class, the FIQ service routine can read a word from the VIC that identifies which FIQ source(s) is (are)
requesting an interrupt.
Vectored IRQs have the middle priority, but ony 16 of the 32 requests can be assig ne d to this categ ory . Any of the 32 reques ts
can be assigned to any of the 16 vectored IRQ slots, among which slot 0 has the highest priority and slot 15 has the lowest.
Non-vectored IRQs have the lowest priority.
The VIC ORs the requests from all the vectored and non-vectored IRQs to produce the IRQ signal to the ARM processor. The
IRQ service routine can start by reading a register from the VIC and jumping there. If any of the vectored IRQs are requesting,
the VIC provides the address of the highe st-priority requesting IR Qs service routine, otherwis e it provides the address of a default
routine that is shared by al l the non-vectored IRQs. The default routine can read another VIC register to see what IRQs are act ive.
All registers in the VIC are word registers. Byte and halfword reads and write are not supported.
Additional information on the Vectored Interrupt Controller is available in the ARM PrimeCell™ Vectored Interrupt Controller
The VIC implements the registers shown in Table 40. More detailed descriptions follow.
Table 40: VIC Register Map
NameDescriptionAccess
VICIRQStatus
VICFIQStatus
VICRawIntr
VICIntSelect
VICIntEnable
VICIntEnClr
VICSoftInt
VICSoftIntClear
VICProtection
IRQ Status Register. This register reads out the state of those interrupt
requests that are enabled and classified as IRQ.
FIQ Status Requests. Th is reg ister read s out the st ate of thos e inte rrupt
requests that are enabled and classified as FIQ.
Raw Interrupt Status Register. This register reads out the sta te of the 32
interrupt requests / software interrupts, regardless of enabling or
classification.
Interrupt Select Registe r. This regis ter classifies e ach of the 32 interrupt
requests as contributing to FIQ or IRQ.
Interrupt Enable Register. This register controls which of the 32 interrupt
requests and software interrupts are enabled to contribute to FIQ or
IRQ.
Interrupt Enable Clear Register. This register allows software to clear
one or more bits in the Interrupt Enable register.
Software Interrupt Regis ter. The co ntents of th is register are ORed with
the 32 interrupt requests from various peripheral functions.
Software Interrupt Clear Re giste r. This regis ter all ows sof tware to clear
one or more bits in the Software Interrupt register.
Protection enable register. This regi ster allows limiti ng access to the VIC
registers by software running in privileged mode.
Vector control 0 re gister. Vector Control Registers 0-15 eac h control one
VICVectCntl0
VICVectCntl1Vector control 1 registerR/W00xFFFF F204
VICVectCntl2Vector control 2 registerR/W00xFFFF F208
VICVectCntl3Vector control 3 registerR/W00xFFFF F20C
VICVectCntl4Vector control 4 registerR/W00xFFFF F210
VICVectCntl5Vector control 5 registerR/W00xFFFF F214
VICVectCntl6Vector control 6 registerR/W00xFFFF F218
VICVectCntl7Vector control 7 registerR/W00xFFFF F21C
VICVectCntl8Vector control 8 registerR/W00xFFFF F220
of the 16 vectored IRQ slots. Slot 0 has the highest priority and slot 15
the lowest.
R/W00xFFFF F200
Reset
Value*
Address
VICVectCntl9Vector control 9 registerR/W00xFFFF F224
VICVectCntl10 Vector control 10 registerR/W00xFFFF F228
VICVectCntl11 Vector control 11 registerR/W00xFFFF F22C
VICVectCntl12 Vector control 12 registerR/W00xFFFF F230
VICVectCntl13 Vector control 13 registerR/W00xFFFF F234
VICVectCntl14 Vector control 14 registerR/W00xFFFF F238
VICVectCntl15 Vector control 15 registerR/W00xFFFF F23C
*Reset Value refers to the data stored in used bits only. It does not include reserved bits content.
This section describes the VIC registers in the order in which they are used in the VIC logic, from those closest to the interrupt
request inputs to tho se most abstracted for us e by software. For most p eople, this is also th e best order to read about the registers
when learning the VIC.
1: writing a 1 clears the corresponding bit in the Software Interrupt register, thus releasing
31:0
the forcing of this request.
0: writing a 0 leaves the corresponding bit in VICSoftInt unchanged.
0
Raw Interrupt Status Register (VICRawIntr - 0xFFFFF008, Read Only)
This register reads out the state of the 32 interrupt requests and software interrupts, regardless of enabling or classification.
Table 43: Raw Interrupt Status Register (VICRawIntr - 0xFFFFF008, Read-Only)
VICRawIntrFunctionReset Value
31:0
1: the interrupt request or software interrupt with this bit number is asserted.
0: the interrupt request or software interrupt with this bit number is negated.
When this register is written, on es enab le interru pt reque sts or sof tware inter rupts to co ntribu te
to FIQ or IRQ, zeroes have no effe ct. See the VICInt EnCle ar regis ter (Tab le 45 b elow) , for ho w
to disable interrupts.
0
VICIntEnClearFunctionReset Value
1: writing a 1 clears the corresponding bit in the Interrupt Enable register, thus disabling
31:0
interrupts for this request.
0: writing a 0 leaves the corresponding bit in VICIntEnable unchanged.
1: the interrupt request with this bit number is assigned to the FIQ category.
0: the interrupt request with this bit number is assigned to the IRQ category.
0
IRQ Status Register (VICIRQStatus - 0xFFFFF000, Read Only)
This register reads out the state of those interrupt requests that are enabled and classified as IRQ. It does not differentiate
between vectored and non-vectored IRQs.
Table 47: IRQ Status Register (VICIRQStatus - 0xFFFFF000, Read-Only)
VICIRQStatusFunctionReset Value
31:01: the interrupt request with this bit number is enabled, class ifi ed as IRQ, and asserte d.0