source: rtems/c/src/lib/libcpu/arm/lpc22xx/include/lpc22xx.h @ a44e045b

4.104.114.84.95
Last change on this file since a44e045b was 7d33199, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/25/07 at 11:48:32

2007-04-25 Ray Xu <xr@…>

  • Makefile.am, configure.ac: Add lpc22xx support.
  • lpc22xx/clock/clockdrv.c, lpc22xx/include/lpc22xx.h, lpc22xx/irq/bsp_irq_asm.S, lpc22xx/timer/lpc_timer.h, lpc22xx/timer/timer.c: New (Initial submission).
  • Property mode set to 100644
File size: 32.8 KB
Line 
1/*
2 * Motorola LPC22XX Register definitions
3 *
4 * Copyright (c) 2003 by Cogent Computer Systems
5 * Written by Jay Monkman <jtm@lopingdog.com>
6 *     
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14#ifndef __LPC22XX_H__
15#define __LPC22XX_H__
16
17#include <rtems/stdint.h>
18
19/* EXTERNAL MEMORY CONTROLLER (EMC) */
20#define BCFG0           (*((volatile unsigned int *) 0xFFE00000))       /* lpc22xx only */
21#define BCFG1           (*((volatile unsigned int *) 0xFFE00004))       /* lpc22xx only */
22#define BCFG2           (*((volatile unsigned int *) 0xFFE00008))       /* lpc22xx only */
23#define BCFG3           (*((volatile unsigned int *) 0xFFE0000C))       /* lpc22xx only */
24
25/* External Interrupts */
26#define EXTINT          (*((volatile unsigned char *) 0xE01FC140))
27#define EXTWAKE         (*((volatile unsigned char *) 0xE01FC144))
28#ifdef  CONFIG_ARCH_LPC22xx
29#define EXTMODE         (*((volatile unsigned char *) 0xE01FC148))      /* no in lpc210x*/
30#define EXTPOLAR        (*((volatile unsigned char *) 0xE01FC14C))      /* no in lpc210x*/
31#endif
32
33/* SMemory mapping control. */
34#define MEMMAP          (*((volatile unsigned char *) 0xE01FC040))
35
36/* Phase Locked Loop (PLL) */
37#define PLLCON          (*((volatile unsigned char *) 0xE01FC080))
38#define PLLCFG          (*((volatile unsigned char *) 0xE01FC084))
39#define PLLSTAT         (*((volatile unsigned short*) 0xE01FC088))
40#define PLLFEED         (*((volatile unsigned char *) 0xE01FC08C))
41
42/* Power Control */
43#define PCON            (*((volatile unsigned char *) 0xE01FC0C0))
44#define PCONP           (*((volatile unsigned long *) 0xE01FC0C4))
45
46/* VPB Divider */
47#define VPBDIV          (*((volatile unsigned char *) 0xE01FC100))
48
49/* Memory Accelerator Module (MAM) */
50#define MAMCR           (*((volatile unsigned char *) 0xE01FC000))
51#define MAMTIM          (*((volatile unsigned char *) 0xE01FC004))
52
53/* Vectored Interrupt Controller (VIC) */
54#define VICIRQStatus    (*((volatile unsigned long *) 0xFFFFF000))
55#define VICFIQStatus    (*((volatile unsigned long *) 0xFFFFF004))
56#define VICRawIntr      (*((volatile unsigned long *) 0xFFFFF008))
57#define VICIntSelect    (*((volatile unsigned long *) 0xFFFFF00C))
58#define VICIntEnable    (*((volatile unsigned long *) 0xFFFFF010))
59#define VICIntEnClr     (*((volatile unsigned long *) 0xFFFFF014))
60#define VICSoftInt      (*((volatile unsigned long *) 0xFFFFF018))
61#define VICSoftIntClear (*((volatile unsigned long *) 0xFFFFF01C))
62#define VICProtection   (*((volatile unsigned long *) 0xFFFFF020))
63#define VICVectAddr     (*((volatile unsigned long *) 0xFFFFF030))
64#define VICDefVectAddr  (*((volatile unsigned long *) 0xFFFFF034))
65
66#define VICVectAddrBase    0xFFFFF100
67#define VICVectAddr0    (*((volatile unsigned long *) 0xFFFFF100))
68#define VICVectAddr1    (*((volatile unsigned long *) 0xFFFFF104))
69#define VICVectAddr2    (*((volatile unsigned long *) 0xFFFFF108))
70#define VICVectAddr3    (*((volatile unsigned long *) 0xFFFFF10C))
71#define VICVectAddr4    (*((volatile unsigned long *) 0xFFFFF110))
72#define VICVectAddr5    (*((volatile unsigned long *) 0xFFFFF114))
73#define VICVectAddr6    (*((volatile unsigned long *) 0xFFFFF118))
74#define VICVectAddr7    (*((volatile unsigned long *) 0xFFFFF11C))
75#define VICVectAddr8    (*((volatile unsigned long *) 0xFFFFF120))
76#define VICVectAddr9    (*((volatile unsigned long *) 0xFFFFF124))
77#define VICVectAddr10   (*((volatile unsigned long *) 0xFFFFF128))
78#define VICVectAddr11   (*((volatile unsigned long *) 0xFFFFF12C))
79#define VICVectAddr12   (*((volatile unsigned long *) 0xFFFFF130))
80#define VICVectAddr13   (*((volatile unsigned long *) 0xFFFFF134))
81#define VICVectAddr14   (*((volatile unsigned long *) 0xFFFFF138))
82#define VICVectAddr15   (*((volatile unsigned long *) 0xFFFFF13C))
83
84#define VICVectCntlBase 0xFFFFF200
85#define VICVectCntl0    (*((volatile unsigned long *) 0xFFFFF200))
86#define VICVectCntl1    (*((volatile unsigned long *) 0xFFFFF204))
87#define VICVectCntl2    (*((volatile unsigned long *) 0xFFFFF208))
88#define VICVectCntl3    (*((volatile unsigned long *) 0xFFFFF20C))
89#define VICVectCntl4    (*((volatile unsigned long *) 0xFFFFF210))
90#define VICVectCntl5    (*((volatile unsigned long *) 0xFFFFF214))
91#define VICVectCntl6    (*((volatile unsigned long *) 0xFFFFF218))
92#define VICVectCntl7    (*((volatile unsigned long *) 0xFFFFF21C))
93#define VICVectCntl8    (*((volatile unsigned long *) 0xFFFFF220))
94#define VICVectCntl9    (*((volatile unsigned long *) 0xFFFFF224))
95#define VICVectCntl10   (*((volatile unsigned long *) 0xFFFFF228))
96#define VICVectCntl11   (*((volatile unsigned long *) 0xFFFFF22C))
97#define VICVectCntl12   (*((volatile unsigned long *) 0xFFFFF230))
98#define VICVectCntl13   (*((volatile unsigned long *) 0xFFFFF234))
99#define VICVectCntl14   (*((volatile unsigned long *) 0xFFFFF238))
100#define VICVectCntl15   (*((volatile unsigned long *) 0xFFFFF23C))
101
102/* Pin Connect Block */
103#define PINSEL0         (*((volatile unsigned long *) 0xE002C000))
104#define PINSEL1         (*((volatile unsigned long *) 0xE002C004))
105
106#define PINSEL2         (*((volatile unsigned long *) 0xE002C014))      /* no in lpc210x*/
107
108
109/* General Purpose Input/Output (GPIO) */
110#ifndef CONFIG_ARCH_LPC22xx
111
112#define IOPIN           (*((volatile unsigned long *) 0xE0028000))      /* lpc210x only */
113#define IOSET           (*((volatile unsigned long *) 0xE0028004))      /* lpc210x only */
114#define IODIR           (*((volatile unsigned long *) 0xE0028008))      /* lpc210x only */
115#define IOCLR           (*((volatile unsigned long *) 0xE002800C))      /* lpc210x only */
116
117#endif
118
119#ifdef CONFIG_ARCH_LPC22xx
120#define IO0PIN          (*((volatile unsigned long *) 0xE0028000))      /* no in lpc210x*/
121#define IO0SET          (*((volatile unsigned long *) 0xE0028004))      /* no in lpc210x*/
122#define IO0DIR          (*((volatile unsigned long *) 0xE0028008))      /* no in lpc210x*/
123#define IO0CLR          (*((volatile unsigned long *) 0xE002800C))      /* no in lpc210x*/
124
125#define IO1PIN          (*((volatile unsigned long *) 0xE0028010))      /* no in lpc210x*/
126#define IO1SET          (*((volatile unsigned long *) 0xE0028014))      /* no in lpc210x*/
127#define IO1DIR          (*((volatile unsigned long *) 0xE0028018))      /* no in lpc210x*/
128#define IO1CLR          (*((volatile unsigned long *) 0xE002801C))      /* no in lpc210x*/
129#endif
130
131#ifdef CONFIG_ARCH_LPC22xx
132
133#define IO2PIN          (*((volatile unsigned long *) 0xE0028020))      /* lpc22xx only */
134#define IO2SET          (*((volatile unsigned long *) 0xE0028024))      /* lpc22xx only */
135#define IO2DIR          (*((volatile unsigned long *) 0xE0028028))      /* lpc22xx only */
136#define IO2CLR          (*((volatile unsigned long *) 0xE002802C))      /* lpc22xx only */
137
138#define IO3PIN          (*((volatile unsigned long *) 0xE0028030))      /* lpc22xx only */
139#define IO3SET          (*((volatile unsigned long *) 0xE0028034))      /* lpc22xx only */
140#define IO3DIR          (*((volatile unsigned long *) 0xE0028038))      /* lpc22xx only */
141#define IO3CLR          (*((volatile unsigned long *) 0xE002803C))      /* lpc22xx only */
142
143#endif
144
145/* Universal Asynchronous Receiver Transmitter 0 (UART0) */
146#define U0RBR           (*((volatile unsigned char *) 0xE000C000))
147#define U0THR           (*((volatile unsigned char *) 0xE000C000))
148#define U0IER           (*((volatile unsigned char *) 0xE000C004))
149#define U0IIR           (*((volatile unsigned char *) 0xE000C008))
150#define U0FCR           (*((volatile unsigned char *) 0xE000C008))
151#define U0LCR           (*((volatile unsigned char *) 0xE000C00C))
152#define U0LSR           (*((volatile unsigned char *) 0xE000C014))
153#define U0SCR           (*((volatile unsigned char *) 0xE000C01C))
154#define U0DLL           (*((volatile unsigned char *) 0xE000C000))
155#define U0DLM           (*((volatile unsigned char *) 0xE000C004))
156
157/* Universal Asynchronous Receiver Transmitter 1 (UART1) */
158#define U1RBR           (*((volatile unsigned char *) 0xE0010000))
159#define U1THR           (*((volatile unsigned char *) 0xE0010000))
160#define U1IER           (*((volatile unsigned char *) 0xE0010004))
161#define U1IIR           (*((volatile unsigned char *) 0xE0010008))
162#define U1FCR           (*((volatile unsigned char *) 0xE0010008))
163#define U1LCR           (*((volatile unsigned char *) 0xE001000C))
164#define U1MCR           (*((volatile unsigned char *) 0xE0010010))
165#define U1LSR           (*((volatile unsigned char *) 0xE0010014))
166#define U1MSR           (*((volatile unsigned char *) 0xE0010018))
167#define U1SCR           (*((volatile unsigned char *) 0xE001001C))
168#define U1DLL           (*((volatile unsigned char *) 0xE0010000))
169#define U1DLM           (*((volatile unsigned char *) 0xE0010004))
170
171/* I2C (8/16 bit data bus) */
172#define I2CONSET        (*((volatile unsigned char *) 0xE001C000))
173#define I2STAT          (*((volatile unsigned char *) 0xE001C004))
174#define I2DAT           (*((volatile unsigned char *) 0xE001C008))
175#define I2ADR           (*((volatile unsigned char *) 0xE001C00C))
176#define I2SCLH          (*((volatile unsigned short *) 0xE001C010))
177#define I2SCLL          (*((volatile unsigned short *) 0xE001C014))
178#define I2CONCLR        (*((volatile unsigned char *) 0xE001C018))
179
180/* SPI (Serial Peripheral Interface) */
181        /* only for lpc210x*/
182#define SPI_SPCR        (*((volatile unsigned char *) 0xE0020000))
183#define SPI_SPSR        (*((volatile unsigned char *) 0xE0020004))
184#define SPI_SPDR        (*((volatile unsigned char *) 0xE0020008))
185#define SPI_SPCCR       (*((volatile unsigned char *) 0xE002000C))
186#define SPI_SPINT       (*((volatile unsigned char *) 0xE002001C))
187
188#ifdef CONFIG_ARCH_LPC22xx
189#define S0PCR           (*((volatile unsigned char *) 0xE0020000))      /* no in lpc210x*/
190#define S0PSR           (*((volatile unsigned char *) 0xE0020004))      /* no in lpc210x*/
191#define S0PDR           (*((volatile unsigned char *) 0xE0020008))      /* no in lpc210x*/
192#define S0PCCR          (*((volatile unsigned char *) 0xE002000C))      /* no in lpc210x*/
193#define S0PINT          (*((volatile unsigned char *) 0xE002001C))      /* no in lpc210x*/
194
195#define S1PCR           (*((volatile unsigned char *) 0xE0030000))      /* no in lpc210x*/
196#define S1PSR           (*((volatile unsigned char *) 0xE0030004))      /* no in lpc210x*/
197#define S1PDR           (*((volatile unsigned char *) 0xE0030008))      /* no in lpc210x*/
198#define S1PCCR          (*((volatile unsigned char *) 0xE003000C))      /* no in lpc210x*/
199#define S1PINT          (*((volatile unsigned char *) 0xE003001C))      /* no in lpc210x*/
200#endif
201/* CAN CONTROLLERS AND ACCEPTANCE FILTER */
202#define CAN1MOD         (*((volatile unsigned long *) 0xE0044000))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
203#define CAN1CMR         (*((volatile unsigned long *) 0xE0044004))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
204#define CAN1GSR         (*((volatile unsigned long *) 0xE0044008))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
205#define CAN1ICR         (*((volatile unsigned long *) 0xE004400C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
206#define CAN1IER         (*((volatile unsigned long *) 0xE0044010))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
207#define CAN1BTR         (*((volatile unsigned long *) 0xE0044014))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
208#define CAN1EWL         (*((volatile unsigned long *) 0xE004401C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
209#define CAN1SR          (*((volatile unsigned long *) 0xE0044020))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
210#define CAN1RFS         (*((volatile unsigned long *) 0xE0044024))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
211#define CAN1RDA         (*((volatile unsigned long *) 0xE0044028))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
212#define CAN1RDB         (*((volatile unsigned long *) 0xE004402C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
213#define CAN1TFI1        (*((volatile unsigned long *) 0xE0044030))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
214#define CAN1TID1        (*((volatile unsigned long *) 0xE0044034))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
215#define CAN1TDA1        (*((volatile unsigned long *) 0xE0044038))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
216#define CAN1TDB1        (*((volatile unsigned long *) 0xE004403C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
217#define CAN1TFI2        (*((volatile unsigned long *) 0xE0044040))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
218#define CAN1TID2        (*((volatile unsigned long *) 0xE0044044))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
219#define CAN1TDA2        (*((volatile unsigned long *) 0xE0044048))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
220#define CAN1TDB2        (*((volatile unsigned long *) 0xE004404C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
221#define CAN1TFI3        (*((volatile unsigned long *) 0xE0044050))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
222#define CAN1TID3        (*((volatile unsigned long *) 0xE0044054))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
223#define CAN1TDA3        (*((volatile unsigned long *) 0xE0044058))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
224#define CAN1TDB3        (*((volatile unsigned long *) 0xE004405C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
225
226#define CAN2MOD         (*((volatile unsigned long *) 0xE0048000))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
227#define CAN2CMR         (*((volatile unsigned long *) 0xE0048004))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
228#define CAN2GSR         (*((volatile unsigned long *) 0xE0048008))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
229#define CAN2ICR         (*((volatile unsigned long *) 0xE004800C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
230#define CAN2IER         (*((volatile unsigned long *) 0xE0048010))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
231#define CAN2BTR         (*((volatile unsigned long *) 0xE0048014))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
232#define CAN2EWL         (*((volatile unsigned long *) 0xE004801C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
233#define CAN2SR          (*((volatile unsigned long *) 0xE0048020))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
234#define CAN2RFS         (*((volatile unsigned long *) 0xE0048024))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
235#define CAN2RDA         (*((volatile unsigned long *) 0xE0048028))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
236#define CAN2RDB         (*((volatile unsigned long *) 0xE004802C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
237#define CAN2TFI1        (*((volatile unsigned long *) 0xE0048030))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
238#define CAN2TID1        (*((volatile unsigned long *) 0xE0048034))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
239#define CAN2TDA1        (*((volatile unsigned long *) 0xE0048038))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
240#define CAN2TDB1        (*((volatile unsigned long *) 0xE004803C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
241#define CAN2TFI2        (*((volatile unsigned long *) 0xE0048040))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
242#define CAN2TID2        (*((volatile unsigned long *) 0xE0048044))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
243#define CAN2TDA2        (*((volatile unsigned long *) 0xE0048048))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
244#define CAN2TDB2        (*((volatile unsigned long *) 0xE004804C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
245#define CAN2TFI3        (*((volatile unsigned long *) 0xE0048050))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
246#define CAN2TID3        (*((volatile unsigned long *) 0xE0048054))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
247#define CAN2TDA3        (*((volatile unsigned long *) 0xE0048058))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
248#define CAN2TDB3        (*((volatile unsigned long *) 0xE004805C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
249
250#define CAN3MOD         (*((volatile unsigned long *) 0xE004C000))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
251#define CAN3CMR         (*((volatile unsigned long *) 0xE004C004))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
252#define CAN3GSR         (*((volatile unsigned long *) 0xE004C008))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
253#define CAN3ICR         (*((volatile unsigned long *) 0xE004C00C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
254#define CAN3IER         (*((volatile unsigned long *) 0xE004C010))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
255#define CAN3BTR         (*((volatile unsigned long *) 0xE004C014))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
256#define CAN3EWL         (*((volatile unsigned long *) 0xE004C01C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
257#define CAN3SR          (*((volatile unsigned long *) 0xE004C020))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
258#define CAN3RFS         (*((volatile unsigned long *) 0xE004C024))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
259#define CAN3RDA         (*((volatile unsigned long *) 0xE004C028))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
260#define CAN3RDB         (*((volatile unsigned long *) 0xE004C02C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
261#define CAN3TFI1        (*((volatile unsigned long *) 0xE004C030))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
262#define CAN3TID1        (*((volatile unsigned long *) 0xE004C034))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
263#define CAN3TDA1        (*((volatile unsigned long *) 0xE004C038))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
264#define CAN3TDB1        (*((volatile unsigned long *) 0xE004C03C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
265#define CAN3TFI2        (*((volatile unsigned long *) 0xE004C040))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
266#define CAN3TID2        (*((volatile unsigned long *) 0xE004C044))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
267#define CAN3TDA2        (*((volatile unsigned long *) 0xE004C048))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
268#define CAN3TDB2        (*((volatile unsigned long *) 0xE004C04C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
269#define CAN3TFI3        (*((volatile unsigned long *) 0xE004C050))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
270#define CAN3TID3        (*((volatile unsigned long *) 0xE004C054))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
271#define CAN3TDA3        (*((volatile unsigned long *) 0xE004C058))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
272#define CAN3TDB3        (*((volatile unsigned long *) 0xE004C05C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
273
274#define CAN4MOD         (*((volatile unsigned long *) 0xE0050000))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
275#define CAN4CMR         (*((volatile unsigned long *) 0xE0050004))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
276#define CAN4GSR         (*((volatile unsigned long *) 0xE0050008))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
277#define CAN4ICR         (*((volatile unsigned long *) 0xE005000C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
278#define CAN4IER         (*((volatile unsigned long *) 0xE0050010))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
279#define CAN4BTR         (*((volatile unsigned long *) 0xE0050014))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
280#define CAN4EWL         (*((volatile unsigned long *) 0xE005001C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
281#define CAN4SR          (*((volatile unsigned long *) 0xE0050020))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
282#define CAN4RFS         (*((volatile unsigned long *) 0xE0050024))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
283#define CAN4RDA         (*((volatile unsigned long *) 0xE0050028))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
284#define CAN4RDB         (*((volatile unsigned long *) 0xE005002C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
285#define CAN4TFI1        (*((volatile unsigned long *) 0xE0050030))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
286#define CAN4TID1        (*((volatile unsigned long *) 0xE0050034))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
287#define CAN4TDA1        (*((volatile unsigned long *) 0xE0050038))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
288#define CAN4TDB1        (*((volatile unsigned long *) 0xE005003C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
289#define CAN4TFI2        (*((volatile unsigned long *) 0xE0050040))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
290#define CAN4TID2        (*((volatile unsigned long *) 0xE0050044))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
291#define CAN4TDA2        (*((volatile unsigned long *) 0xE0050048))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
292#define CAN4TDB2        (*((volatile unsigned long *) 0xE005004C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
293#define CAN4TFI3        (*((volatile unsigned long *) 0xE0050050))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
294#define CAN4TID3        (*((volatile unsigned long *) 0xE0050054))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
295#define CAN4TDA3        (*((volatile unsigned long *) 0xE0050058))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
296#define CAN4TDB3        (*((volatile unsigned long *) 0xE005005C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
297
298#define CAN5MOD         (*((volatile unsigned long *) 0xE0054000))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
299#define CAN5CMR         (*((volatile unsigned long *) 0xE0054004))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
300#define CAN5GSR         (*((volatile unsigned long *) 0xE0054008))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
301#define CAN5ICR         (*((volatile unsigned long *) 0xE005400C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
302#define CAN5IER         (*((volatile unsigned long *) 0xE0054010))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
303#define CAN5BTR         (*((volatile unsigned long *) 0xE0054014))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
304#define CAN5EWL         (*((volatile unsigned long *) 0xE005401C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
305#define CAN5SR          (*((volatile unsigned long *) 0xE0054020))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
306#define CAN5RFS         (*((volatile unsigned long *) 0xE0054024))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
307#define CAN5RDA         (*((volatile unsigned long *) 0xE0054028))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
308#define CAN5RDB         (*((volatile unsigned long *) 0xE005402C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
309#define CAN5TFI1        (*((volatile unsigned long *) 0xE0054030))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
310#define CAN5TID1        (*((volatile unsigned long *) 0xE0054034))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
311#define CAN5TDA1        (*((volatile unsigned long *) 0xE0054038))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
312#define CAN5TDB1        (*((volatile unsigned long *) 0xE005403C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
313#define CAN5TFI2        (*((volatile unsigned long *) 0xE0054040))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
314#define CAN5TID2        (*((volatile unsigned long *) 0xE0054044))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
315#define CAN5TDA2        (*((volatile unsigned long *) 0xE0054048))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
316#define CAN5TDB2        (*((volatile unsigned long *) 0xE005404C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
317#define CAN5TFI3        (*((volatile unsigned long *) 0xE0054050))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
318#define CAN5TID3        (*((volatile unsigned long *) 0xE0054054))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
319#define CAN5TDA3        (*((volatile unsigned long *) 0xE0054058))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
320#define CAN5TDB3        (*((volatile unsigned long *) 0xE005405C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
321
322#ifdef CONFIG_ARCH_LPC22xx
323#define CAN6MOD         (*((volatile unsigned long *) 0xE0058000))      /* lpc2292\lpc2294 only */
324#define CAN6CMR         (*((volatile unsigned long *) 0xE0058004))      /* lpc2292\lpc2294 only */
325#define CAN6GSR         (*((volatile unsigned long *) 0xE0058008))      /* lpc2292\lpc2294 only */
326#define CAN6ICR         (*((volatile unsigned long *) 0xE005800C))      /* lpc2292\lpc2294 only */
327#define CAN6IER         (*((volatile unsigned long *) 0xE0058010))      /* lpc2292\lpc2294 only */
328#define CAN6BTR         (*((volatile unsigned long *) 0xE0058014))      /* lpc2292\lpc2294 only */
329#define CAN6EWL         (*((volatile unsigned long *) 0xE005801C))      /* lpc2292\lpc2294 only */
330#define CAN6SR          (*((volatile unsigned long *) 0xE0058020))      /* lpc2292\lpc2294 only */
331#define CAN6RFS         (*((volatile unsigned long *) 0xE0058024))      /* lpc2292\lpc2294 only */
332#define CAN6RDA         (*((volatile unsigned long *) 0xE0058028))      /* lpc2292\lpc2294 only */
333#define CAN6RDB         (*((volatile unsigned long *) 0xE005802C))      /* lpc2292\lpc2294 only */
334#define CAN6TFI1        (*((volatile unsigned long *) 0xE0058030))      /* lpc2292\lpc2294 only */
335#define CAN6TID1        (*((volatile unsigned long *) 0xE0058034))      /* lpc2292\lpc2294 only */
336#define CAN6TDA1        (*((volatile unsigned long *) 0xE0058038))      /* lpc2292\lpc2294 only */
337#define CAN6TDB1        (*((volatile unsigned long *) 0xE005803C))      /* lpc2292\lpc2294 only */
338#define CAN6TFI2        (*((volatile unsigned long *) 0xE0058040))      /* lpc2292\lpc2294 only */
339#define CAN6TID2        (*((volatile unsigned long *) 0xE0058044))      /* lpc2292\lpc2294 only */
340#define CAN6TDA2        (*((volatile unsigned long *) 0xE0058048))      /* lpc2292\lpc2294 only */
341#define CAN6TDB2        (*((volatile unsigned long *) 0xE005804C))      /* lpc2292\lpc2294 only */
342#define CAN6TFI3        (*((volatile unsigned long *) 0xE0058050))      /* lpc2292\lpc2294 only */
343#define CAN6TID3        (*((volatile unsigned long *) 0xE0058054))      /* lpc2292\lpc2294 only */
344#define CAN6TDA3        (*((volatile unsigned long *) 0xE0058058))      /* lpc2292\lpc2294 only */
345#define CAN6TDB3        (*((volatile unsigned long *) 0xE005805C))      /* lpc2292\lpc2294 only */
346#endif
347
348#define CANTxSR         (*((volatile unsigned long *) 0xE0040000))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
349#define CANRxSR         (*((volatile unsigned long *) 0xE0040004))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
350#define CANMSR          (*((volatile unsigned long *) 0xE0040008))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
351
352#define CANAFMR         (*((volatile unsigned long *) 0xE003C000))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
353#define CANSFF_sa       (*((volatile unsigned long *) 0xE003C004))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
354#define CANSFF_GRP_sa   (*((volatile unsigned long *) 0xE003C008))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
355#define CANEFF_sa       (*((volatile unsigned long *) 0xE003C00C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
356#define CANEFF_GRP_sa   (*((volatile unsigned long *) 0xE003C010))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
357#define CANENDofTable   (*((volatile unsigned long *) 0xE003C014))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
358#define CANLUTerrAd     (*((volatile unsigned long *) 0xE003C018))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
359#define CANLUTerr       (*((volatile unsigned long *) 0xE003C01C))      /* lpc2119\lpc2129\lpc2292\lpc2294 only */
360/* CAN Acceptance Filter RAM */
361#define CANAFRAM        (*((volatile unsigned long *) 0xE0038000))
362
363
364/* Timer 0 */
365#define T0IR            (*((volatile unsigned long *) 0xE0004000))
366#define T0TCR           (*((volatile unsigned long *) 0xE0004004))
367#define T0TC            (*((volatile unsigned long *) 0xE0004008))
368#define T0PR            (*((volatile unsigned long *) 0xE000400C))
369#define T0PC            (*((volatile unsigned long *) 0xE0004010))
370#define T0MCR           (*((volatile unsigned long *) 0xE0004014))
371#define T0MR0           (*((volatile unsigned long *) 0xE0004018))
372#define T0MR1           (*((volatile unsigned long *) 0xE000401C))
373#define T0MR2           (*((volatile unsigned long *) 0xE0004020))
374#define T0MR3           (*((volatile unsigned long *) 0xE0004024))
375#define T0CCR           (*((volatile unsigned long *) 0xE0004028))
376#define T0CR0           (*((volatile unsigned long *) 0xE000402C))
377#define T0CR1           (*((volatile unsigned long *) 0xE0004030))
378#define T0CR2           (*((volatile unsigned long *) 0xE0004034))
379#define T0CR3           (*((volatile unsigned long *) 0xE0004038))
380#define T0EMR           (*((volatile unsigned long *) 0xE000403C))
381
382/* Timer 1 */
383#define T1IR            (*((volatile unsigned long *) 0xE0008000))
384#define T1TCR           (*((volatile unsigned long *) 0xE0008004))
385#define T1TC            (*((volatile unsigned long *) 0xE0008008))
386#define T1PR            (*((volatile unsigned long *) 0xE000800C))
387#define T1PC            (*((volatile unsigned long *) 0xE0008010))
388#define T1MCR           (*((volatile unsigned long *) 0xE0008014))
389#define T1MR0           (*((volatile unsigned long *) 0xE0008018))
390#define T1MR1           (*((volatile unsigned long *) 0xE000801C))
391#define T1MR2           (*((volatile unsigned long *) 0xE0008020))
392#define T1MR3           (*((volatile unsigned long *) 0xE0008024))
393#define T1CCR           (*((volatile unsigned long *) 0xE0008028))
394#define T1CR0           (*((volatile unsigned long *) 0xE000802C))
395#define T1CR1           (*((volatile unsigned long *) 0xE0008030))
396#define T1CR2           (*((volatile unsigned long *) 0xE0008034))
397#define T1CR3           (*((volatile unsigned long *) 0xE0008038))
398#define T1EMR           (*((volatile unsigned long *) 0xE000803C))
399
400/* Pulse Width Modulator (PWM) */
401#define PWMIR           (*((volatile unsigned long *) 0xE0014000))
402#define PWMTCR          (*((volatile unsigned long *) 0xE0014004))
403#define PWMTC           (*((volatile unsigned long *) 0xE0014008))
404#define PWMPR           (*((volatile unsigned long *) 0xE001400C))
405#define PWMPC           (*((volatile unsigned long *) 0xE0014010))
406#define PWMMCR          (*((volatile unsigned long *) 0xE0014014))
407#define PWMMR0          (*((volatile unsigned long *) 0xE0014018))
408#define PWMMR1          (*((volatile unsigned long *) 0xE001401C))
409#define PWMMR2          (*((volatile unsigned long *) 0xE0014020))
410#define PWMMR3          (*((volatile unsigned long *) 0xE0014024))
411#define PWMMR4          (*((volatile unsigned long *) 0xE0014040))
412#define PWMMR5          (*((volatile unsigned long *) 0xE0014044))
413#define PWMMR6          (*((volatile unsigned long *) 0xE0014048))
414#define PWMPCR          (*((volatile unsigned long *) 0xE001404C))
415#define PWMLER          (*((volatile unsigned long *) 0xE0014050))
416
417/* A/D CONVERTER */
418#ifndef CONFIG_ARCH_LPC2104
419#define ADCR            (*((volatile unsigned long *) 0xE0034000))      /* no in lpc210x*/
420#define ADDR            (*((volatile unsigned long *) 0xE0034004))      /* no in lpc210x*/
421#endif
422
423/* Real Time Clock */
424#define ILR             (*((volatile unsigned char *) 0xE0024000))
425#define CTC             (*((volatile unsigned short*) 0xE0024004))
426#define CCR             (*((volatile unsigned char *) 0xE0024008))
427#define CIIR            (*((volatile unsigned char *) 0xE002400C))
428#define AMR             (*((volatile unsigned char *) 0xE0024010))
429#define CTIME0          (*((volatile unsigned long *) 0xE0024014))
430#define CTIME1          (*((volatile unsigned long *) 0xE0024018))
431#define CTIME2          (*((volatile unsigned long *) 0xE002401C))
432#define SEC             (*((volatile unsigned char *) 0xE0024020))
433#define MIN             (*((volatile unsigned char *) 0xE0024024))
434#define HOUR            (*((volatile unsigned char *) 0xE0024028))
435#define DOM             (*((volatile unsigned char *) 0xE002402C))
436#define DOW             (*((volatile unsigned char *) 0xE0024030))
437#define DOY             (*((volatile unsigned short*) 0xE0024034))
438#define MONTH           (*((volatile unsigned char *) 0xE0024038))
439#define YEAR            (*((volatile unsigned short*) 0xE002403C))
440#define ALSEC           (*((volatile unsigned char *) 0xE0024060))
441#define ALMIN           (*((volatile unsigned char *) 0xE0024064))
442#define ALHOUR          (*((volatile unsigned char *) 0xE0024068))
443#define ALDOM           (*((volatile unsigned char *) 0xE002406C))
444#define ALDOW           (*((volatile unsigned char *) 0xE0024070))
445#define ALDOY           (*((volatile unsigned short*) 0xE0024074))
446#define ALMON           (*((volatile unsigned char *) 0xE0024078))
447#define ALYEAR          (*((volatile unsigned short*) 0xE002407C))
448#define PREINT          (*((volatile unsigned short*) 0xE0024080))
449#define PREFRAC         (*((volatile unsigned short*) 0xE0024084))
450
451/* Watchdog */
452#define WDMOD           (*((volatile unsigned char *) 0xE0000000))
453#define WDTC            (*((volatile unsigned long *) 0xE0000004))
454#define WDFEED          (*((volatile unsigned char *) 0xE0000008))
455#define WDTV            (*((volatile unsigned long *) 0xE000000C))
456
457/*
458        Register define for constant
459*/     
460#define REG_U0RBR                               0xE000C000
461#define REG_U1RBR                               0xE0010000
462
463/* PLL */
464#define REG_PLLCON                              0xE01FC080
465#define REG_PLLCFG                              0xE01FC084
466#define REG_PLLSTAT                             0xE01FC088
467#define REG_PLLFEED                             0xE01FC08C
468
469/* Power Control */
470
471#define REG_PCON                                0xE01FC0C0
472#define REG_PCOMP                               0xE01FC0C4
473#define REG_PINSEL0                             0xE002C000
474#define REG_MEMMAP                              0xE01FC040
475#define REG_PLLSTAT                             0xE01FC088
476#define REG_VPBDIV                              0xE01FC100
477
478
479#endif /* __LPC22XX_H__ */
Note: See TracBrowser for help on using the repository browser.