Philips LPC2119, LPC2129, LPC2194, LPC2292, LPC2294 Technical data

INTEGRATED CIRCUITS
LPC2119/2129/2194/2292/2294 USER MANUAL
Preliminary Supersedes data of 2004 Feb 03
 
2004 May 03
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Table of Contents
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Document Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
General Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Device information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Architectural Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
ARM7TDMI-S Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
On-Chip Flash Memory System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
On-Chip Static RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
LPC2119/2129/2292/2194/2294 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
LPC2119/2129/2292/2294 Memory Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Memory Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
LPC2119/2129/2194/2292/2294 Memory Re-mapping and Boot Block . . . . . . . . . . . . . . . . . . . . 52
Prefetch Abort and Data Abort Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
External Memory Controller (EMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
External Memory Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Typical Bus Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
External Memory Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
System Control Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Summary of System Control Block Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Crystal Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
External Interrupt Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Memory Mapping Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
PLL (Phase Locked Loop) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Power Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Power Control Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
VPB Divider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Wakeup Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Memory Accelerator Module (MAM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Memory Accelerator Module Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
MAM Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
MAM Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Vectored Interrupt Controller (VIC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
VIC Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Interrupt Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Spurious Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
VIC Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Pin Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
LPC2119/2129/2194 Pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Pin Description for LPC2119/2129/2194 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
LPC2292/2294 Pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Pin Description for LPC2292/2294 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Pin Connect Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Boot Control on 144-pin Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
GPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
GPIO Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
UART0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
UART1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
I2C Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
SPI Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
CAN Controllers and Acceptance Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
CAN Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Memory Map of the CAN Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
CAN Controller Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
CAN Controller Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Centralized CAN Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Global Acceptance Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Acceptance Filter Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Examples of Acceptance Filter Tables and ID Index Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
FullCAN Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Timer0 and Timer1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Example Timer Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Pulse Width Modulator (PWM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
A/D Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Pin DescriptionS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
OPERATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Real Time Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
RTC Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Miscellaneous Register Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Consolidated Time Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Time Counter Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Alarm Register Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
RTC Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Reference Clock Divider (Prescaler) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Watchdog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Usage Notes on Watchdog Reset and External Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Flash Memory System and Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Flash Memory System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Flash boot Loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Boot process FlowChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Sector Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Code Read Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
JTAG FLASH Programming interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
EmbeddedICE Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Reset State of Multiplexed Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Embedded Trace Macrocell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Reset State of Multiplexed Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
RealMonitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
How to Enable RealMonitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
RealMonitor build options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
List of Figures
Figure 1: LPC2119/2129/2194/2292/2294 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 2: System Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 3: Peripheral Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Figure 4: AHB Peripheral Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Figure 5: VPB Peripheral Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Figure 6: Map of lower memory is showing re-mapped and re-mappable areas (128 kB Flash).. . . . . . . 54
Figure 7: 32 Bit Bank External Memory Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Figure 8: 16 Bit Bank External Memory Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Figure 9: 8 Bit Bank External Memory Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Figure 10: External memory read access (WST1=0 and WST1=1 examples) . . . . . . . . . . . . . . . . . . . . . . 61
Figure 11: External memory write access (WST2=0 and WST2=1 examples) . . . . . . . . . . . . . . . . . . . . . . 61
Figure 12: Oscillator modes and models: a) slave mode of operation, b) oscillation mode of operation,
c) external crystal model used for CX1/X2 evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 13: FOSC selection algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Figure 14: External Interrupt Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Figure 15: PLL Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Figure 16: Reset Block Diagram including Wakeup Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Figure 17: VPB Divider Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Figure 18: Simplified Block Diagram of the Memory Accelerator Module . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Figure 19: Block Diagram of the Vectored Interrupt Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Figure 20: LPC2119/2129/2194 64-pin package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Figure 21: LPC2292/2294 144-pin package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Figure 22: UART0 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Figure 23: UART1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Figure 24: I2C Bus Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Figure 25: Slave Mode Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Figure 26: Format in the master transmitter mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Figure 27: Format of master receiver mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Figure 28: A master receiver switch to master transmitter after sending repeated START. . . . . . . . . . . . 169
Figure 29: Slave Mode Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Figure 30: Format of slave receiver mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Figure 31: Format of slave transmitter mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Figure 32: I2C Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Figure 33: SPI Data Transfer Format (CPHA = 0 and CPHA = 1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Figure 34: SPI Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Figure 35: Entry in fullCAN and Individual Standard Identifier Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Figure 36: Entry in Standard Identifier Range Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Figure 37: Entry in either Extended Identifier Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Figure 38: Detailed Example of Acceptance Filter Tables and ID Index Values . . . . . . . . . . . . . . . . . . . . 210
Figure 39: A timer cycle in which PR=2, MRx=6, and both interrupt and reset on match are enabled.. . . 221
Figure 40: A timer cycle in which PR=2, MRx=6, and both interrupt and stop on match are enabled. . . . 221
Figure 41: Timer block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Figure 42: PWM block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Figure 43: Sample PWM waveforms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Figure 44: RTC block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Figure 45: RTC Prescaler block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Figure 46: Watchdog Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Figure 47: Map of lower memory after any reset (128 kB Flash part).. . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Figure 48: Boot Process flowchart (Bootloader revisions before 1.61) . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Figure 49: Boot Process flowchart (Bootloader revisions 1.61 and later) . . . . . . . . . . . . . . . . . . . . . . . . . 267
Figure 50: IAP Parameter passing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Figure 51: EmbeddedICE Debug Environment Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Figure 52: ETM Debug Environment Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Figure 53: RealMonitor components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Figure 54: RealMonitor as a state machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Figure 55: Exception Handlers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
List of Tables
Table 1: LPC2119/2129/2194/2292/2294 device information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 2: LPC2119/2129/2194/2292/2294 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 3: ARM Exception Vector Locations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 4: LPC2119/2129/2194/2292/2294 Memory Mapping Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 5: Address Ranges of External Memory Banks (LPC2292/2294only) . . . . . . . . . . . . . . . . . . . . . . . 56
Table 6: External Memory Controller Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Table 7: External Memory Controller Register Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Table 8: Bank Configuration Registers 0-3 (BCFG0-3 - 0xFFE00000-0C). . . . . . . . . . . . . . . . . . . . . . . . 58
Table 9: Default memory widths at Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Table 10: External memory and system requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Table 11: Pin summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Table 12: Summary of System Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Table 13: Recommended values for CX1/X2 in oscillation mode
(crystal and external components parameters) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Table 14: External Interrupt Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Table 15: External Interrupt Flag Register (EXTINT - 0xE01FC140). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Table 16: External Interrupt Wakeup Register (EXTWAKE - 0xE01FC144) . . . . . . . . . . . . . . . . . . . . . . . . 71
Table 17: External Interrupt Mode Register (EXTMODE - 0xE01FC148) . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Table 18: External Interrupt Polarity Register (EXTPOLAR - 0xE01FC14C). . . . . . . . . . . . . . . . . . . . . . . . 72
Table 19: MEMMAP Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Table 20: Memory Mapping Control Register (MEMMAP - 0xE01FC040). . . . . . . . . . . . . . . . . . . . . . . . . . 74
Table 21: PLL Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Table 22: PLL Control Register (PLLCON - 0xE01FC080) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Table 23: PLL Configuration Register (PLLCFG - 0xE01FC084) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Table 24: PLL Status Register (PLLSTAT - 0xE01FC088) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Table 25: PLL Control Bit Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Table 26: PLL Feed Register (PLLFEED - 0xE01FC08C). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Table 27: PLL Divider Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Table 28: PLL Multiplier Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Table 29: Power Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Table 30: Power Control Register (PCON - 0xE01FC0C0). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Table 31: Power Control for Peripherals Register for LPC2119/2129/2292 (PCONP - 0xE01FC0C4) . . . . 82
Table 32: Power Control for Peripherals Register for LPC2194/2294 (PCONP - 0xE01FC0C4) . . . . . . . . 83
Table 33: VPBDIV Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Table 34: VPB Divider Register (VPBDIV - 0xE01FC100). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Table 35: MAM Responses to Program Accesses of Various Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Table 36: MAM Responses to Data and DMA Accesses of Various Types. . . . . . . . . . . . . . . . . . . . . . . . . 92
Table 37: Summary of System Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Table 38: MAM Control Register (MAMCR - 0xE01FC000). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Table 39: MAM Timing Register (MAMTIM - 0xE01FC004) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Table 40: VIC Register Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Table 41: Software Interrupt Register (VICSoftInt - 0xFFFFF018, Read/Write) . . . . . . . . . . . . . . . . . . . . . 99
Table 42: Software Interrupt Clear Register (VICSoftIntClear - 0xFFFFF01C, Write Only). . . . . . . . . . . . . 99
Table 43: Raw Interrupt Status Register (VICRawIntr - 0xFFFFF008, Read-Only). . . . . . . . . . . . . . . . . . . 99
Table 44: Interrupt Enable Register (VICINtEnable - 0xFFFFF010, Read/Write) . . . . . . . . . . . . . . . . . . . 100
Table 45: Software Interrupt Clear Register (VICIntEnClear - 0xFFFFF014, Write Only) . . . . . . . . . . . . . 100
Table 46: Interrupt Select Register (VICIntSelect - 0xFFFFF00C, Read/Write) . . . . . . . . . . . . . . . . . . . . 100
Table 47: IRQ Status Register (VICIRQStatus - 0xFFFFF000, Read-Only) . . . . . . . . . . . . . . . . . . . . . . . 100
Table 48: IRQ Status Register (VICFIQStatus - 0xFFFFF004, Read-Only) . . . . . . . . . . . . . . . . . . . . . . . 101
Table 49: Vector Control Registers (VICVectCntl0-15 - 0xFFFFF200-23C, Read/Write) . . . . . . . . . . . . . 101
Table 50: Vector Address Registers (VICVectAddr0-15 - 0xFFFFF100-13C, Read/Write). . . . . . . . . . . . 101
Table 51: Default Vector Address Register (VICDefVectAddr - 0xFFFFF034, Read/Write) . . . . . . . . . . . 101
Table 52: Vector Address Register (VICVectAddr - 0xFFFFF030, Read/Write). . . . . . . . . . . . . . . . . . . . 102
Table 53: Protection Enable Register (VICProtection - 0xFFFFF020, Read/Write). . . . . . . . . . . . . . . . . . 102
Table 54: Connection of Interrupt Sources to the Vectored Interrupt Controller . . . . . . . . . . . . . . . . . . . . 103
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Table 55: Pin description for LPC2119/2129/2194 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Table 56: Pin description for LPC2292/2294 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Table 57: Pin Connect Block Register Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Table 58: Pin Function Select Register 0 for LPC2119/2129/2292 (PINSEL0 - 0xE002C000) . . . . . . . . 127
Table 59: Pin Function Select Register 0 for LPC2194/2294 (PINSEL0 - 0xE002C000) . . . . . . . . . . . . . 127
Table 60: Pin Function Select Register 1 for LPC2119/2129/2292 (PINSEL1 - 0xE002C004) . . . . . . . . . 128
Table 61: Pin Function Select Register 1 for LPC2194/2294 (PINSEL1 - 0xE002C004) . . . . . . . . . . . . . 129
Table 62: Pin Function Select Register 2 for LPC2119/2129/2194 (PINSEL2 - 0xE002C014) . . . . . . . . 129
Table 63: Pin Function Select Register 2 for LPC2292/2294 (PINSEL2 - 0xE002C014) . . . . . . . . . . . . . 131
Table 64: Pin Function Select Register Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Table 65: Boot Control on BOOT1:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Table 66: GPIO Pin Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Table 67: GPIO Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Table 68: GPIO Pin Value Register (IO0PIN - 0xE0028000, IO1PIN - 0xE0028010,
IO2PIN - 0xE0028020, IO3PIN - 0xE0028030) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Table 69: GPIO Output Set Register (IO0SET - 0xE0028004, IO1SET - 0xE0028014,
IO2SET - 0xE0028024, IO3SET - 0xE0028034) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Table 70: GPIO Output Clear Register (IO0CLR - 0xE002800C, IO1CLR - 0xE002801C,
IO2CLR - 0xE002802C, IO3CLR - 0xE002803C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Table 71: GPIO Direction Register (IO0DIR - 0xE0028008, IO1DIR - 0xE0028018,
IO2DIR - 0xE0028028, IO3DIR - 0xE0028038). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Table 72: UART0 Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Table 73: UART0 Register Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Table 74: UART0 Receiver Buffer Register (U0RBR - 0xE000C000 when DLAB = 0, Read Only). . . . . . 142
Table 75: UART0 Transmit Holding Register (U0THR - 0xE000C000 when DLAB = 0, Write Only). . . . . 142
Table 76: UART0 Divisor Latch LSB Register (U0DLL - 0xE000C000 when DLAB = 1). . . . . . . . . . . . . . 142
Table 77: UART0 Divisor Latch MSB Register (U0DLM - 0xE000C004 when DLAB = 1). . . . . . . . . . . . . 142
Table 78: UART0 Interrupt Enable Register Bit Descriptions (U0IER - 0xE000C004 when DLAB = 0) . . 143 Table 79: UART0 Interrupt Identification Register Bit Descriptions (U0IIR - 0xE000C008, Read Only) . . 143
Table 80: UART0 Interrupt Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Table 81: UART0 FIFO Control Register Bit Descriptions (U0FCR - 0xE000C008) . . . . . . . . . . . . . . . . . 145
Table 82: UART0 Line Control Register Bit Descriptions (U0LCR - 0xE000C00C). . . . . . . . . . . . . . . . . . 146
Table 83: UART0 Line Status Register Bit Descriptions (U0LSR - 0xE000C014, Read Only) . . . . . . . . . 147
Table 84: UART0 Scratchpad Register (U0SCR - 0xE000C01C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Table 85: UART1 Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Table 86: UART1 Register Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Table 87: UART1 Receiver Buffer Register (U1RBR - 0xE0010000 when DLAB = 0, Read Only). . . . . . 154
Table 88: UART1 Transmit Holding Register (U1THR - 0xE0010000 when DLAB = 0, Write Only). . . . . 154
Table 89: UART1 Divisor Latch LSB Register (U1DLL - 0xE0010000 when DLAB = 1). . . . . . . . . . . . . . 154
Table 90: UART1 Divisor Latch MSB Register (U1DLM - 0xE0010004 when DLAB = 1). . . . . . . . . . . . . 155
Table 91: UART1 Interrupt Enable Register Bi t Descriptions (U1IER - 0xE0010004 when DLAB = 0). . . 155
Table 92: UART1 Interrupt Identification Register Bit Descriptions (IIR - 0xE0010008, Read Only). . . . . 156
Table 93: UART1 Interrupt Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Table 94: UART1 FCR Bit Descriptions (U1FCR - 0xE0010008) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Table 95: UART1 Line Control Register Bit Descriptions (U1LCR - 0xE001000C). . . . . . . . . . . . . . . . . . 159
Table 96: UART1 Modem Control Register Bit Descriptions (U1MCR - 0xE0010010) . . . . . . . . . . . . . . . 160
Table 97: UART1 Line Status Register Bit Descriptions (U1LSR - 0xE0010014, Read Only). . . . . . . . . . 161
Table 98: UART1 Modem Status Register Bit Descriptions (U1MSR - 0x0xE0010018) . . . . . . . . . . . . . . 162
Table 99: UART1 Scratchpad Register (U1SCR - 0xE001001C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Table 100: I2C Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Table 101: I2C Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Table 102: I2C Control Set Register (I2CONSET - 0xE001C000) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Table 103: I2C Control Clear Register (I2CONCLR - 0xE001C018). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Table 104: I2C Status Register (I2STAT - 0xE001C004) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Table 105: I2C Data Register (I2DAT - 0xE001C008) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Table 106: I2C Slave Address Register (I2ADR - 0xE001C00C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Table 107: I2C SCL High Duty Cycle Register (I2SCLH - 0xE001C010) . . . . . . . . . . . . . . . . . . . . . . . . . . 175
10 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Table 108: I2C SCL Low Duty Cycle Register (I2SCLL - 0xE001C014). . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Table 109: I2C Clock Rate Selections for VPB Clock Divider = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Table 110: I2C Clock Rate Selections for VPB Clock Divider = 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Table 111: I2C Clock Rate Selections for VPB Clock Divider = 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Table 112: SPI Data To Clock Phase Relationship. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Table 113: SPI Pin Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Table 114: SPI Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Table 115: SPI Control Register (S0SPCR - 0xE0020000, S1SPCR - 0xE0030000). . . . . . . . . . . . . . . . . 183
Table 116: SPI Status Register (S0SPSR - 0xE0020004, S1SPSR - 0xE0030004). . . . . . . . . . . . . . . . . . 184
Table 117: SPI Data Register (S0SPDR - 0xE0020008, S1SPDR - 0xE0030008). . . . . . . . . . . . . . . . . . . 184
Table 118: SPI Clock Counter Register (S0SPCCR - 0xE002000C, S1SPCCR - 0xE003000C). . . . . . . . 184
Table 119: SPI Interrupt Register (S0SPINT - 0xE002001C, S1SPINT - 0xE003001C). . . . . . . . . . . . . . . 185
Table 120: CAN Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Table 121: Memory Map of the CAN Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Table 122: CAN Acceptance Filter and Central CAN Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Table 123: CAN1, CAN2, CAN3 and CAN4 Controller Register Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Table 124: CAN Mode Register (CANMOD - 0xE00x x000). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Table 125: CAN Command Register (CANCMR - 0xE00x x004) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Table 126: CAN Global Status Register (CANGSR - 0xE00x x008). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Table 127: CAN Interrupt and Capture Register (CANICR - 0xE00x x00C) . . . . . . . . . . . . . . . . . . . . . . . . 195
Table 128: CAN Interrupt Enable Register (CANIER - 0xE00x x010). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Table 129: CAN Bus Timing Register (CANBTR - 0xE00x x014). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Table 130: CAN Error Warning Limit Register (CANEWL - 0xE00x x018) . . . . . . . . . . . . . . . . . . . . . . . . . 197
Table 131: CAN Status Register (CANSR - 0xE00x x01C). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Table 132: CAN Rx Frame Status Register (CANRFS - 0xE00x x020) . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Table 133: CAN Rx Identifier Register when FF=0 (CANRID - 0xE00x x024) . . . . . . . . . . . . . . . . . . . . . . 199
Table 134: CAN Rx Identifier Register when FF=1 (CANRID - 0xE00x x024) . . . . . . . . . . . . . . . . . . . . . . 199
Table 135: CAN Rx Data Register 1 (CANRDA - 0xE00x x028). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Table 136: CAN Rx Data Register B (CANRDB - 0xE00x x02C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Table 137: CAN Tx Frame Information Register (CANTFI1, 2, 3 - 0xE00x x030, 40, 50). . . . . . . . . . . . . . 201
Table 138: CAN Tx Identifi er Register when FF=0 (CANTID1, 2, 3 - 0xE00x x034, 44, 54). . . . . . . . . . . . 201
Table 139: CAN Tx Identifi er Register when FF=1 (CANTID1, 2, 3 - 0xE00x x034, 44, 54). . . . . . . . . . . . 201
Table 140: CAN Tx Data Register A (CANTDA1, 2, 3 - 0xE00x x038, 48, 58). . . . . . . . . . . . . . . . . . . . . . 202
Table 141: CAN Tx Data Register B (CANTDB1, 2, 3 - 0xE00x x03C, 4C, 5C) . . . . . . . . . . . . . . . . . . . . . 202
Table 142: CAN Central Transmit Status Register (CANTxSR - 0xE004 0000). . . . . . . . . . . . . . . . . . . . . 204
Table 143: CAN Central Receive Status Register (CANRxSR - 0xE004 0004) . . . . . . . . . . . . . . . . . . . . . 204
Table 144: CAN Central Miscellaneous Status Register (CANMSR - 0xE004 0008) . . . . . . . . . . . . . . . . . 205
Table 145: Acceptance Filter Modes Register (AFMR - 0xE003 C000) . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Table 146: Standard Frame Start Address Register (SFF_sa - 0xE003 C004) . . . . . . . . . . . . . . . . . . . . . 207
Table 147: Standard Frame Group Start Address Reg (SFF_GRP_sa - 0xE003 C008) . . . . . . . . . . . . . . 207
Table 148: Extended Frame Start Address Register (EFF_sa - 0xE003 C00C). . . . . . . . . . . . . . . . . . . . . 208
Table 149: Extended Frame Group Start Addr Register (EFF_GRP_sa - 0xE003 C010). . . . . . . . . . . . . . 208
Table 150: End of AF Tables Register (ENDofTable - 0xE003 C014) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Table 151: LUT Error Address Register (LUTerrAd - 0xE003 C018) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Table 152: LUT Error Register (LUTerr - 0xE003 C01C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Table 153: Example of Acceptance Filter Tables and ID Index Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Table 154: Format of Automatically Stored Rx Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Table 155: Pin summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Table 156: TIMER0 and TIMER1 Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Table 157: Interrupt Register
(IR: TIMER0 - T0IR: 0xE0004000; TIMER1 - T1IR: 0xE0008000) . . . . . . . . . . . . . . . . . . . . . . 217
Table 158: Timer Control Register
(TCR: TIMER0 - T0TCR: 0xE0004004; TIMER1 - T1TCR: 0xE0008004). . . . . . . . . . . . . . . . . 217
Table 159: Match Control Register
(MCR: TIMER0 - T0MCR: 0xE0004014; TIMER1 - T1MCR: 0xE0008014). . . . . . . . . . . . . . . . 218
Table 160: Capture Control Register
(CCR: TIMER0 - T0CCR: 0xE0004028; TIMER1 - T1CCR: 0xE0008028) . . . . . . . . . . . . . . . . 219
11 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Table 161: External Match Register
(EMR: TIMER0 - T0EMR: 0xE000403C; TIMER1 - T1EMR: 0xE000803C) . . . . . . . . . . . . . . . 220
Table 162: External Match Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Table 163: Set and Reset inputs for PWM Flip-Flops. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Table 164: Pin summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Table 165: Pulse Width Modulator Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Table 166: PWM Interrupt Register (PWMIR - 0xE0014000) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Table 167: PWM Timer Control Register (PWMTCR - 0xE0014004) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Table 168: PWM Match Control Register (PWMMCR - 0xE0014014) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Table 169: PWM Control Register (PWMPCR - 0xE001404C). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Table 170: PWM Latch Enable Register (PWMLER - 0xE0014050). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Table 171: A/D Pin Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Table 172: A/D Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Table 173: A/D Control Register (ADCR - 0xE0034000). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Table 174: A/D Data Register (ADDR - 0xE0034004). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Table 175: Real Time Clock Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Table 176: Miscellaneous Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Table 177: Interrupt Location Register Bits (ILR - 0xE0024000). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Table 178: Clock Tick Counter Bits (CTC - 0xE0024004). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Table 179: Clock Control Register Bits (CCR - 0xE0024008). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Table 180: Counter Increment Interrupt Register Bits (CIIR - 0xE002400C) . . . . . . . . . . . . . . . . . . . . . . . 247
Table 181: Alarm Mask Register Bits (AMR - 0xE0024010) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Table 182: Consolidated Time Register 0 Bits (CTIME0 - 0xE0024014) . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Table 183: Consolidated Time Register 1 Bits (CTIME1 - 0xE0024018) . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Table 184: Consolidated Time Register 2 Bits (CTIME2 - 0xE002401C) . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Table 185: Time Counter Relationships and Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Table 186: Time Counter registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Table 187: Alarm Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Table 188: Reference Clock Divider registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Table 189: Prescaler Integer Register (PREINT - 0xE0024080). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Table 190: Prescaler Fraction Register (PREFRAC - 0xE0024084). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Table 191: Prescaler cases where the Integer Counter reload value is incremented. . . . . . . . . . . . . . . . . 255
Table 192: Watchdog Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Table 193: Watchdog Mode Register (WDMOD - 0xE0000000). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Table 194: Watchdog Feed Register (WDFEED - 0xE0000008) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Table 195: Watchdog Timer Value Register (WDTV - 0xE000000C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Table 196: Sectors in a device with 128K bytes of Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Table 197: ISP Command Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Table 198: ISP Unlock command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Table 199: ISP Set Baud Rate command description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Table 200: Correlation between possible ISP baudrates and external crystal frequency (in MHz). . . . . . . 271
Table 201: ISP Echo command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Table 202: ISP Write to RAM command description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Table 203: ISP Read Memory command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Table 204: ISP Prepare sector(s) for write operation command description. . . . . . . . . . . . . . . . . . . . . . . . 274
Table 205: ISP Copy RAM to Flash command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Table 206: ISP Go command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Table 207: ISP Erase sector command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Table 208: ISP Blank check sector(s) command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Table 209: ISP Read Part ID command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Table 210: ISP Read Boot Code version command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Table 211: ISP Compare command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Table 212: ISP Return Codes Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Table 213: IAP Command Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Table 214: IAP Prepare sector(s) for write operation command description. . . . . . . . . . . . . . . . . . . . . . . . 281
Table 215: IAP Copy RAM to Flash command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Table 216: IAP Erase Sector(s) command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
12 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Table 217: IAP Blank check sector(s) command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Table 218: IAP Read Part ID command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Table 219: IAP Read Boot Code version command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Table 220: IAP Compare command description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Table 221: IAP Status Codes Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Table 222: EmbeddedICE Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Table 223: EmbeddedICE Logic Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Table 224: ETM Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Table 225: ETM Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Table 226: ETM Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Table 227: RealMonitor stack requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
13 May 03, 2004
Philips Semiconductors Preliminary User Manual
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
14 May 03, 2004
Philips Semiconductors Preliminary 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
15 May 03, 2004
Philips Semiconductors Preliminary 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™.
Introduction 16 May 03, 2004
Philips Semiconductors Preliminary 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
Device No. of pins On-chip RAM
LPC2119 64 16 kB 128 kB 2 4 ­LPC2129 64 16 kB 256 kB 2 4 ­LPC2194 64 16 kB 256 kB 4 4 -
LPC2292 144 16 kB 256 kB 2 8
LPC2294 144 16 kB 256 kB 4 8
On-chip
FLASH
No. of CAN
channels
No. of 10-bit
AD Channels
Note
with external
memory interface
with external
memory interface
Introduction 17 May 03, 2004
Philips Semiconductors Preliminary User Manual
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.
Introduction 18 May 03, 2004
Philips Semiconductors Preliminary 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.
Introduction 19 May 03, 2004
Philips Semiconductors Preliminary 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
2
LPC2292/2294 only.
3
LPC2194/2294 only.
Watchdog
Timer
System Control
Figure 1: LPC2119/2129/2194/2292/2294 Block Diagram
Introduction 20 May 03, 2004
Philips Semiconductors Preliminary User Manual
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.
Introduction 21 May 03, 2004
Philips Semiconductors Preliminary 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
0xE0000004 WDTC
0xE0000008
0xE000000C WDTV
TIMER0
0xE0004000 T0IR
0xE0004004 T0TCR
Name Description MSB LSB Access
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 data R/W 0xFF
8 bit data (0xAA fallowed by 0x55) WO NA
32 bit data RO 0xFF
CR3
Int.
CR2
Int.
- - - - - -
CR1
Int.
CR0
Int.
WD INTWDTOF
MR3
Int.
MR2
Int.
WDRE
SET
MR1
Int.
CTR
Reset
Reset Value
WDEN R/W 0
MR0
Int.
CTR
Enable
R/W 0
R/W 0
0xE0004008 T0TC T0 Counter 32 bit data RW 0
0xE000400C T0PR
0xE0004010 T0PC
0xE0004014 T0MCR
0xE0004018 T0MR0
0xE000401C T0MR1
0xE0004020 T0MR2
0xE0004024 T0MR3
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 data R/W 0
32 bit data R/W 0
Stop MR3
Reset
MR1
Int. on
on
MR1
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
on
Reset
on
MR3 Stop
on
MR0
Int. on
MR3
Reset
on
MR0
Stop
on
MR2
R/W 0
Int. on
MR0
Introduction 22 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE0004028 T0CCR
0xE000402C T0CR0
0xE0004030 T0CR1
0xE0004034 T0CR2
0xE000403C T0EMR
TIMER1
0xE0008000 T1IR
Name Description MSB LSB Access
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 data RO 0
32 bit data RO 0
32 bit data RO 0
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/W 0
R/W 0
R/W 0
0xE0008004 T1TCR
0xE0008008 T1TC T1 Counter 32 bit data RW 0
0xE000800C T1PR
0xE0008010 T1PC
0xE0008014 T1MCR
0xE0008018 T1MR0
0xE000801C T1MR1
0xE0008020 T1MR2
0xE0008024 T1MR3
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 data R/W 0
32 bit data R/W 0
Stop
4 reserved (-) bits
Reset
MR2
on
Int. on
MR2
Stop
on
MR1
Reset
on
MR1
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
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/W 0
R/W 0
Introduction 23 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE0008028 T1CCR
0xE000802C T1CR0
0xE0008030 T1CR1
0xE0008034 T1CR2
0xE0008038 T1CR3
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 data RO 0
32 bit data RO 0
32 bit data RO 0
32 bit data RO 0
External Match
Control 0
8 bit data RO
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/W 0
R/W 0
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 data WO NA
8 bit data R/W 0x01
En. Rx
00000
Status
Line
Int.
Enable
THRE
Int.
En. Rx
Data
Av.Int.
R/W 0
8 bit data R/W 0
FIFOs Enabled 0 0 IIR3 IIR2 IIR1 IIR0 RO 0x01
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
WO 0
R/W 0
Introduction 24 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE000C014 U0LSR
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 THRE BI FE PE OE DR RO 0x60
Error
8 bit data R/W 0
8 bit data RO
8 bit data WO NA
8 bit data R/W 0x01
0000
8 bit data R/W 0
En.
Mdem
Satus
Int.
En. Rx
Line
Status
Int.
Enable
THRE
Int.
En. Rx
Data
Av.Int.
Reset Value
un-
defined
R/W 0
U1IIR
0xE0010008
U1FCR
0xE001000C U1LCR
0xE0010010
U1
MCR
0xE0010014 U1LSR
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 Enabled 0 0 IIR3 IIR2 IIR1 IIR0 RO 0x01
Rx Trigger
DLAB
Set
Break
- - -
Stick
Parity
000
Even
Parity
Select
Loop Back
U0 Tx
FIFO
Reset
Parity
Enable
Nm. of
Stop
0 0 RTS DTR R/W 0
Bits
U0 Rx
FIFO
Reset
U0
FIFO
Enable
Word Length
Select
WO 0
R/W 0
Rx
FIFO
TEMT THRE BI FE PE OE DR RO 0x60
Error
8 bit data R/W 0
DCD RI DSR CTS
Delta
DCD
Trailing
Edge
RI
Delta
DSR
Delta
CTS
RO 0
Introduction 25 May 03, 2004
Philips Semiconductors Preliminary 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
Name Description MSB LSB Access
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 data RW 0
32 bit data R/W 0
32 bit data R/W 0
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/W 0
R/W 0
R/W 0
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
- ENA6 ENA5 ENA4 ENA3 ENA2 ENA1 -
- SEL6 SEL5 SEL4 SEL3 SEL2 SEL1 -
Stop MR1
on
Reset
MR1
Int. on
on
MR1
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
32 bit data R/W 0
Stop MR0
on
Reset
on
MR0
Int. on
MR0
R/W 0
Introduction 26 May 03, 2004
Philips Semiconductors Preliminary 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
Name Description MSB LSB Access
PWM
LER
I2CONSETI
0xE001C004 I2STAT
0xE001C008 I2DAT
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/W 0
-I2ENSTASTOSIAA - -R/W0
5 bit Status 0 0 0 RO 0xF8
8 bit data R/W 0
7 bit data GC R/W 0
16 bit data R/W 0x04
16 bit data R/W 0x04
- I2ENC STAC - SIC AAC - -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
SPIE LSBF MSTR CPOL CPHA
SPIF WCOL ROVR MODF ABRT - - -RO0
8 bit data R/W 0
8 bit data R/W 0
- - - - - - -
- - -R/W0
SPI
Int.
R/W 0
S0
SPI1
0xE0030000
SPCR
SPI1 Control Register
SPIE LSBF MSTR CPOL CPHA
- - -R/W0
S1
Introduction 27 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE0030004
0xE0030008
0xE003000C
0xE003001C
Name Description MSB LSB Access
S1
SPSR
S1
SPDR
S1
SPCCR
S1
SPINT
RTC
0xE0024000 ILR
0xE0024004 CTC
0xE0024008 CCR
0xE002400C CIIR
0xE0024010 AMR
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
SPIF WCOL ROVR MODF ABRT - - -RO0
8 bit data R/W 0
8 bit data R/W 0
- - - - - - -
- - - - - -
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/W 0
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 bits 12 bit Day of Year RO *
Register 2
0xE0024020 SEC
0xE0024024 MIN
0xE0024028 HOUR
Seconds Register
Minutes Register
Hours Register
- - 6 bit data R/W *
- - 6 bit data R/W *
- - - 5 bit data R/W *
Introduction 28 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE002402C DOM
0xE0024030 DOW
0xE0024034 DOY
0xE0024038
0xE002403C YEAR Year Register
0xE0024060
0xE0024064
0xE0024068
0xE002406C
0xE0024070
Name Description MSB LSB Access
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 data R/W *
- - - - - 3 bit data R/W *
reserved (-) 7 bits 9 bit data R/W *
- - - - 4 bit data R/W *
reserved (-) 4 bits 12 bit data R/W *
- - 6 bit data R/W *
- - 6 bit data R/W *
- - - 5 bit data R/W *
- - - 5 bit data R/W *
- - - - - 3 bit data R/W *
0xE0024074
0xE0024078
0xE002407C
0xE0024080
0xE0024084
GPIO PORT0
0xE0028000 IO0PIN
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 bits 9 bit data R/W *
- - - - 4 bit data R/W *
reserved
(-) 4 bits
reserved
(-) 3 bits
- 15 bit data R/W 0
32 bit data RO NA
32 bit data R/W 0
32 bit data R/W 0
12 bit data R/W *
13 bit data R/W 0
Introduction 29 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE002800C IO0CLR
GPIO PORT1
0xE0028010 IO1PIN
0xE0028014 IO1SET
0xE0028018 IO1DIR
0xE002801C IO1CLR
GPIO PORT2
0xE0028020 IO2PIN
0xE0028024 IO2SET
0xE0028028 IO2DIR
Name Description MSB LSB Access
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 data WO 0
32 bit data RO NA
32 bit data R/W 0
32 bit data R/W 0
32 bit data WO 0
32 bit data RO NA
32 bit data R/W 0
32 bit data R/W 0
0xE002802C IO2CLR
GPIO PORT3
0xE0028030 IO3PIN
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 data WO 0
32 bit data RO NA
32 bit data R/W 0
32 bit data R/W 0
32 bit data WO 0
32 bit data R/W 0
32 bit data R/W 0
Introduction 30 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xE002C014
Name Description MSB LSB Access
PIN
SEL2
Pin function select register 2
ADC
0xE0034000 ADCR ADC Control
register
0xE0034004 ADDR ADC Data
register
24-bit pin configuration data (144 package case)
TEST1:0 PDN
DONE
OVER
RUN
-
Reserved bits (64 package case)
configuration
data
- EDGE START
-CLKS 8 bit data 8 bit data
- CHN
­10 bit data
-
Reset Value
R/W 0
-
BURST
RW 01
RW x
CAN
0xE0038000-
0xE00387FF
0xE003C000 AFMR
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. RW 0
- - - - -
eFCAN
AccBP AccOff RW 1
- - - - - 9 - bit data RW 0
9 - bit data
- -
- - - - 10 - bit dat a >>> RW 0
<<< 10 - bit data
- -
- - - - - 9 - bit data RW 0
9 - bit data
- -
- - - - 10 - bit dat a >>> RW 0
<<< 10 - bit data
- -
- - - - 10 - bit dat a >>> RW 0
<<< 10 - bit data
- -
- - - - - 9 - bit data RO 0
9 - bit data - -
Introduction 31 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
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/O 0
- - - - RBS4:1
- - - -RS4:1
- - - - - - - -
- - - - - - - ­RO 0
- - - - BS4:1
- - - - ES4:1
- - - - - - - -
0xE0044000 C1MOD
0xE0044004 C1CMR
0xE0044008 C1GSR
0xE004400C C1ICR
CAN1 Mode Register
CAN1 Command Register
CAN1 Global Status Register
CAN1 Interrupt and Capture Register
- - - - - - - -
- - - - - - - -
TM - RPM SM TPM STM LOM RM
- - - - - - - -
- - - - - - - -
- - - - - - - -
STB3 STB2 STB1 SRR CDO RRB AT TR
8-bit data TXERR 8-bit data RXERR
- - - - - - - -
BS ES TS RS TCS TBS DOS RBS
- - -ALCBIT
ERRC
ERR
DIR
ERRBIT
- - - - -TI3TI2IDI
BEI ALI EPI WUI DOI EI TI1 RI
R/W
0x0000
0001
W0 NA
0x0000
RO
RO
000C
0x0000
0000
Introduction 32 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE0044010 C1IER
0xE0044014 C1BTR
0xE0044018 C1EWL
0xE004401C C1SR
0xE0044020 C1RFS
CAN1 Interrupt Enable Register
CAN1 Bus Timing Register
CAN1 Error Warning Limit Register
CAN1 Status Register
CAN1 Rx Frame Status Register
- - - - - - - -
- - - - - - - -
- - - - - TIE3 TIE2 IDIE
BEIE ALIE EPIE WUIE DOIE EIE TIE1 RIE
- - - - - - - -
SAM TSEG2 TSEG1
SJW - - - - 10-bit data>>>
<<< 10-bit data BRP
- - - - - - - -
- - - - - - - -
- - - - - - - -
EWL
- - - - - - - -
BS ES TS3 RS TCS3 TBS3 DOS RBS BS ES TS2 RS TCS2 TBS2 DOS RBS BS ES TS1 RS TCS1 TBS1 DOS RBS
FF RTR - - - - - -
- - - - DLC
- - - - - BP 10-bit data>>>
<<< 10-bit data ID Index
R/W
R/W
R/W
RO
R/W
Reset Value
0x0000
0000
0x001C
0000
0x0000
0060
0x000C
0C0C
0x0000
0000
- - -
0xE0044024 C1RID
CAN1 Rx identifier Register
29-bit (FF=1) or
11-bit data (FF=0) ID
R/W
0x0000
0000
Data 4
0xE0044028 C1RDA
CAN1 Rx Data Register A
Data 3 Data 2
R/W
0x0000
0000
Data 1 Data 8
0xE004402C C1RDB
CAN1 Rx Data Register B
Data 7 Data 6
R/W
0x0000
0000
Data 5
Introduction 33 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE0044030 C1TFI1
0xE0044034 C1TID1
0xE0044038 C1TDA1
0xE004403C C1TDB1
0xE0044040 C1TFI2
CAN1 Tx Frame Information Register (buffer 1)
CAN1 Tx Identifier Register (buffer 1)
CAN1 Tx Data Register A (buffer 1)
CAN1 Tx Data Register B (buffer 2)
CAN1 Tx Frame Information Register (buffer 2)
FF RTR - - - - - -
- - - - 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
FF RTR - - - - - -
- - - - DLC
- - - - - - - -
PRIO
R/W
R/W
R/W
R/W
R/W
Reset Value
0x0000
0000
0x0000
0000
0x0000
000
0x0000
000
0x0000
0000
CAN1 Tx
- - -
0xE0044044 C1TID2
Identifier Register
29-bit (FF=1) or
11-bit data (FF=0) ID
R/W
0x0000
0000
(buffer 2)
Data 4
0xE0044048 C1TDA2
CAN1 Tx Data Register A
Data 3 Data 2
R/W
0x0000
000
(buffer 2)
Data 1 Data 8
CAN1
0xE004404C C1TDB2
Tx Data Register B (buffer 2)
Data 7 Data 6
R/W
0x0000
000
Data 5
Introduction 34 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE0044050 C1TFI3
0xE0044054 C1TID3
0xE0044058 C1TDA3
0xE004405C C1TDB3
CAN1 Tx Frame Information Register (buffer 3)
CAN1 Tx Identifier Register (buffer 3)
CAN1 Tx Data Register A (buffer 3)
CAN1 Tx Data Register B (buffer 3)
FF RTR - - - - - -
- - - - 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
CAN2 Interface
0xE0048000 C2MOD
0xE0048004 C2CMR
0xE0048008 C2GSR
0xE004800C C2ICR
CAN2 Mode Register
CAN2 Command Register
CAN2 Global Status Register
CAN2 Interrupt and Capture Register
- - - - - - - -
- - - - - - - -
- - - - - - - -
TM
- RPM SM TPM STM LOM RM
- - - - - - - -
- - - - - - - -
- - - - - - - -
STB3 STB2 STB1 SRR CDO RRB AT TR
8-bit data TXERR 8-bit data RXERR
- - - - - - - -
BS ES TS RS TCS TBS DOS RBS
- - -ALCBIT
ERRC
ERR
DIR
ERRBIT
- - - - -TI3TI2IDI
BEI ALI EPI WUI DOI EI TI1 RI
R/W
0x0000
0001
W0 NA
0x0000
RO
RO
000C
0x0000
0000
Introduction 35 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE0048010 C2IER
0xE0048014 C2BTR
0xE0048018 C2EWL
0xE004801C C2SR
0xE0048020 C2RFS
CAN2 Interrupt Enable Register
CAN2 Bus Timing Register
CAN2 Error Warning Limit Register
CAN2 Status Register
CAN2 Rx Frame Status Register
- - - - - - - -
- - - - - - - -
- - - - - TIE3 TIE2 IDIE
BEIE ALIE EPIE WUIE DOIE EIE TIE1 RIE
- - - - - - - -
SAM TSEG2 TSEG1
SJW - - - - 10-bit data>>>
<<< 10-bit data BRP
- - - - - - - -
- - - - - - - -
- - - - - - - -
EWL
- - - - - - - -
BS ES TS3 RS TCS3 TBS3 DOS RBS BS ES TS2 RS TCS2 TBS2 DOS RBS BS ES TS1 RS TCS1 TBS1 DOS RBS
FF RTR - - - - - -
- - - - DLC
- - - - - BP 10-bit data>>>
<<< 10-bit data ID Index
R/W
R/W
R/W
RO
R/W
Reset Value
0x0000
0000
0x001C
0000
0x0000
0060
0x000C
0C0C
0x0000
0000
- - -
0xE0048024 C2RID
CAN2 Rx identifier Register
29-bit (FF=1) or
11-bit data (FF=0) ID
R/W
0x0000
0000
Data 4
0xE0048028 C2RDA
CAN2 Rx Data Register A
Data 3 Data 2
R/W
0x0000
0000
Data 1 Data 8
0xE004802C C2RDB
CAN2 Rx Data Register B
Data 7 Data 6
R/W
0x0000
0000
Data 5
Introduction 36 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE0048030 C2TFI1
0xE0048034 C2TID1
0xE0048038 C2TDA1
0xE004803C C2TDB1
0xE0048040 C2TFI2
CAN2 Tx Frame Information Register (buffer 1)
CAN2 Tx Identifier Register (buffer 1)
CAN2 Tx Data Register A (buffer 1)
CAN2 Tx Data Register B (buffer 2)
CAN2 Tx Frame Information Register (buffer 2)
FF RTR - - - - - -
- - - - 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
FF RTR - - - - - -
- - - - DLC
- - - - - - - -
PRIO
R/W
R/W
R/W
R/W
R/W
Reset Value
0x0000
0000
0x0000
0000
0x0000
000
0x0000
000
0x0000
0000
CAN2 Tx
- - -
0xE0048044 C2TID2
Identifier Register
29-bit (FF=1) or
11-bit data (FF=0) ID
R/W
0x0000
0000
(buffer 2)
Data 4
0xE0048048 C2TDA2
CAN2 Tx Data Register A
Data 3 Data 2
R/W
0x0000
000
(buffer 2)
Data 1 Data 8
CAN2
0xE004804C C2TDB2
Tx Data Register B (buffer 2)
Data 7 Data 6
R/W
0x0000
000
Data 5
Introduction 37 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE0048050 C2TFI3
0xE0048054 C2TID3
0xE0048058 C2TDA3
0xE004805C C2TDB3
CAN2 Tx Frame Information Register (buffer 3)
CAN2 Tx Identifier Register (buffer 3)
CAN2 Tx Data Register A (buffer 3)
CAN2 Tx Data Register B (buffer 3)
FF RTR - - - - - -
- - - - 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
CAN3 Interface (LPC2194/2294 only)
0xE004C000 C3MOD
CAN3 Mode Register
CAN3
0xE004C004 C3CMR
Command Register
CAN3 Global
0xE004C008 C3GSR
Status Register
CAN3
0xE004C00C C3ICR
Interrupt and Capture Register
- - - - - - - -
- - - - - - - -
- - - - - - - -
TM
- RPM SM TPM STM LOM RM
- - - - - - - -
- - - - - - - -
- - - - - - - -
STB3 STB2 STB1 SRR CDO RRB AT TR
8-bit data TXERR 8-bit data RXERR
- - - - - - - -
BS ES TS RS TCS TBS DOS RBS
- - -ALCBIT
ERRC
ERR
DIR
ERRBIT
- - - - -TI3TI2IDI
BEI ALI EPI WUI DOI EI TI1 RI
R/W
0x0000
0001
W0 NA
0x0000
RO
RO
000C
0x0000
0000
Introduction 38 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE004C010 C3IER
0xE004C014 C3BTR
0xE004C018 C3EWL
0xE004C01C C3SR
0xE004C020 C3RFS
CAN3 Interrupt Enable Register
CAN3 Bus Timing Register
CAN3 Error Warning Limit Register
CAN3 Status Register
CAN3 Rx Frame Status Register
- - - - - - - -
- - - - - - - -
- - - - - TIE3 TIE2 IDIE
BEIE ALIE EPIE WUIE DOIE EIE TIE1 RIE
- - - - - - - -
SAM TSEG2 TSEG1
SJW - - - - 10-bit data>>>
<<< 10-bit data BRP
- - - - - - - -
- - - - - - - -
- - - - - - - -
EWL
- - - - - - - -
BS ES TS3 RS TCS3 TBS3 DOS RBS BS ES TS2 RS TCS2 TBS2 DOS RBS BS ES TS1 RS TCS1 TBS1 DOS RBS
FF RTR - - - - - -
- - - - DLC
- - - - - BP 10-bit data>>>
<<< 10-bit data ID Index
R/W
R/W
R/W
RO
R/W
Reset Value
0x0000
0000
0x001C
0000
0x0000
0060
0x000C
0C0C
0x0000
0000
- - -
0xE004C024 C3RID
CAN3 Rx identifier Register
29-bit (FF=1) or
11-bit data (FF=0) ID
R/W
0x0000
0000
Data 4
0xE004C028 C3RDA
CAN3 Rx Data Register A
Data 3 Data 2
R/W
0x0000
0000
Data 1 Data 8
0xE004C02C C3RDB
CAN3 Rx Data Register B
Data 7 Data 6
R/W
0x0000
0000
Data 5
Introduction 39 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE004C030 C3TFI1
0xE004C034 C3TID1
0xE004C038 C3TDA1
0xE004C03C C3TDB1
0xE004C040 C3TFI2
CAN3 Tx Frame Information Register (buffer 1)
CAN3 Tx Identifier Register (buffer 1)
CAN3 Tx Data Register A (buffer 1)
CAN3 Tx Data Register B (buffer 2)
CAN3 Tx Frame Information Register (buffer 2)
FF RTR - - - - - -
- - - - 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
FF RTR - - - - - -
- - - - DLC
- - - - - - - -
PRIO
R/W
R/W
R/W
R/W
R/W
Reset Value
0x0000
0000
0x0000
0000
0x0000
000
0x0000
000
0x0000
0000
CAN3 Tx
- - -
0xE004C044 C3TID2
Identifier Register
29-bit (FF=1) or
11-bit data (FF=0) ID
R/W
0x0000
0000
(buffer 2)
Data 4
0xE004C048 C3TDA2
CAN3 Tx Data Register A
Data 3 Data 2
R/W
0x0000
000
(buffer 2)
Data 1 Data 8
CAN3
0xE004C04C C3TDB2
Tx Data Register B (buffer 2)
Data 7 Data 6
R/W
0x0000
000
Data 5
Introduction 40 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE004C050 C3TFI3
0xE004C054 C3TID3
0xE004C058 C3TDA3
0xE004C05C C3TDB3
CAN3 Tx Frame Information Register (buffer 3)
CAN3 Tx Identifier Register (buffer 3)
CAN3 Tx Data Register A (buffer 3)
CAN3 Tx Data Register B (buffer 3)
FF RTR - - - - - -
- - - - 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
CAN4 Interface (LPC2194/2294 only)
0xE0050000 C4MOD
CAN4 Mode Register
CAN4
0xE0050004 C4CMR
Command Register
CAN4 Global
0xE0050008 C4GSR
Status Register
CAN4
0xE005000C C4ICR
Interrupt and Capture Register
- - - - - - - -
- - - - - - - -
- - - - - - - -
TM
- RPM SM TPM STM LOM RM
- - - - - - - -
- - - - - - - -
- - - - - - - -
STB3 STB2 STB1 SRR CDO RRB AT TR
8-bit data TXERR 8-bit data RXERR
- - - - - - - -
BS ES TS RS TCS TBS DOS RBS
- - -ALCBIT
ERRC
ERR
DIR
ERRBIT
- - - - -TI3TI2IDI
BEI ALI EPI WUI DOI EI TI1 RI
R/W
0x0000
0001
W0 NA
0x0000
RO
RO
000C
0x0000
0000
Introduction 41 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
0xE0050010 C4IER
0xE0050014 C4BTR
0xE0050018 C4EWL
0xE005001C C4SR
0xE0050020 C4RFS
CAN4 Interrupt Enable Register
CAN4 Bus Timing Register
CAN4 Error Warning Limit Register
CAN4 Status Register
CAN4 Rx Frame Status Register
- - - - - - - -
- - - - - - - -
- - - - - TIE3 TIE2 IDIE
BEIE ALIE EPIE WUIE DOIE EIE TIE1 RIE
- - - - - - - -
SAM TSEG2 TSEG1
SJW - - - - 10-bit data>>>
<<< 10-bit data BRP
- - - - - - - -
- - - - - - - -
- - - - - - - -
EWL
- - - - - - - -
BS ES TS3 RS TCS3 TBS3 DOS RBS BS ES TS2 RS TCS2 TBS2 DOS RBS BS ES TS1 RS TCS1 TBS1 DOS RBS
FF RTR - - - - - -
- - - - DLC
- - - - - BP 10-bit data>>>
<<< 10-bit data ID Index
R/W
R/W
R/W
RO
R/W
Reset Value
0x0000
0000
0x001C
0000
0x0000
0060
0x000C
0C0C
0x0000
0000
- - -
0xE0050024 C4RID
CAN4 Rx identifier Register
29-bit (FF=1) or
11-bit data (FF=0) ID
R/W
0x0000
0000
Data 4
0xE0050028 C4RDA
CAN4 Rx Data Register A
Data 3 Data 2
R/W
0x0000
0000
Data 1 Data 8
0xE005002C C4RDB
CAN4 Rx Data Register B
Data 7 Data 6
R/W
0x0000
0000
Data 5
Introduction 42 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
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)
FF RTR - - - - - -
- - - - 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
FF RTR - - - - - -
- - - - 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
Introduction 43 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
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)
FF RTR - - - - - -
- - - - 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
0xE01FC0C0 PCON
register MAM timing
control Memory
mapping control
PLL control register
PLL configuration register
PLL status register
PLL feed register
Power control register
- - - - - - 2 bit data R/W 0
----- 3 bit data R/W0x07
------2 bit dataR/W0
------PLLCPLLER/W0
- 2bit data PSEL 5 bit data MSEL R/W 0
-----
PLOCK
PLLC PLLE
RO 0
- 2bit data PSEL 5 bit data MSEL
8 bit data WO NA
- - - - - - PD IDL R/W 0
Introduction 44 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
Name Description MSB LSB Access
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 bits PCAD -
PC
SPI1PCRTCPCSPI0
R/W 0x3BE
PC
I2C
PC
­PWM0PCURT1PCURT0PCTIM1PCTIM0
-
- - - - - - 2 bit data R/W 0
- - - - EINT3 EINT2 EINT1 EINT0 R/W 0
- - - -
- - - -
- - - -
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/W 0
1
EXT
MODE0R/W 0
1
EXT
POLAR
1
0
R/W 0
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
AT MW (BOOT1:0
)BM WP
WP
ERR
BUS ERR
-------­WST2 RBLE WST1
WST1 - IDCY
AT MW (0x2) BM WP
WP
ERR
BUS ERR
-------­WST2 RBLE WST1
WST1 - IDCY
AT MW (0x1) BM WP
WP
ERR
BUS ERR
-------­WST2 RBLE WST1
WST1 - IDCY
R/W
R/W
R/W
0x0000
FBEF
0x2000
FBEF
0x1000
FBEF
Introduction 45 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xFFE0000C BCFG3
Name Description MSB LSB Access
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.
AT MW (0x0) BM WP
WP
ERR
BUS ERR
-------­WST2 RBLE WST1
WST1 - IDCY
32-bit data RO 0
32-bit data RO 0
32-bit data RO 0
32-bit data R/W 0
32-bit data R/W 0
32-bit data WO 0
32-bit data R/W 0
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 data W 0
32-bit data R/W 0
32-bit data R/W 0
32-bit data R/W 0
32-bit data R/W 0
32-bit data R/W 0
...
32-bit data R/W 0
Introduction 46 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 2: LPC2119/2129/2194/2292/2294 Registers
Address
Offset
0xFFFFF200
0xFFFFF204
0xFFFFF23C
Name Description MSB LSB Access
Vect
VIC
Cntl0
VIC
Cntl1
Vect
Vect. Control 0 Reg.
Vect. Control 1 Reg.
- -
- -
1-bit data
1-bit data
5-bit data R/W 0
5-bit data R/W 0
...
Vect. Control
Vect
VIC
Cntl15
15 Reg.
- -
1-bit data
5-bit data R/W 0
Reset Value
Introduction 47 May 03, 2004
Philips Semiconductors Preliminary 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.
4.0 GB
3.75 GB
3.5 GB
3.0 GB
2.0 GB
AHB Peripherals
VPB Peripherals
Reserved for
External Memory
Boot Block
(re-mapped from On-Chip Flash memory)
Reserved for
On-Chip Memory
0xFFFF FFFF 0xF000 0000
0xE000 0000
0xC000 0000
0x8000 0000
0x4000 3FFF 0x4000 0000
0x0004 0000 0x0003 FFFF
0x0002 0000 0x0001 FFFF
0x0000 0000
1.0 GB
0.0 GB
16 kB On-Chip Static RAM
256 kB On-Chip Non-Volatile Memory
(LPC2129/2194/2292/2294)
128 kB On-Chip Non-Volatile Memory
(LPC2119)
Figure 2: System Memory Map
LPC2119/2129/2292/2294 Memory Addressing 48 May 03, 2004
Philips Semiconductors Preliminary User Manual
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 (16­bit) 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.
0xE020 0000 0xE01F FFFF
0xE000 0000
LPC2119/2129/2292/2294 Memory Addressing 49 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Vectored Interrupt Controller
(AHB peripheral #126)
(AHB peripheral #125)
(AHB peripheral #124)
(AHB peripheral #3)
(AHB peripheral #2)
0xFFFF F000 (4G - 4K)
0xFFFF C000
0xFFFF 8000
0xFFFF 4000
0xFFFF 0000
0xFFE1 000 0
0xFFE0 C000
(AHB peripheral #1)
(AHB peripheral #0)
Figure 4: AHB Peripheral Map
0xFFE0 800 0
0xFFE0 400 0
0xFFE0 000 0
LPC2119/2129/2292/2294 Memory Addressing 50 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
System Control Block
(VPB peripheral #127)
(VPB peripherals #14-126)
not used
10 bit A/D
(VPB peripheral #13)
SPI1
(VPB peripheral #12)
Pin Connect Block
(VPB peripheral #11)
GPIO
(VPB peripheral #10)
RTC
(VPB peripheral #9)
SPI0
(VPB peripheral #8)
2
C
I
(VPB peripheral #7)
not used
(VPB peripheral #6)
PWM0
(VPB peripheral #5)
UART1
(VPB peripheral #4)
UART0
(VPB peripheral #3)
TIMER1
(VPB peripheral #2)
TIMER0
(VPB peripheral #1)
Watchdog Timer
(VPB peripheral #0)
0xE01F FFFF 0xE01F C000
0xE003 8000
0xE003 4000
0xE003 0000
0xE002 C000
0xE002 8000
0xE002 4000
0xE002 0000
0xE001 C000
0xE001 8000
0xE001 4000
0xE001 0000
0xE000 C000
0xE000 8000
0xE000 4000
0xE000 0000
Figure 5: VPB Peripheral Map
LPC2119/2129/2292/2294 Memory Addressing 51 May 03, 2004
Philips Semiconductors Preliminary User Manual
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.
Table 3: ARM Exception Vector Locations
Address Exception 0x0000 0000 Reset 0x0000 0004 Undefined Instruction 0x0000 0008 Software Interrupt 0x0000 000C Prefetch Abort (instruction fetch memory fault) 0x0000 0010 Data Abort (data access memory fault) 0x0000 0014 Reserved * 0x0000 0018 IRQ 0x0000 001C FIQ
*: 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.
Table 4: LPC2119/2129/2194/2292/2294 Memory Mapping Modes
Mode Activation Usage
Boot Loader
mode
User Flash
mode
User RAM
mode
User External
mode
Hardware activation
by any Reset
Software activation
by Boot code
Software activation
by User program
Activated by
BOOT1:0 pins not
11 at Reset
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/2292/2294 Memory Addressing 52 May 03, 2004
Philips Semiconductors Preliminary User Manual
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 re­mapping 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/2292/2294 Memory Addressing 53 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
0x8000 0000
2.0 GB
2.0 GB - 8K
8K byte Boot Block
(re-mapped from top of Flash memory)
(Boot Block interrupt vectors)
Reserved for
On-Chip Memory
0x7FFF FFFF
1.0 GB
16 kB On-Chip SRAM
(SRAM interrupt vectors)
Reserved for
On-Chip Memory
(8k byte Boot Block re-Mapped to higher address range)
128K byte Flash Memory
0x4000 4000 0x4000 3FFF
0x4000 0000 0x3FFF FFFF
0x0002 0000 0x0001 FFFF
0.0 GB
Note: memory regions are not drawn to scale.
Active interrupt vectors (from Flash, SRAM, or Boot Block)
0x0000 0000
Figure 6: Map of lower memory is showing re-mapped and re-mappable areas (128 kB Flash).
LPC2119/2129/2292/2294 Memory Addressing 54 May 03, 2004
Philips Semiconductors Preliminary User Manual
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/2292/2294 Memory Addressing 55 May 03, 2004
Philips Semiconductors Preliminary User Manual
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.
Bank Address Range Configuration Register
0 8000 0000 - 80FF FFFF BCFG0 1 8100 0000 - 81FF FFFF BCFG1 2 8200 0000 - 82FF FFFF BCFG2 3 8300 0000 - 83FF FFFF BCFG3
Table 5: Address Ranges of External Memory Banks (LPC2292/2294only)
External Memory Controller (EMC) 56 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
PIN DESCRIPTION
Pin Name Type Pin Description
D[31:0]
A[23:0] Output External memory address lines.
OE Output Low-active Output Enable signal.
BLS[3:0] Output Low-active Byte Lane Select signals.
WE Output Low-active Write Enable signal.
CS[3:0] Output Low-active Chip Select signals.
Table 6: External Memory Controller Pin Description
Input/
Output
External memory data lines.
REGISTER DESCRIPTION
The external memory controller contains 4 registers as shown in Table 7.
Name Description Access
BCFG0 Configuration register for memory bank 0 Read/Write 0x0000 FBEF 0xFFE00000 BCFG1 Configuration register for memory bank 1 Read/Write 0x2000 FBEF 0xFFE00004 BCFG2 Configuration register for memory bank 2 Read/Write 0x1000 FBEF 0xFFE00008 BCFG3 Configuration register for memory bank 3 Read/Write 0x0000 FBEF 0xFFE0000C
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) 57 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Bank Configuration Registers 0 - 3 (BCFG0-3 - 0xFFE00000-0C).
BCFG0-3 Name Function Reset Value
This field controls the minimum number of “idle” CCLK cycles that the EMC maintains
3:0 IDCY
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
4 Reserved
9:5 WST1
10 RBLE
15:11 WST2
16:23 Reserved
24 BUSERR
25 WPERR
26 WP A 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
27 BM A 1 in this bit identifies a burst-ROM bank. 0
29:28 MW
31:30 AT Always 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
0 LL 00 8 bits 0LH 01 16 bits 0HL 10 32 bits 1XX 10 32 bits 2XX 01 16 bits 3XX 00 8 bits
Table 9: Default memory widths at Reset
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) 58 May 03, 2004
Philips Semiconductors Preliminary 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) 59 May 03, 2004
Philips Semiconductors Preliminary 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) 60 May 03, 2004
Philips Semiconductors Preliminary 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
change valid data
2 wait states (WST1=1)
valid address
change valid 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) 61 May 03, 2004
Philips Semiconductors Preliminary 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) 62 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
External Memory Controller (EMC) 63 May 03, 2004
Philips Semiconductors Preliminary 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 name Pin direction Pin Description
X1 Input Crystal Oscillator Input- Input to the oscillator and internal clock generator circuits. X2 Output Crystal 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.
EINT0 Input
EINT1 Input
EINT2 Input
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.
EINT3 Input
Pins P0.9, P0.20 and P0.30 can be selected to perform EINT3 function.
R
ESET Input
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 Block 64 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
System Control Block 65 May 03, 2004
Philips Semiconductors Preliminary 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.
Table 12: Summary of System Control Registers
Name Description Access
External Interrupts
EXTINT External Interrupt Flag Register. R/W 0 0xE01FC140 EXTWAKE External Interrupt Wakeup Register. R/W 0 0xE01FC144 EXTMODE External Interrupt Mode Register. R/W 0 0xE01FC148
EXTPOLAR External Interrupt Polarity Register. R/W 0 0xE01FC14C
Memory Mapping Control
MEMMAP Memory Mapping Control. R/W 0 0xE01FC040
Phase Locked Loop
PLLCON PLL Control Register. R/W 0 0xE01FC080
PLLCFG PLL Configuration Register. R/W 0 0xE01FC084 PLLSTAT PLL Status Register. RO 0 0xE01FC088 PLLFEED PLL Feed Register. WO NA 0xE01FC08C
Power Control
PCON P ower Control Register. R/W 0 0xE01FC0C0
PCONP Power Control for Peripherals. R/W 0x3BE 0xE01FC0C4
VPB Divider
VPBDIV VPB Divider Control. R/W 0 0xE01FC100
Reset
Value*
Address
*Reset Value refers to the data stored in used bits only. It does not include reserved bits content.
System Control Block 66 May 03, 2004
Philips Semiconductors Preliminary 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
X1 X2
C
C
Clock
LPC2119/29/94
LPC2292/2294
X1 X2
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 pF n.a. n.a.
1 - 5 MHz
20 pF n.a. n.a. 30 pF < 300 : 58 pF, 58 pF
System Control Block 67 May 03, 2004
Philips Semiconductors Preliminary 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)
X1/X2
Max. Crystal Series
L
Resistence R
S
External Load
Capacitors C
X1
, C
10 pF < 300 : 18 pF, 18 pF 20 pF < 300 : 38 pF, 38 pF 30 pF < 300 : 58 pF, 58 pF 10 pF < 300 : 18 pF, 18 pF 20 pF < 220 : 38 pF, 38 pF 30 pF < 140 : 58 pF, 58 pF 10 pF < 220 : 18 pF, 18 pF 20 pF < 140 : 38 pF, 38 pF 30 pF < 80 : 58 pF, 58 pF 10 pF < 160 : 18 pF, 18 pF 20 pF < 90 : 38 pF, 38 pF 30 pF < 50 : 58 pF, 58 pF 10 pF <130 : 18 pF, 18 pF 20 pF <50 : 38 pF, 38 pF 30 pF n.a. n.a.
X2
f
selection
OSC
on-chip PLL used
in application?
False
ISP used for initial
code download?
False
external crystal
oscillator used?
False
min f
= 1 MHz
OSC
max f
= 50 MHz
OSC
True
min f
max f
= 1 MHz
OSC
= 30 MHz
OSC
min f
max f
= 10 MHz
OSC
= 25 MHz
OSC
True
True
(Figure 12, mode a and/or b) (Figure 12, mode a) (Figure 12, mode b)
Figure 13: F
selection algorithm
OSC
System Control Block 68 May 03, 2004
Philips Semiconductors Preliminary 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
Address Name Description Access
0xE01FC140 EXTINT
0xE01FC144 EXTWAKE
0xE01FC148 EXTMODE
0xE01FC14C EXTPOLAR
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 level­sensitive.
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 Block 69 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 15: External Interrupt Flag Register (EXTINT - 0xE01FC140)
EXTINT Function Description
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:4 Reserved
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.
0
NA
External Interrupt Wakeup Register (EXTWAKE - 0xE01FC144)
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 Block 70 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 16: External Interrupt Wakeup Register (EXTWAKE - 0xE01FC144)
EXTWAKE Function Description
0 EXTWAKE0 When one, assert ion of EINT 0 1 EXTWAKE1 When one, assert ion of EINT 1 2 EXTWAKE2 When one, assert ion of EINT 2 3 EXTWAKE3 When one, assert ion of EINT 3 will wake up the processor from Power Down mode. 0
7:4 Reserved
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
Reset
Value
NA
External Interrupt Mode Register (EXTMODE - 0xE01FC148)
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.
Table 17: External Interrupt Mode Register (EXTMODE - 0xE01FC148)
EXTMODE Function Description
0 EXTMODE0 When 0, level-sensitivity is selected for EINT0. When 1, EINT0 is edge-sensitive. 0 1 EXTMODE1 When 0, level-sensitivity is selected for EINT1. When 1, EINT1 is edge-sensitive. 0 2 EXTMODE2 When 0, level-sensitivity is selected for EINT2. When 1, EINT2 is edge-sensitive. 0 3 EXTMODE3 When 0, level-sensitivity is selected for EINT3. When 1, EINT3 is edge-sensitive. 0
7:4 Reserved
Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined.
Reset
Value
NA
External Interrupt Polarity Register (EXTPOLAR - 0xE01FC14C)
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 Block 71 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 18: External Interrupt Polarity Register (EXTPOLAR - 0xE01FC14C)
EXTPOLAR Function Description
0 EXTPOLAR0
1 EXTPOLAR1
2 EXTPOLAR2
3 EXTPOLAR3
7:4 Reserved
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 Block 72 May 03, 2004
Philips Semiconductors Preliminary 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
pclk pclk
S
Q
R
to VIC
VPB Read of EXTINT
System Control Block 73 May 03, 2004
Philips Semiconductors Preliminary 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
Address Name Description Access
0xE01FC040 MEMMAP
Table 20: Memory Mapping Control Register (MEMMAP - 0xE01FC040)
MEMMAP Function Description
1:0 MAP1:0
7:2 Reserved
*: 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 Block 74 May 03, 2004
Philips Semiconductors Preliminary 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
Address Name Description Access
PLL Control Register. Holding register for updating PLL control bits. Values
0xE01FC080 PLLCON
0xE01FC084 PLLCFG
0xE01FC088 PLLSTAT
0xE01FC08C PLLFEED
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 Block 75 May 03, 2004
Philips Semiconductors Preliminary 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 Block 76 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 22: PLL Control Register (PLLCON - 0xE01FC080)
PLLCON Function Description
0 PLLE
1 PLLC
7:2 Reserved
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.
Table 23: PLL Configuration Register (PLLCFG - 0xE01FC084)
PLLCFG Function Description
PLL Multiplier value. Supplies the value "M" in the PLL frequency calculations.
4:0 MSEL4:0
6:5 PSEL1:0
7 Reserved
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 Block 77 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 24: PLL Status Register (PLLSTAT - 0xE01FC088)
PLLSTAT Function Description
4:0 MSEL4:0 Read-back for the PLL Multiplier value. This is the value currently used by the PLL. 0 6:5 PSEL1:0 Read-back for the PLL Divider value. This is the value currently used by the PLL. 0
7 Reserved
8 PLLE
9 PLLC
10 PLOCK
15:11 Reserved
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
PLLC PLLE PLL Function
0 0 PLL is turned off and disconnected. The system runs from the unmodified clock input. 0 1 The PLL is active, but not yet connected. The PLL can be connected after PLOCK is asserted.
10
1 1 The 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 Block 78 May 03, 2004
Philips Semiconductors Preliminary 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.
Table 26: PLL Feed Register (PLLFEED - 0xE01FC08C)
PLLFEED Function Description
7:0 PLLFEED
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
cclk the PLL output frequency (also the processor clock frequency) M PLL Multiplier value from the MSEL bits in the PLLCFG register P PLL 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 Block 79 May 03, 2004
Philips Semiconductors Preliminary 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)
00 1 01 2 10 4 11 8
Table 28: PLL Multiplier Values
MSEL Bits
(PLLCFG bits 4:0)
00000 1 00001 2 00010 3 00011 4
... ...
11110 31 11111 32
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 Block 80 May 03, 2004
Philips Semiconductors Preliminary 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
Address Name Description Access
Power Control Register. This register contains control bits that enable the two
0xE01FC0C0 PCON
0xE01FC0C4 PCONP
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 Block 81 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 30: Power Control Register (PCON - 0xE01FC0C0)
PCON Function Description
Idle mode - when 1, this bit causes the processor clock to be stopped, while on-chip
0IDL
1PD
7:2 Reserved
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 re­start, 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 Function Description
0 Reserved
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
1 PCTIM0 When 1, TIMER0 is enabled. When 0, TIMER0 is disabled to conserve power. 1 2 PCTIM1 When 1, TIMER1 is enabled. When 0, TIMER1 is disabled to conserve power. 1 3 PCURT0 When 1, UART0 is enabled. When 0, UART0 is disabled to conserve power. 1 4 PCURT1 When 1, UART1 is enabled. When 0, UART1 is disabled to conserve power. 1 5 PCPWM0 When 1, PWM0 is enabled. When 0, PWM0 is disabled to conserve power. 1
6 Reserved
7 PCI2C When 1, the I 8 PCSPI0 When 1, the SPI0 interface is enabled. When 0, the SPI0 is disabled to conserve power. 1
9 PCRTC When 1, the RTC is enabled. When 0, the RTC is disabled to conserve power. 1 10 PCSPI1 When 1, the SPI1 interface is enabled. When 0, the SPI1 is disabled to conserve power. 1 11 Reserved 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 Block 82 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Table 31: Power Control for Peripherals Register for LPC2119/2129/2292 (PCONP - 0xE01FC0C4)
PCONP Function Description
12 PCAD When 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.
13 PCCAN1
Note: the Acceptance Filter is enabled if any of CAN Controllers 1-2 is enabled.
14 PCCAN2 When 1, CAN Controller 2 is enabled. When 0, it is disabled to save power. 1
31:15 Reserved
Table 32: Power Control for Peripherals Register for LPC2194/2294 (PCONP - 0xE01FC0C4)
PCONP Function Description
0 Reserved
1 PCTIM0 When 1, TIMER0 is enabled. When 0, TIMER0 is disabled to conserve power. 1
2 PCTIM1 When 1, TIMER1 is enabled. When 0, TIMER1 is disabled to conserve power. 1
3 PCURT0 When 1, UART0 is enabled. When 0, UART0 is disabled to conserve power. 1
4 PCURT1 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
5 PCPWM0 When 1, PWM0 is enabled. When 0, PWM0 is disabled to conserve power. 1
6 Reserved
7 PCI2C When 1, the I
8 PCSPI0 When 1, the SPI0 interface is enabled. When 0, the SPI0 is disabled to conserve power. 1
9 PCRTC When 1, the RTC is enabled. When 0, the RTC is disabled to conserve power. 1 10 PCSPI1 When 1, the SPI1 interface is enabled. When 0, the SPI1 is disabled to conserve power. 1
11 PCEMC
12 PCAD When 1, the A/D converter is enabled. When 0, the A/D is disabled to conserve power. 1 13 PCCAN1 When 1, CAN Controller 1 is enabled. When 0, it is disabled to save power. 1 14 PCCAN2 When 1, CAN Controller 2 is enabled. When 0, it is disabled to save power. 1 15 PCCAN3 When 1, CAN Controller 3 is enabled. When 0, it is disabled to save power. 1 16 PCCAN4 When 1, CAN Controller 4 is enabled. When 0, it is disabled to save power. 1
31:17 Reserved
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 Block 83 May 03, 2004
Philips Semiconductors Preliminary 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 Block 84 May 03, 2004
Philips Semiconductors Preliminary 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
Start Count 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 Block 85 May 03, 2004
Philips Semiconductors Preliminary 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
Address Name Description Access
0xE01FC100 VPBDIV Controls the rate of the VPB clock in relation to the processor clock. R/W
Table 34: VPB Divider Register (VPBDIV - 0xE01FC100)
VPBDIV Function Description
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:0 VPBDIV
3:2 Reserved
5:4 XCLKDIV
7:6 Reserved
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 Block 86 May 03, 2004
Philips Semiconductors Preliminary 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 Block 87 May 03, 2004
Philips Semiconductors Preliminary 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 Block 88 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
System Control Block 89 May 03, 2004
Philips Semiconductors Preliminary 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) 90 May 03, 2004
Philips Semiconductors Preliminary 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) 91 May 03, 2004
Philips Semiconductors Preliminary 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 latches Initiate Fetch
2
Use Latched Data Sequential access, data not in MAM latches Initiate Fetch Initiate Fetch Non-Sequential access, data in MAM latches Initiate Fetch
2
Initiate Fetch
Non-Sequential access, data not in MAM latches Initiate Fetch Initiate 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 latches Initiate Fetch
2
Initiate Fetch
2
Use Latched Data Sequential access, data not in MAM latches Initiate Fetch Initiate Fetch Initiate Fetch Non-Sequential access, data in MAM latches Initiate Fetch
2
Initiate Fetch
2
Use Latched Data Non-Sequential access, data not in MAM latches Initiate Fetch Initiate Fetch Initiate 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) 92 May 03, 2004
Philips Semiconductors Preliminary 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
Name Description Access
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/W 0 0xE01FC000
R/W 0x07 0xE01FC004
Reset
Value*
Address
Memory Accelerator Module (MAM) 93 May 03, 2004
Philips Semiconductors Preliminary 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)
MAMCR Function Description
These bits determine the operating mode of the MAM as follows:
1:0
7:2 Reserved
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)
MAMTIM Function Description
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:3 Reserved
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) 94 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Mic rocontroller
Memory Accelerator Module (MAM) 95 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
6. VECTORED INTERRUPT CONTROLLER (VIC)
FEATURES
• ARM PrimeCell™ Vectored Interrupt Controller
• 32 interrupt request inputs
• 16 vectored IRQ interrupts
• 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
(PL190) documentation.
Vectored Interrupt Controller (VIC) 96 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
REGISTER DESCRIPTION
The VIC implements the registers shown in Table 40. More detailed descriptions follow.
Table 40: VIC Register Map
Name Description Access
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.
Reset
Value*
RO 0 0xFFFF F000
RO 0 0xFFFF F004
RO 0 0xFFFF F008
R/W 0 0xFFFF F00C
R/W 0 0xFFFF F010
W 0 0xFFFF F014
R/W 0 0xFFFF F018
W 0 0xFFFF F01C
R/W 0 0xFFFF F020
Address
VICVectAddr
VICDefVectAddr
VICVectAddr0
VICVectAddr1 Vector address 1 register R/W 0 0xFFFF F104 VICVectAddr2 Vector address 2 register R/W 0 0xFFFF F108 VICVectAddr3 Vector address 3 register R/W 0 0xFFFF F10C VICVectAddr4 Vector address 4 register R/W 0 0xFFFF F110 VICVectAddr5 Vector address 5 register R/W 0 0xFFFF F114 VICVectAddr6 Vector address 6 register R/W 0 0xFFFF F118 VICVectAddr7 Vector address 7 register R/W 0 0xFFFF F11C VICVectAddr8 Vector address 8 register R/W 0 0xFFFF F120 VICVectAddr9 Vector address 9 register R/W 0 0xFFFF F124
Vector Address Register. When an IRQ interrupt occurs, the IRQ service routine can read this register and jump to the value read.
Default Vector Addres s Register. This regi ster holds the address of the Interrupt Service routine (ISR) for non-vectored IRQs.
Vector address 0 register. Vector Address Registers 0-15 hold the addresses of the Interrupt Service routines (ISRs) for the 16 vectored IRQ slots.
R/W 0 0xFFFF F030
R/W 0 0xFFFF F034
R/W 0 0xFFFF F100
Vectored Interrupt Controller (VIC) 97 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Table 40: VIC Register Map
Name Description Access
VICVectAddr10 Vector address 10 register R/W 0 0xFFFF F128 VICVectAddr11 Vector address 11 register R/W 0 0xFFFF F12C VICVectAddr12 Vector address 12 register R/W 0 0xFFFF F130 VICVectAddr13 Vector address 13 register R/W 0 0xFFFF F134 VICVectAddr14 Vector address 14 register R/W 0 0xFFFF F138 VICVectAddr15 Vector address 15 register R/W 0 0xFFFF F13C
Vector control 0 re gister. Vector Control Registers 0-15 eac h control one
VICVectCntl0
VICVectCntl1 Vector control 1 register R/W 0 0xFFFF F204 VICVectCntl2 Vector control 2 register R/W 0 0xFFFF F208 VICVectCntl3 Vector control 3 register R/W 0 0xFFFF F20C VICVectCntl4 Vector control 4 register R/W 0 0xFFFF F210 VICVectCntl5 Vector control 5 register R/W 0 0xFFFF F214 VICVectCntl6 Vector control 6 register R/W 0 0xFFFF F218 VICVectCntl7 Vector control 7 register R/W 0 0xFFFF F21C VICVectCntl8 Vector control 8 register R/W 0 0xFFFF F220
of the 16 vectored IRQ slots. Slot 0 has the highest priority and slot 15 the lowest.
R/W 0 0xFFFF F200
Reset
Value*
Address
VICVectCntl9 Vector control 9 register R/W 0 0xFFFF F224 VICVectCntl10 Vector control 10 register R/W 0 0xFFFF F228 VICVectCntl11 Vector control 11 register R/W 0 0xFFFF F22C VICVectCntl12 Vector control 12 register R/W 0 0xFFFF F230 VICVectCntl13 Vector control 13 register R/W 0 0xFFFF F234 VICVectCntl14 Vector control 14 register R/W 0 0xFFFF F238 VICVectCntl15 Vector control 15 register R/W 0 0xFFFF F23C
*Reset Value refers to the data stored in used bits only. It does not include reserved bits content.
Vectored Interrupt Controller (VIC) 98 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
VIC REGISTERS
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.
Software Interrupt Register (VICSoftInt - 0xFFFFF018, Read/Write)
The contents of this register are ORed with the 32 interrupt requests from the various peripherals, before any other logic is applied.
Table 41: Software Interrupt Register (VICSoftInt - 0xFFFFF018, Read/Write)
VICSoftInt Function Reset Value
1:force the interrupt request with this bit number.
31:0
0: do not force the inte rrupt request w ith this bit nu mber. Writin g zeroes to bits in VICSof tInt has no effect, see VICSoftIntClear.
0
Software Interrupt Clear Register (VICSoftIntClear - 0xFFFFF01C, Write Only)
This register allows software to clear one or more bits in the Software Interrupt register, without having to first read it.
Table 42: Software Interrupt Clear Register (VICSoftIntClear - 0xFFFFF01C, Write Only)
VICSoftIntClear Function Reset Value
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)
VICRawIntr Function Reset 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.
0
Vectored Interrupt Controller (VIC) 99 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microc ontroller
Interrupt Enable Register (VICIntEnable - 0xFFFFF010, Read/Write)
This register controls which of the 32 interrupt requests and software interrupts contribute to FIQ or IRQ.
Table 44: Interrupt Enable Register (VICINtEnable - 0xFFFFF010, Read/Write)
VICIntEnable Function Reset Value
When this register is r ead, 1s indic ate in terrupt re quest s or so ftwar e interru pts th at are en abled to contribute to FIQ or IRQ.
31:0
Interrupt Enable Clear Register (VICIntEnClear - 0xFFFFF014, Write Only)
This register allows software to clear one or more bits in the Interrupt Enable register, without having to first read it.
Table 45: Software Interrupt Clear Register (VICIntEnClear - 0xFFFFF014, Write Only)
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
VICIntEnClear Function Reset 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.
0
Interrupt Select Register (VICIntSelect - 0xFFFFF00C, Read/Write)
This register classifies each of the 32 interrupt requests as contributing to FIQ or IRQ.
Table 46: Interrupt Select Register (VICIntSelect - 0xFFFFF00C, Read/Write)
VICIntSelect Function Reset Value
31:0
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)
VICIRQStatus Function Reset Value
31:0 1: the interrupt request with this bit number is enabled, class ifi ed as IRQ, and asserte d. 0
Vectored Interrupt Controller (VIC) 100 May 03, 2004
Loading...