1 /**********************************************************************
2 * $Id: LPC177x_8x.h 7485 2011-06-03 07:57:16Z sgg06786 $ LPC177x_8x.h 2011-06-02
5 * @brief Cortex-M3 Core Peripheral Access Layer Header File for
6 * NXP LPC177x_8x Series.
9 * @author NXP MCU SW Application Team
11 * Copyright(C) 2011, NXP Semiconductor
12 * All rights reserved.
14 ***********************************************************************
15 * Software that is described herein is for illustrative purposes only
16 * which provides customers with programming information regarding the
17 * products. This software is supplied "AS IS" without any warranties.
18 * NXP Semiconductors assumes no responsibility or liability for the
19 * use of the software, conveys no license or title under any patent,
20 * copyright, or mask work right to the product. NXP Semiconductors
21 * reserves the right to make changes in the software without
22 * notification. NXP Semiconductors also make no representation or
23 * warranty that such application will be suitable for the specified
24 * use without further testing or modification.
25 **********************************************************************/
27 #ifndef __LPC177x_8x_H__
28 #define __LPC177x_8x_H__
30 ///////////////////////////////////////////////////////////////////////////////
32 #define KVPB_CHUNK_SIZE 16
34 ///////////////////////////////////////////////////////////////////////////////
35 // ISP_RAM2FLASH_BLOCK_SIZE for 17xx CPU
36 #ifndef ISP_RAM2FLASH_BLOCK_SIZE
37 #define ISP_RAM2FLASH_BLOCK_SIZE 256
38 #endif /* ISP_RAM2FLASH_BLOCK_SIZE */
41 * ==========================================================================
42 * ---------- Interrupt Number Definition -----------------------------------
43 * ==========================================================================
48 /****** Cortex-M3 Processor Exceptions Numbers ***************************************************/
49 NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
50 MemoryManagement_IRQn = -12, /*!< 4 Cortex-M3 Memory Management Interrupt */
51 BusFault_IRQn = -11, /*!< 5 Cortex-M3 Bus Fault Interrupt */
52 UsageFault_IRQn = -10, /*!< 6 Cortex-M3 Usage Fault Interrupt */
53 SVCall_IRQn = -5, /*!< 11 Cortex-M3 SV Call Interrupt */
54 DebugMonitor_IRQn = -4, /*!< 12 Cortex-M3 Debug Monitor Interrupt */
55 PendSV_IRQn = -2, /*!< 14 Cortex-M3 Pend SV Interrupt */
56 SysTick_IRQn = -1, /*!< 15 Cortex-M3 System Tick Interrupt */
58 /****** LPC177x_8x Specific Interrupt Numbers *******************************************************/
59 WDT_IRQn = 0, /*!< Watchdog Timer Interrupt */
60 TIMER0_IRQn = 1, /*!< Timer0 Interrupt */
61 TIMER1_IRQn = 2, /*!< Timer1 Interrupt */
62 TIMER2_IRQn = 3, /*!< Timer2 Interrupt */
63 TIMER3_IRQn = 4, /*!< Timer3 Interrupt */
64 UART0_IRQn = 5, /*!< UART0 Interrupt */
65 UART1_IRQn = 6, /*!< UART1 Interrupt */
66 UART2_IRQn = 7, /*!< UART2 Interrupt */
67 UART3_IRQn = 8, /*!< UART3 Interrupt */
68 PWM1_IRQn = 9, /*!< PWM1 Interrupt */
69 I2C0_IRQn = 10, /*!< I2C0 Interrupt */
70 I2C1_IRQn = 11, /*!< I2C1 Interrupt */
71 I2C2_IRQn = 12, /*!< I2C2 Interrupt */
72 Reserved0_IRQn = 13, /*!< Reserved */
73 SSP0_IRQn = 14, /*!< SSP0 Interrupt */
74 SSP1_IRQn = 15, /*!< SSP1 Interrupt */
75 PLL0_IRQn = 16, /*!< PLL0 Lock (Main PLL) Interrupt */
76 RTC_IRQn = 17, /*!< Real Time Clock Interrupt */
77 EINT0_IRQn = 18, /*!< External Interrupt 0 Interrupt */
78 EINT1_IRQn = 19, /*!< External Interrupt 1 Interrupt */
79 EINT2_IRQn = 20, /*!< External Interrupt 2 Interrupt */
80 EINT3_IRQn = 21, /*!< External Interrupt 3 Interrupt */
81 ADC_IRQn = 22, /*!< A/D Converter Interrupt */
82 BOD_IRQn = 23, /*!< Brown-Out Detect Interrupt */
83 USB_IRQn = 24, /*!< USB Interrupt */
84 CAN_IRQn = 25, /*!< CAN Interrupt */
85 DMA_IRQn = 26, /*!< General Purpose DMA Interrupt */
86 I2S_IRQn = 27, /*!< I2S Interrupt */
87 ENET_IRQn = 28, /*!< Ethernet Interrupt */
88 MCI_IRQn = 29, /*!< SD/MMC card I/F Interrupt */
89 MCPWM_IRQn = 30, /*!< Motor Control PWM Interrupt */
90 QEI_IRQn = 31, /*!< Quadrature Encoder Interface Interrupt */
91 PLL1_IRQn = 32, /*!< PLL1 Lock (USB PLL) Interrupt */
92 USBActivity_IRQn = 33, /*!< USB Activity interrupt */
93 CANActivity_IRQn = 34, /*!< CAN Activity interrupt */
94 UART4_IRQn = 35, /*!< UART4 Interrupt */
95 SSP2_IRQn = 36, /*!< SSP2 Interrupt */
96 LCD_IRQn = 37, /*!< LCD Interrupt */
97 GPIO_IRQn = 38, /*!< GPIO Interrupt */
98 PWM0_IRQn = 39, /*!< PWM0 Interrupt */
99 EEPROM_IRQn = 40, /*!< EEPROM Interrupt */
104 * ==========================================================================
105 * ----------- Processor and Core Peripheral Section ------------------------
106 * ==========================================================================
109 /* Configuration of the Cortex-M3 Processor and Core Peripherals */
110 #define __MPU_PRESENT 1 /*!< MPU present or not */
111 #define __NVIC_PRIO_BITS 5 /*!< Number of Bits used for Priority Levels */
112 #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
115 #include "core_cm3.h" /* Cortex-M3 processor and core peripherals */
116 //#include "system_LPC177x_8x.h" /* System Header */
119 /******************************************************************************/
120 /* Device Specific Peripheral registers structures */
121 /******************************************************************************/
123 #if defined ( __CC_ARM )
127 /*------------- System Control (SC) ------------------------------------------*/
130 __IO uint32_t FLASHCFG; /*!< Offset: 0x000 (R/W) Flash Accelerator Configuration Register */
131 uint32_t RESERVED0[31];
132 __IO uint32_t PLL0CON; /*!< Offset: 0x080 (R/W) PLL0 Control Register */
133 __IO uint32_t PLL0CFG; /*!< Offset: 0x084 (R/W) PLL0 Configuration Register */
134 __I uint32_t PLL0STAT; /*!< Offset: 0x088 (R/ ) PLL0 Status Register */
135 __O uint32_t PLL0FEED; /*!< Offset: 0x08C ( /W) PLL0 Feed Register */
136 uint32_t RESERVED1[4];
137 __IO uint32_t PLL1CON; /*!< Offset: 0x0A0 (R/W) PLL1 Control Register */
138 __IO uint32_t PLL1CFG; /*!< Offset: 0x0A4 (R/W) PLL1 Configuration Register */
139 __I uint32_t PLL1STAT; /*!< Offset: 0x0A8 (R/ ) PLL1 Status Register */
140 __O uint32_t PLL1FEED; /*!< Offset: 0x0AC ( /W) PLL1 Feed Register */
141 uint32_t RESERVED2[4];
142 __IO uint32_t PCON; /*!< Offset: 0x0C0 (R/W) Power Control Register */
143 __IO uint32_t PCONP; /*!< Offset: 0x0C4 (R/W) Power Control for Peripherals Register */
144 uint32_t RESERVED3[14];
145 __IO uint32_t EMCCLKSEL; /*!< Offset: 0x100 (R/W) External Memory Controller Clock Selection Register */
146 __IO uint32_t CCLKSEL; /*!< Offset: 0x104 (R/W) CPU Clock Selection Register */
147 __IO uint32_t USBCLKSEL; /*!< Offset: 0x108 (R/W) USB Clock Selection Register */
148 __IO uint32_t CLKSRCSEL; /*!< Offset: 0x10C (R/W) Clock Source Select Register */
149 __IO uint32_t CANSLEEPCLR; /*!< Offset: 0x110 (R/W) CAN Sleep Clear Register */
150 __IO uint32_t CANWAKEFLAGS; /*!< Offset: 0x114 (R/W) CAN Wake-up Flags Register */
151 uint32_t RESERVED4[10];
152 __IO uint32_t EXTINT; /*!< Offset: 0x140 (R/W) External Interrupt Flag Register */
153 uint32_t RESERVED5[1];
154 __IO uint32_t EXTMODE; /*!< Offset: 0x148 (R/W) External Interrupt Mode Register */
155 __IO uint32_t EXTPOLAR; /*!< Offset: 0x14C (R/W) External Interrupt Polarity Register */
156 uint32_t RESERVED6[12];
157 __IO uint32_t RSID; /*!< Offset: 0x180 (R/W) Reset Source Identification Register */
158 uint32_t RESERVED7[7];
159 __IO uint32_t SCS; /*!< Offset: 0x1A0 (R/W) System Controls and Status Register */
160 __IO uint32_t IRCTRIM; /*!< Offset: 0x1A4 (R/W) Clock Dividers */
161 __IO uint32_t PCLKSEL; /*!< Offset: 0x1A8 (R/W) Peripheral Clock Selection Register */
162 uint32_t RESERVED8[3];
163 __IO uint32_t LCD_CFG; /*!< Offset: 0x1B8 (R/W) LCD Configuration and clocking control Register */
164 uint32_t RESERVED9[1];
165 __IO uint32_t USBIntSt; /*!< Offset: 0x1C0 (R/W) USB Interrupt Status Register */
166 __IO uint32_t DMAREQSEL; /*!< Offset: 0x1C4 (R/W) DMA Request Select Register */
167 __IO uint32_t CLKOUTCFG; /*!< Offset: 0x1C8 (R/W) Clock Output Configuration Register */
168 __IO uint32_t RSTCON0; /*!< Offset: 0x1CC (R/W) RESET Control0 Register */
169 __IO uint32_t RSTCON1; /*!< Offset: 0x1D0 (R/W) RESET Control1 Register */
170 uint32_t RESERVED10[2];
171 __IO uint32_t EMCDLYCTL; /*!< Offset: 0x1DC (R/W) SDRAM programmable delays */
172 __IO uint32_t EMCCAL; /*!< Offset: 0x1E0 (R/W) Calibration of programmable delays */
175 /*------------- Pin Connect Block (PINCON) -----------------------------------*/
178 __IO uint32_t P0_0; /* 0x000 */
187 __IO uint32_t P0_8; /* 0x020 */
196 __IO uint32_t P0_16; /* 0x040 */
205 __IO uint32_t P0_24; /* 0x060 */
214 __IO uint32_t P1_0; /* 0x080 */
223 __IO uint32_t P1_8; /* 0x0A0 */
232 __IO uint32_t P1_16; /* 0x0C0 */
241 __IO uint32_t P1_24; /* 0x0E0 */
250 __IO uint32_t P2_0; /* 0x100 */
259 __IO uint32_t P2_8; /* 0x120 */
268 __IO uint32_t P2_16; /* 0x140 */
277 __IO uint32_t P2_24; /* 0x160 */
286 __IO uint32_t P3_0; /* 0x180 */
295 __IO uint32_t P3_8; /* 0x1A0 */
304 __IO uint32_t P3_16; /* 0x1C0 */
313 __IO uint32_t P3_24; /* 0x1E0 */
322 __IO uint32_t P4_0; /* 0x200 */
331 __IO uint32_t P4_8; /* 0x220 */
340 __IO uint32_t P4_16; /* 0x240 */
349 __IO uint32_t P4_24; /* 0x260 */
358 __IO uint32_t P5_0; /* 0x280 */
362 __IO uint32_t P5_4; /* 0x290 */
365 /*------------- General Purpose Input/Output (GPIO) --------------------------*/
369 uint32_t RESERVED0[3];
378 __I uint32_t IntStatus;
379 __I uint32_t IO0IntStatR;
380 __I uint32_t IO0IntStatF;
381 __O uint32_t IO0IntClr;
382 __IO uint32_t IO0IntEnR;
383 __IO uint32_t IO0IntEnF;
384 uint32_t RESERVED0[3];
385 __I uint32_t IO2IntStatR;
386 __I uint32_t IO2IntStatF;
387 __O uint32_t IO2IntClr;
388 __IO uint32_t IO2IntEnR;
389 __IO uint32_t IO2IntEnF;
390 } LPC_GPIOINT_TypeDef;
392 /*------------- Timer (TIM) --------------------------------------------------*/
395 __IO uint32_t IR; /*!< Offset: 0x000 Interrupt Register (R/W) */
396 __IO uint32_t TCR; /*!< Offset: 0x004 Timer Control Register (R/W) */
397 __IO uint32_t TC; /*!< Offset: 0x008 Timer Counter Register (R/W) */
398 __IO uint32_t PR; /*!< Offset: 0x00C Prescale Register (R/W) */
399 __IO uint32_t PC; /*!< Offset: 0x010 Prescale Counter Register (R/W) */
400 __IO uint32_t MCR; /*!< Offset: 0x014 Match Control Register (R/W) */
401 __IO uint32_t MR0; /*!< Offset: 0x018 Match Register 0 (R/W) */
402 __IO uint32_t MR1; /*!< Offset: 0x01C Match Register 1 (R/W) */
403 __IO uint32_t MR2; /*!< Offset: 0x020 Match Register 2 (R/W) */
404 __IO uint32_t MR3; /*!< Offset: 0x024 Match Register 3 (R/W) */
405 __IO uint32_t CCR; /*!< Offset: 0x028 Capture Control Register (R/W) */
406 __I uint32_t CR0; /*!< Offset: 0x02C Capture Register 0 (R/ ) */
407 __I uint32_t CR1; /*!< Offset: 0x030 Capture Register 1 (R/ ) */
408 uint32_t RESERVED0[2];
409 __IO uint32_t EMR; /*!< Offset: 0x03C External Match Register (R/W) */
410 uint32_t RESERVED1[12];
411 __IO uint32_t CTCR; /*!< Offset: 0x070 Count Control Register (R/W) */
414 /*------------- Pulse-Width Modulation (PWM) ---------------------------------*/
417 __IO uint32_t IR; /*!< Offset: 0x000 Interrupt Register (R/W) */
418 __IO uint32_t TCR; /*!< Offset: 0x004 Timer Control Register (R/W) */
419 __IO uint32_t TC; /*!< Offset: 0x008 Timer Counter Register (R/W) */
420 __IO uint32_t PR; /*!< Offset: 0x00C Prescale Register (R/W) */
421 __IO uint32_t PC; /*!< Offset: 0x010 Prescale Counter Register (R/W) */
422 __IO uint32_t MCR; /*!< Offset: 0x014 Match Control Register (R/W) */
423 __IO uint32_t MR0; /*!< Offset: 0x018 Match Register 0 (R/W) */
424 __IO uint32_t MR1; /*!< Offset: 0x01C Match Register 1 (R/W) */
425 __IO uint32_t MR2; /*!< Offset: 0x020 Match Register 2 (R/W) */
426 __IO uint32_t MR3; /*!< Offset: 0x024 Match Register 3 (R/W) */
427 __IO uint32_t CCR; /*!< Offset: 0x028 Capture Control Register (R/W) */
428 __I uint32_t CR0; /*!< Offset: 0x02C Capture Register 0 (R/ ) */
429 __I uint32_t CR1; /*!< Offset: 0x030 Capture Register 1 (R/ ) */
430 __I uint32_t CR2; /*!< Offset: 0x034 Capture Register 2 (R/ ) */
431 __I uint32_t CR3; /*!< Offset: 0x038 Capture Register 3 (R/ ) */
433 __IO uint32_t MR4; /*!< Offset: 0x040 Match Register 4 (R/W) */
434 __IO uint32_t MR5; /*!< Offset: 0x044 Match Register 5 (R/W) */
435 __IO uint32_t MR6; /*!< Offset: 0x048 Match Register 6 (R/W) */
436 __IO uint32_t PCR; /*!< Offset: 0x04C PWM Control Register (R/W) */
437 __IO uint32_t LER; /*!< Offset: 0x050 Load Enable Register (R/W) */
438 uint32_t RESERVED1[7];
439 __IO uint32_t CTCR; /*!< Offset: 0x070 Counter Control Register (R/W) */
442 /*------------- Universal Asynchronous Receiver Transmitter (UARTx) -----------*/
443 /* There are three types of UARTs on the chip:
444 (1) UART0,UART2, and UART3 are the standard UART.
445 (2) UART1 is the standard with modem capability.
446 (3) USART(UART4) is the sync/async UART with smart card capability.
447 More details can be found on the Users Manual. */
467 uint8_t RESERVED1[7];
469 uint8_t RESERVED2[7];
471 uint8_t RESERVED3[3];
474 uint8_t RESERVED4[3];
476 uint8_t RESERVED5[7];
478 uint8_t RESERVED6[39];
502 uint8_t RESERVED1[7];//Reserved
504 uint8_t RESERVED2[7];//Reserved
506 uint8_t RESERVED3[3];//Reserved
509 uint8_t RESERVED4[3];//Reserved
511 uint8_t RESERVED5[7];//Reserved
513 uint8_t RESERVED8[27];//Reserved
514 __IO uint8_t RS485CTRL;
515 uint8_t RESERVED9[3];//Reserved
516 __IO uint8_t ADRMATCH;
517 uint8_t RESERVED10[3];//Reserved
518 __IO uint8_t RS485DLY;
519 uint8_t RESERVED11[3];//Reserved
542 uint8_t RESERVED1[3];
544 uint8_t RESERVED2[3];
546 uint8_t RESERVED3[3];
548 uint8_t RESERVED4[3];
550 uint8_t RESERVED5[3];
556 uint8_t RESERVED8[27];
557 __IO uint8_t RS485CTRL;
558 uint8_t RESERVED9[3];
559 __IO uint8_t ADRMATCH;
560 uint8_t RESERVED10[3];
561 __IO uint8_t RS485DLY;
562 uint8_t RESERVED11[3];
569 __I uint32_t RBR; /*!< Offset: 0x000 Receiver Buffer Register (R/ ) */
570 __O uint32_t THR; /*!< Offset: 0x000 Transmit Holding Register ( /W) */
571 __IO uint32_t DLL; /*!< Offset: 0x000 Divisor Latch LSB (R/W) */
574 __IO uint32_t DLM; /*!< Offset: 0x004 Divisor Latch MSB (R/W) */
575 __IO uint32_t IER; /*!< Offset: 0x000 Interrupt Enable Register (R/W) */
578 __I uint32_t IIR; /*!< Offset: 0x008 Interrupt ID Register (R/ ) */
579 __O uint32_t FCR; /*!< Offset: 0x008 FIFO Control Register ( /W) */
581 __IO uint32_t LCR; /*!< Offset: 0x00C Line Control Register (R/W) */
582 __IO uint32_t MCR; /*!< Offset: 0x010 Modem control Register (R/W) */
583 __I uint32_t LSR; /*!< Offset: 0x014 Line Status Register (R/ ) */
584 __I uint32_t MSR; /*!< Offset: 0x018 Modem status Register (R/ ) */
585 __IO uint32_t SCR; /*!< Offset: 0x01C Scratch Pad Register (R/W) */
586 __IO uint32_t ACR; /*!< Offset: 0x020 Auto-baud Control Register (R/W) */
587 __IO uint32_t ICR; /*!< Offset: 0x024 irDA Control Register (R/W) */
588 __IO uint32_t FDR; /*!< Offset: 0x028 Fractional Divider Register (R/W) */
589 __IO uint32_t OSR; /*!< Offset: 0x02C Over sampling Register (R/W) */
590 __O uint32_t POP; /*!< Offset: 0x030 NHP Pop Register (W) */
591 __IO uint32_t MODE; /*!< Offset: 0x034 NHP Mode selection Register (W) */
592 uint32_t RESERVED0[2];
593 __IO uint32_t HDEN; /*!< Offset: 0x040 Half duplex Enable Register (R/W) */
595 __IO uint32_t SCI_CTRL; /*!< Offset: 0x048 Smart card Interface Control Register (R/W) */
596 __IO uint32_t RS485CTRL; /*!< Offset: 0x04C RS-485/EIA-485 Control Register (R/W) */
597 __IO uint32_t ADRMATCH; /*!< Offset: 0x050 RS-485/EIA-485 address match Register (R/W) */
598 __IO uint32_t RS485DLY; /*!< Offset: 0x054 RS-485/EIA-485 direction control delay Register (R/W) */
599 __IO uint32_t SYNCCTRL; /*!< Offset: 0x058 Synchronous Mode Control Register (R/W ) */
600 __IO uint32_t TER; /*!< Offset: 0x05C Transmit Enable Register (R/W) */
601 uint32_t RESERVED2[989];
602 __I uint32_t CFG; /*!< Offset: 0xFD4 Configuration Register (R) */
603 __O uint32_t INTCE; /*!< Offset: 0xFD8 Interrupt Clear Enable Register (W) */
604 __O uint32_t INTSE; /*!< Offset: 0xFDC Interrupt Set Enable Register (W) */
605 __I uint32_t INTS; /*!< Offset: 0xFE0 Interrupt Status Register (R) */
606 __I uint32_t INTE; /*!< Offset: 0xFE4 Interrupt Enable Register (R) */
607 __O uint32_t INTCS; /*!< Offset: 0xFE8 Interrupt Clear Status Register (W) */
608 __O uint32_t INTSS; /*!< Offset: 0xFEC Interrupt Set Status Register (W) */
609 uint32_t RESERVED3[3];
610 __I uint32_t MID; /*!< Offset: 0xFFC Module Identification Register (R) */
613 /*------------- Synchronous Serial Communication (SSP) -----------------------*/
616 __IO uint32_t CR0; /*!< Offset: 0x000 Control Register 0 (R/W) */
617 __IO uint32_t CR1; /*!< Offset: 0x004 Control Register 1 (R/W) */
618 __IO uint32_t DR; /*!< Offset: 0x008 Data Register (R/W) */
619 __I uint32_t SR; /*!< Offset: 0x00C Status Registe (R/ ) */
620 __IO uint32_t CPSR; /*!< Offset: 0x010 Clock Prescale Register (R/W) */
621 __IO uint32_t IMSC; /*!< Offset: 0x014 Interrupt Mask Set and Clear Register (R/W) */
622 __IO uint32_t RIS; /*!< Offset: 0x018 Raw Interrupt Status Register (R/W) */
623 __IO uint32_t MIS; /*!< Offset: 0x01C Masked Interrupt Status Register (R/W) */
624 __IO uint32_t ICR; /*!< Offset: 0x020 SSPICR Interrupt Clear Register (R/W) */
628 /*------------- Inter-Integrated Circuit (I2C) -------------------------------*/
631 __IO uint32_t CONSET; /*!< Offset: 0x000 I2C Control Set Register (R/W) */
632 __I uint32_t STAT; /*!< Offset: 0x004 I2C Status Register (R/ ) */
633 __IO uint32_t DAT; /*!< Offset: 0x008 I2C Data Register (R/W) */
634 __IO uint32_t ADR0; /*!< Offset: 0x00C I2C Slave Address Register 0 (R/W) */
635 __IO uint32_t SCLH; /*!< Offset: 0x010 SCH Duty Cycle Register High Half Word (R/W) */
636 __IO uint32_t SCLL; /*!< Offset: 0x014 SCL Duty Cycle Register Low Half Word (R/W) */
637 __O uint32_t CONCLR; /*!< Offset: 0x018 I2C Control Clear Register ( /W) */
638 __IO uint32_t MMCTRL; /*!< Offset: 0x01C Monitor mode control register (R/W) */
639 __IO uint32_t ADR1; /*!< Offset: 0x020 I2C Slave Address Register 1 (R/W) */
640 __IO uint32_t ADR2; /*!< Offset: 0x024 I2C Slave Address Register 2 (R/W) */
641 __IO uint32_t ADR3; /*!< Offset: 0x028 I2C Slave Address Register 3 (R/W) */
642 __I uint32_t DATA_BUFFER; /*!< Offset: 0x02C Data buffer register ( /W) */
643 __IO uint32_t MASK0; /*!< Offset: 0x030 I2C Slave address mask register 0 (R/W) */
644 __IO uint32_t MASK1; /*!< Offset: 0x034 I2C Slave address mask register 1 (R/W) */
645 __IO uint32_t MASK2; /*!< Offset: 0x038 I2C Slave address mask register 2 (R/W) */
646 __IO uint32_t MASK3; /*!< Offset: 0x03C I2C Slave address mask register 3 (R/W) */
649 /*------------- Inter IC Sound (I2S) -----------------------------------------*/
660 __IO uint32_t TXRATE;
661 __IO uint32_t RXRATE;
662 __IO uint32_t TXBITRATE;
663 __IO uint32_t RXBITRATE;
664 __IO uint32_t TXMODE;
665 __IO uint32_t RXMODE;
668 /*------------- Real-Time Clock (RTC) ----------------------------------------*/
672 uint8_t RESERVED0[7];
674 uint8_t RESERVED1[3];
676 uint8_t RESERVED2[3];
678 uint8_t RESERVED3[3];
683 uint8_t RESERVED4[3];
685 uint8_t RESERVED5[3];
687 uint8_t RESERVED6[3];
689 uint8_t RESERVED7[3];
691 uint8_t RESERVED8[3];
695 uint8_t RESERVED10[3];
698 __IO uint32_t CALIBRATION;
699 __IO uint32_t GPREG0;
700 __IO uint32_t GPREG1;
701 __IO uint32_t GPREG2;
702 __IO uint32_t GPREG3;
703 __IO uint32_t GPREG4;
704 __IO uint8_t RTC_AUXEN;
705 uint8_t RESERVED12[3];
706 __IO uint8_t RTC_AUX;
707 uint8_t RESERVED13[3];
709 uint8_t RESERVED14[3];
711 uint8_t RESERVED15[3];
713 uint8_t RESERVED16[3];
715 uint8_t RESERVED17[3];
717 uint8_t RESERVED18[3];
721 uint8_t RESERVED20[3];
722 __IO uint16_t ALYEAR;
724 __IO uint32_t ERSTATUS;
725 __IO uint32_t ERCONTROL;
726 __IO uint32_t ERCOUNTERS;
728 __IO uint32_t ERFIRSTSTAMP0;
729 __IO uint32_t ERFIRSTSTAMP1;
730 __IO uint32_t ERFIRSTSTAMP2;
732 __IO uint32_t ERLASTSTAMP0;
733 __IO uint32_t ERLASTSTAMP1;
734 __IO uint32_t ERLASTSTAMP2;
737 /*------------- Watchdog Timer (WDT) -----------------------------------------*/
741 uint8_t RESERVED0[3];
744 uint8_t RESERVED1[3];
747 __IO uint32_t WARNINT;
748 __IO uint32_t WINDOW;
751 /*------------- Analog-to-Digital Converter (ADC) ----------------------------*/
754 __IO uint32_t CR; /*!< Offset: 0x000 A/D Control Register (R/W) */
755 __IO uint32_t GDR; /*!< Offset: 0x004 A/D Global Data Register (R/W) */
757 __IO uint32_t INTEN; /*!< Offset: 0x00C A/D Interrupt Enable Register (R/W) */
758 __IO uint32_t DR[8]; /*!< Offset: 0x010-0x02C A/D Channel 0..7 Data Register (R/W) */
759 __I uint32_t STAT; /*!< Offset: 0x030 A/D Status Register (R/ ) */
763 /*------------- Digital-to-Analog Converter (DAC) ----------------------------*/
768 __IO uint32_t CNTVAL;
771 /*------------- Motor Control Pulse-Width Modulation (MCPWM) -----------------*/
775 __O uint32_t CON_SET;
776 __O uint32_t CON_CLR;
778 __O uint32_t CAPCON_SET;
779 __O uint32_t CAPCON_CLR;
795 __O uint32_t INTEN_SET;
796 __O uint32_t INTEN_CLR;
798 __O uint32_t CNTCON_SET;
799 __O uint32_t CNTCON_CLR;
801 __O uint32_t INTF_SET;
802 __O uint32_t INTF_CLR;
803 __O uint32_t CAP_CLR;
806 /*------------- Quadrature Encoder Interface (QEI) ---------------------------*/
813 __IO uint32_t MAXPOS;
814 __IO uint32_t CMPOS0;
815 __IO uint32_t CMPOS1;
816 __IO uint32_t CMPOS2;
818 __IO uint32_t INXCMP0;
823 __IO uint32_t VELCOMP;
824 __IO uint32_t FILTERPHA;
825 __IO uint32_t FILTERPHB;
826 __IO uint32_t FILTERINX;
827 __IO uint32_t WINDOW;
828 __IO uint32_t INXCMP1;
829 __IO uint32_t INXCMP2;
830 uint32_t RESERVED0[993];
833 __I uint32_t INTSTAT;
839 /*------------- SD/MMC card Interface (MCI)-----------------------------------*/
844 __IO uint32_t ARGUMENT;
845 __IO uint32_t COMMAND;
846 __I uint32_t RESP_CMD;
851 __IO uint32_t DATATMR;
852 __IO uint32_t DATALEN;
853 __IO uint32_t DATACTRL;
854 __I uint32_t DATACNT;
858 uint32_t RESERVED0[2];
859 __I uint32_t FIFOCNT;
860 uint32_t RESERVED1[13];
864 /*------------- Controller Area Network (CAN) --------------------------------*/
867 __IO uint32_t mask[512]; /* ID Masks */
868 } LPC_CANAF_RAM_TypeDef;
870 typedef struct /* Acceptance Filter Registers */
872 ///Offset: 0x00000000 - Acceptance Filter Register
875 ///Offset: 0x00000004 - Standard Frame Individual Start Address Register
876 __IO uint32_t SFF_sa;
878 ///Offset: 0x00000008 - Standard Frame Group Start Address Register
879 __IO uint32_t SFF_GRP_sa;
881 ///Offset: 0x0000000C - Extended Frame Start Address Register
882 __IO uint32_t EFF_sa;
884 ///Offset: 0x00000010 - Extended Frame Group Start Address Register
885 __IO uint32_t EFF_GRP_sa;
887 ///Offset: 0x00000014 - End of AF Tables register
888 __IO uint32_t ENDofTable;
890 ///Offset: 0x00000018 - LUT Error Address register
891 __I uint32_t LUTerrAd;
893 ///Offset: 0x0000001C - LUT Error Register
896 ///Offset: 0x00000020 - CAN Central Transmit Status Register
897 __IO uint32_t FCANIE;
899 ///Offset: 0x00000024 - FullCAN Interrupt and Capture registers 0
900 __IO uint32_t FCANIC0;
902 ///Offset: 0x00000028 - FullCAN Interrupt and Capture registers 1
903 __IO uint32_t FCANIC1;
906 typedef struct /* Central Registers */
913 typedef struct /* Controller Registers */
915 ///Offset: 0x00000000 - Controls the operating mode of the CAN Controller
918 ///Offset: 0x00000004 - Command bits that affect the state
921 ///Offset: 0x00000008 - Global Controller Status and Error Counters
924 ///Offset: 0x0000000C - Interrupt status, Arbitration Lost Capture, Error Code Capture
927 ///Offset: 0x00000010 - Interrupt Enable Register
930 ///Offset: 0x00000014 - Bus Timing Register
933 ///Offset: 0x00000018 - Error Warning Limit
936 ///Offset: 0x0000001C - Status Register
939 ///Offset: 0x00000020 - Receive frame status
942 ///Offset: 0x00000024 - Received Identifier
945 ///Offset: 0x00000028 - Received data bytes 1-4
948 ///Offset: 0x0000002C - Received data bytes 5-8
951 ///Offset: 0x00000030 - Transmit frame info (Tx Buffer 1)
954 ///Offset: 0x00000034 - Transmit Identifier (Tx Buffer 1)
957 ///Offset: 0x00000038 - Transmit data bytes 1-4 (Tx Buffer 1)
960 ///Offset: 0x0000003C - Transmit data bytes 5-8 (Tx Buffer 1)
963 ///Offset: 0x00000040 - Transmit frame info (Tx Buffer 2)
966 ///Offset: 0x00000044 - Transmit Identifier (Tx Buffer 2)
969 ///Offset: 0x00000048 - Transmit data bytes 1-4 (Tx Buffer 2)
972 ///Offset: 0x0000004C - Transmit data bytes 5-8 (Tx Buffer 2)
975 ///Offset: 0x00000050 - Transmit frame info (Tx Buffer 3)
978 ///Offset: 0x00000054 - Transmit Identifier (Tx Buffer 3)
981 ///Offset: 0x00000058 - Transmit data bytes 1-4 (Tx Buffer 3)
984 ///Offset: 0x0000005C - Transmit data bytes 5-8 (Tx Buffer 3)
988 /*------------- General Purpose Direct Memory Access (GPDMA) -----------------*/
989 typedef struct /* Common Registers */
991 __I uint32_t IntStat;
992 __I uint32_t IntTCStat;
993 __O uint32_t IntTCClear;
994 __I uint32_t IntErrStat;
995 __O uint32_t IntErrClr;
996 __I uint32_t RawIntTCStat;
997 __I uint32_t RawIntErrStat;
998 __I uint32_t EnbldChns;
999 __IO uint32_t SoftBReq;
1000 __IO uint32_t SoftSReq;
1001 __IO uint32_t SoftLBReq;
1002 __IO uint32_t SoftLSReq;
1003 __IO uint32_t Config;
1005 } LPC_GPDMA_TypeDef;
1007 typedef struct /* Channel Registers */
1009 __IO uint32_t CSrcAddr;
1010 __IO uint32_t CDestAddr;
1012 __IO uint32_t CControl;
1013 __IO uint32_t CConfig;
1014 } LPC_GPDMACH_TypeDef;
1016 /*------------- Universal Serial Bus (USB) -----------------------------------*/
1019 __I uint32_t Revision; /* USB Host Registers */
1020 __IO uint32_t Control;
1021 __IO uint32_t CommandStatus;
1022 __IO uint32_t InterruptStatus;
1023 __IO uint32_t InterruptEnable;
1024 __IO uint32_t InterruptDisable;
1026 __I uint32_t PeriodCurrentED;
1027 __IO uint32_t ControlHeadED;
1028 __IO uint32_t ControlCurrentED;
1029 __IO uint32_t BulkHeadED;
1030 __IO uint32_t BulkCurrentED;
1031 __I uint32_t DoneHead;
1032 __IO uint32_t FmInterval;
1033 __I uint32_t FmRemaining;
1034 __I uint32_t FmNumber;
1035 __IO uint32_t PeriodicStart;
1036 __IO uint32_t LSTreshold;
1037 __IO uint32_t RhDescriptorA;
1038 __IO uint32_t RhDescriptorB;
1039 __IO uint32_t RhStatus;
1040 __IO uint32_t RhPortStatus1;
1041 __IO uint32_t RhPortStatus2;
1042 uint32_t RESERVED0[40];
1043 __I uint32_t Module_ID;
1045 __I uint32_t IntSt; /* USB On-The-Go Registers */
1046 __IO uint32_t IntEn;
1047 __O uint32_t IntSet;
1048 __O uint32_t IntClr;
1049 __IO uint32_t StCtrl;
1051 uint32_t RESERVED1[58];
1053 __I uint32_t DevIntSt; /* USB Device Interrupt Registers */
1054 __IO uint32_t DevIntEn;
1055 __O uint32_t DevIntClr;
1056 __O uint32_t DevIntSet;
1058 __O uint32_t CmdCode; /* USB Device SIE Command Registers */
1059 __I uint32_t CmdData;
1061 __I uint32_t RxData; /* USB Device Transfer Registers */
1062 __O uint32_t TxData;
1063 __I uint32_t RxPLen;
1064 __O uint32_t TxPLen;
1066 __O uint32_t DevIntPri;
1068 __I uint32_t EpIntSt; /* USB Device Endpoint Interrupt Regs */
1069 __IO uint32_t EpIntEn;
1070 __O uint32_t EpIntClr;
1071 __O uint32_t EpIntSet;
1072 __O uint32_t EpIntPri;
1074 __IO uint32_t ReEp; /* USB Device Endpoint Realization Reg*/
1076 __IO uint32_t MaxPSize;
1078 __I uint32_t DMARSt; /* USB Device DMA Registers */
1079 __O uint32_t DMARClr;
1080 __O uint32_t DMARSet;
1081 uint32_t RESERVED2[9];
1082 __IO uint32_t UDCAH;
1083 __I uint32_t EpDMASt;
1084 __O uint32_t EpDMAEn;
1085 __O uint32_t EpDMADis;
1086 __I uint32_t DMAIntSt;
1087 __IO uint32_t DMAIntEn;
1088 uint32_t RESERVED3[2];
1089 __I uint32_t EoTIntSt;
1090 __O uint32_t EoTIntClr;
1091 __O uint32_t EoTIntSet;
1092 __I uint32_t NDDRIntSt;
1093 __O uint32_t NDDRIntClr;
1094 __O uint32_t NDDRIntSet;
1095 __I uint32_t SysErrIntSt;
1096 __O uint32_t SysErrIntClr;
1097 __O uint32_t SysErrIntSet;
1098 uint32_t RESERVED4[15];
1101 __I uint32_t I2C_RX; /* USB OTG I2C Registers */
1102 __O uint32_t I2C_TX;
1104 __IO uint32_t I2C_STS;
1105 __IO uint32_t I2C_CTL;
1106 __IO uint32_t I2C_CLKHI;
1107 __O uint32_t I2C_CLKLO;
1108 uint32_t RESERVED5[824];
1111 __IO uint32_t USBClkCtrl; /* USB Clock Control Registers */
1112 __IO uint32_t OTGClkCtrl;
1115 __I uint32_t USBClkSt;
1116 __I uint32_t OTGClkSt;
1120 /*------------- Ethernet Media Access Controller (EMAC) ----------------------*/
1123 __IO uint32_t MAC1; /* MAC Registers */
1137 uint32_t RESERVED0[2];
1141 uint32_t RESERVED1[45];
1142 __IO uint32_t Command; /* Control Registers */
1143 __I uint32_t Status;
1144 __IO uint32_t RxDescriptor;
1145 __IO uint32_t RxStatus;
1146 __IO uint32_t RxDescriptorNumber;
1147 __I uint32_t RxProduceIndex;
1148 __IO uint32_t RxConsumeIndex;
1149 __IO uint32_t TxDescriptor;
1150 __IO uint32_t TxStatus;
1151 __IO uint32_t TxDescriptorNumber;
1152 __IO uint32_t TxProduceIndex;
1153 __I uint32_t TxConsumeIndex;
1154 uint32_t RESERVED2[10];
1158 uint32_t RESERVED3[3];
1159 __IO uint32_t FlowControlCounter;
1160 __I uint32_t FlowControlStatus;
1161 uint32_t RESERVED4[34];
1162 __IO uint32_t RxFilterCtrl; /* Rx Filter Registers */
1163 __I uint32_t RxFilterWoLStatus;
1164 __O uint32_t RxFilterWoLClear;
1166 __IO uint32_t HashFilterL;
1167 __IO uint32_t HashFilterH;
1168 uint32_t RESERVED6[882];
1169 __I uint32_t IntStatus; /* Module Control Registers */
1170 __IO uint32_t IntEnable;
1171 __O uint32_t IntClear;
1172 __O uint32_t IntSet;
1174 __IO uint32_t PowerDown;
1176 __IO uint32_t Module_ID;
1179 /*------------- LCD controller (LCD) -----------------------------------------*/
1182 __IO uint32_t TIMH; /* LCD Registers */
1186 __IO uint32_t UPBASE;
1187 __IO uint32_t LPBASE;
1189 __IO uint32_t INTMSK;
1190 __I uint32_t INTRAW;
1191 __I uint32_t INTSTAT;
1192 __O uint32_t INTCLR;
1193 __I uint32_t UPCURR;
1194 __I uint32_t LPCURR;
1195 uint32_t RESERVED0[115];
1196 __IO uint32_t PAL[128];
1197 uint32_t RESERVED1[256];
1198 __IO uint32_t CRSR_IMG[256];
1199 __IO uint32_t CRSR_CTRL;
1200 __IO uint32_t CRSR_CFG;
1201 __IO uint32_t CRSR_PAL0;
1202 __IO uint32_t CRSR_PAL1;
1203 __IO uint32_t CRSR_XY;
1204 __IO uint32_t CRSR_CLIP;
1205 uint32_t RESERVED2[2];
1206 __IO uint32_t CRSR_INTMSK;
1207 __O uint32_t CRSR_INTCLR;
1208 __I uint32_t CRSR_INTRAW;
1209 __I uint32_t CRSR_INTSTAT;
1212 /*------------- External Memory Controller (EMC) -----------------------------*/
1215 __IO uint32_t Control;
1216 __I uint32_t Status;
1217 __IO uint32_t Config;
1218 uint32_t RESERVED0[5];
1219 __IO uint32_t DynamicControl;
1220 __IO uint32_t DynamicRefresh;
1221 __IO uint32_t DynamicReadConfig;
1222 uint32_t RESERVED1[1];
1223 __IO uint32_t DynamicRP;
1224 __IO uint32_t DynamicRAS;
1225 __IO uint32_t DynamicSREX;
1226 __IO uint32_t DynamicAPR;
1227 __IO uint32_t DynamicDAL;
1228 __IO uint32_t DynamicWR;
1229 __IO uint32_t DynamicRC;
1230 __IO uint32_t DynamicRFC;
1231 __IO uint32_t DynamicXSR;
1232 __IO uint32_t DynamicRRD;
1233 __IO uint32_t DynamicMRD;
1234 uint32_t RESERVED2[9];
1235 __IO uint32_t StaticExtendedWait;
1236 uint32_t RESERVED3[31];
1237 __IO uint32_t DynamicConfig0;
1238 __IO uint32_t DynamicRasCas0;
1239 uint32_t RESERVED4[6];
1240 __IO uint32_t DynamicConfig1;
1241 __IO uint32_t DynamicRasCas1;
1242 uint32_t RESERVED5[6];
1243 __IO uint32_t DynamicConfig2;
1244 __IO uint32_t DynamicRasCas2;
1245 uint32_t RESERVED6[6];
1246 __IO uint32_t DynamicConfig3;
1247 __IO uint32_t DynamicRasCas3;
1248 uint32_t RESERVED7[38];
1249 __IO uint32_t StaticConfig0;
1250 __IO uint32_t StaticWaitWen0;
1251 __IO uint32_t StaticWaitOen0;
1252 __IO uint32_t StaticWaitRd0;
1253 __IO uint32_t StaticWaitPage0;
1254 __IO uint32_t StaticWaitWr0;
1255 __IO uint32_t StaticWaitTurn0;
1256 uint32_t RESERVED8[1];
1257 __IO uint32_t StaticConfig1;
1258 __IO uint32_t StaticWaitWen1;
1259 __IO uint32_t StaticWaitOen1;
1260 __IO uint32_t StaticWaitRd1;
1261 __IO uint32_t StaticWaitPage1;
1262 __IO uint32_t StaticWaitWr1;
1263 __IO uint32_t StaticWaitTurn1;
1264 uint32_t RESERVED9[1];
1265 __IO uint32_t StaticConfig2;
1266 __IO uint32_t StaticWaitWen2;
1267 __IO uint32_t StaticWaitOen2;
1268 __IO uint32_t StaticWaitRd2;
1269 __IO uint32_t StaticWaitPage2;
1270 __IO uint32_t StaticWaitWr2;
1271 __IO uint32_t StaticWaitTurn2;
1272 uint32_t RESERVED10[1];
1273 __IO uint32_t StaticConfig3;
1274 __IO uint32_t StaticWaitWen3;
1275 __IO uint32_t StaticWaitOen3;
1276 __IO uint32_t StaticWaitRd3;
1277 __IO uint32_t StaticWaitPage3;
1278 __IO uint32_t StaticWaitWr3;
1279 __IO uint32_t StaticWaitTurn3;
1282 /*------------- CRC Engine (CRC) -----------------------------------------*/
1289 __O uint32_t WR_DATA_DWORD;
1290 __O uint16_t WR_DATA_WORD;
1291 uint16_t RESERVED_WORD;
1292 __O uint8_t WR_DATA_BYTE;
1293 uint8_t RESERVED_BYTE[3];
1297 /*------------- EEPROM Controller (EEPROM) -----------------------------------*/
1300 __IO uint32_t CMD; /* 0x0080 */
1302 __IO uint32_t WDATA;
1303 __IO uint32_t RDATA;
1304 __IO uint32_t WSTATE; /* 0x0090 */
1305 __IO uint32_t CLKDIV;
1306 __IO uint32_t PWRDWN; /* 0x0098 */
1307 uint32_t RESERVED0[975];
1308 __IO uint32_t INT_CLR_ENABLE; /* 0x0FD8 */
1309 __IO uint32_t INT_SET_ENABLE;
1310 __IO uint32_t INT_STATUS; /* 0x0FE0 */
1311 __IO uint32_t INT_ENABLE;
1312 __IO uint32_t INT_CLR_STATUS;
1313 __IO uint32_t INT_SET_STATUS;
1314 } LPC_EEPROM_TypeDef;
1316 #if defined ( __CC_ARM )
1317 #pragma no_anon_unions
1320 /******************************************************************************/
1321 /* Peripheral memory map */
1322 /******************************************************************************/
1323 /* Base addresses */
1324 #define LPC_FLASH_BASE (0x00000000UL)
1325 #define LPC_RAM_BASE (0x10000000UL)
1326 #define LPC_PERI_RAM_BASE (0x20000000UL)
1327 #define LPC_APB0_BASE (0x40000000UL)
1328 #define LPC_APB1_BASE (0x40080000UL)
1329 #define LPC_AHBRAM1_BASE (0x20004000UL)
1330 #define LPC_AHB_BASE (0x20080000UL)
1331 #define LPC_CM3_BASE (0xE0000000UL)
1333 /* APB0 peripherals */
1334 #define LPC_WDT_BASE (LPC_APB0_BASE + 0x00000)
1335 #define LPC_TIM0_BASE (LPC_APB0_BASE + 0x04000)
1336 #define LPC_TIM1_BASE (LPC_APB0_BASE + 0x08000)
1337 #define LPC_UART0_BASE (LPC_APB0_BASE + 0x0C000)
1338 #define LPC_UART1_BASE (LPC_APB0_BASE + 0x10000)
1339 #define LPC_PWM0_BASE (LPC_APB0_BASE + 0x14000)
1340 #define LPC_PWM1_BASE (LPC_APB0_BASE + 0x18000)
1341 #define LPC_I2C0_BASE (LPC_APB0_BASE + 0x1C000)
1342 #define LPC_RTC_BASE (LPC_APB0_BASE + 0x24000)
1343 #define LPC_GPIOINT_BASE (LPC_APB0_BASE + 0x28080)
1344 #define LPC_IOCON_BASE (LPC_APB0_BASE + 0x2C000)
1345 #define LPC_SSP1_BASE (LPC_APB0_BASE + 0x30000)
1346 #define LPC_ADC_BASE (LPC_APB0_BASE + 0x34000)
1347 #define LPC_CANAF_RAM_BASE (LPC_APB0_BASE + 0x38000)
1348 #define LPC_CANAF_BASE (LPC_APB0_BASE + 0x3C000)
1349 #define LPC_CANCR_BASE (LPC_APB0_BASE + 0x40000)
1350 #define LPC_CAN1_BASE (LPC_APB0_BASE + 0x44000)
1351 #define LPC_CAN2_BASE (LPC_APB0_BASE + 0x48000)
1352 #define LPC_I2C1_BASE (LPC_APB0_BASE + 0x5C000)
1354 /* APB1 peripherals */
1355 #define LPC_SSP0_BASE (LPC_APB1_BASE + 0x08000)
1356 #define LPC_DAC_BASE (LPC_APB1_BASE + 0x0C000)
1357 #define LPC_TIM2_BASE (LPC_APB1_BASE + 0x10000)
1358 #define LPC_TIM3_BASE (LPC_APB1_BASE + 0x14000)
1359 #define LPC_UART2_BASE (LPC_APB1_BASE + 0x18000)
1360 #define LPC_UART3_BASE (LPC_APB1_BASE + 0x1C000)
1361 #define LPC_I2C2_BASE (LPC_APB1_BASE + 0x20000)
1362 #define LPC_UART4_BASE (LPC_APB1_BASE + 0x24000)
1363 #define LPC_I2S_BASE (LPC_APB1_BASE + 0x28000)
1364 #define LPC_SSP2_BASE (LPC_APB1_BASE + 0x2C000)
1365 #define LPC_MCPWM_BASE (LPC_APB1_BASE + 0x38000)
1366 #define LPC_QEI_BASE (LPC_APB1_BASE + 0x3C000)
1367 #define LPC_MCI_BASE (LPC_APB1_BASE + 0x40000)
1368 #define LPC_SC_BASE (LPC_APB1_BASE + 0x7C000)
1370 /* AHB peripherals */
1371 #define LPC_GPDMA_BASE (LPC_AHB_BASE + 0x00000)
1372 #define LPC_GPDMACH0_BASE (LPC_AHB_BASE + 0x00100)
1373 #define LPC_GPDMACH1_BASE (LPC_AHB_BASE + 0x00120)
1374 #define LPC_GPDMACH2_BASE (LPC_AHB_BASE + 0x00140)
1375 #define LPC_GPDMACH3_BASE (LPC_AHB_BASE + 0x00160)
1376 #define LPC_GPDMACH4_BASE (LPC_AHB_BASE + 0x00180)
1377 #define LPC_GPDMACH5_BASE (LPC_AHB_BASE + 0x001A0)
1378 #define LPC_GPDMACH6_BASE (LPC_AHB_BASE + 0x001C0)
1379 #define LPC_GPDMACH7_BASE (LPC_AHB_BASE + 0x001E0)
1380 #define LPC_EMAC_BASE (LPC_AHB_BASE + 0x04000)
1381 #define LPC_LCD_BASE (LPC_AHB_BASE + 0x08000)
1382 #define LPC_USB_BASE (LPC_AHB_BASE + 0x0C000)
1383 #define LPC_CRC_BASE (LPC_AHB_BASE + 0x10000)
1384 #define LPC_GPIO0_BASE (LPC_AHB_BASE + 0x18000)
1385 #define LPC_GPIO1_BASE (LPC_AHB_BASE + 0x18020)
1386 #define LPC_GPIO2_BASE (LPC_AHB_BASE + 0x18040)
1387 #define LPC_GPIO3_BASE (LPC_AHB_BASE + 0x18060)
1388 #define LPC_GPIO4_BASE (LPC_AHB_BASE + 0x18080)
1389 #define LPC_GPIO5_BASE (LPC_AHB_BASE + 0x180A0)
1390 #define LPC_EMC_BASE (LPC_AHB_BASE + 0x1C000)
1392 #define LPC_EEPROM_BASE (LPC_FLASH_BASE+ 0x200080)
1395 /******************************************************************************/
1396 /* Peripheral declaration */
1397 /******************************************************************************/
1398 #define LPC_SC ((LPC_SC_TypeDef *) LPC_SC_BASE )
1399 #define LPC_WDT ((LPC_WDT_TypeDef *) LPC_WDT_BASE )
1400 #define LPC_TIM0 ((LPC_TIM_TypeDef *) LPC_TIM0_BASE )
1401 #define LPC_TIM1 ((LPC_TIM_TypeDef *) LPC_TIM1_BASE )
1402 #define LPC_TIM2 ((LPC_TIM_TypeDef *) LPC_TIM2_BASE )
1403 #define LPC_TIM3 ((LPC_TIM_TypeDef *) LPC_TIM3_BASE )
1404 #define LPC_UART0 ((LPC_UART_TypeDef *) LPC_UART0_BASE )
1405 #define LPC_UART1 ((LPC_UART1_TypeDef *) LPC_UART1_BASE )
1406 #define LPC_UART2 ((LPC_UART_TypeDef *) LPC_UART2_BASE )
1407 #define LPC_UART3 ((LPC_UART_TypeDef *) LPC_UART3_BASE )
1408 #define LPC_UART4 ((LPC_UART4_TypeDef *) LPC_UART4_BASE )
1409 #define LPC_PWM0 ((LPC_PWM_TypeDef *) LPC_PWM0_BASE )
1410 #define LPC_PWM1 ((LPC_PWM_TypeDef *) LPC_PWM1_BASE )
1411 #define LPC_I2C0 ((LPC_I2C_TypeDef *) LPC_I2C0_BASE )
1412 #define LPC_I2C1 ((LPC_I2C_TypeDef *) LPC_I2C1_BASE )
1413 #define LPC_I2C2 ((LPC_I2C_TypeDef *) LPC_I2C2_BASE )
1414 #define LPC_I2S ((LPC_I2S_TypeDef *) LPC_I2S_BASE )
1415 #define LPC_RTC ((LPC_RTC_TypeDef *) LPC_RTC_BASE )
1416 #define LPC_GPIOINT ((LPC_GPIOINT_TypeDef *) LPC_GPIOINT_BASE )
1417 #define LPC_IOCON ((LPC_IOCON_TypeDef *) LPC_IOCON_BASE )
1418 #define LPC_SSP0 ((LPC_SSP_TypeDef *) LPC_SSP0_BASE )
1419 #define LPC_SSP1 ((LPC_SSP_TypeDef *) LPC_SSP1_BASE )
1420 #define LPC_SSP2 ((LPC_SSP_TypeDef *) LPC_SSP2_BASE )
1421 #define LPC_ADC ((LPC_ADC_TypeDef *) LPC_ADC_BASE )
1422 #define LPC_DAC ((LPC_DAC_TypeDef *) LPC_DAC_BASE )
1423 #define LPC_CANAF_RAM ((LPC_CANAF_RAM_TypeDef *) LPC_CANAF_RAM_BASE)
1424 #define LPC_CANAF ((LPC_CANAF_TypeDef *) LPC_CANAF_BASE )
1425 #define LPC_CANCR ((LPC_CANCR_TypeDef *) LPC_CANCR_BASE )
1426 #define LPC_CAN1 ((LPC_CAN_TypeDef *) LPC_CAN1_BASE )
1427 #define LPC_CAN2 ((LPC_CAN_TypeDef *) LPC_CAN2_BASE )
1428 #define LPC_MCPWM ((LPC_MCPWM_TypeDef *) LPC_MCPWM_BASE )
1429 #define LPC_QEI ((LPC_QEI_TypeDef *) LPC_QEI_BASE )
1430 #define LPC_MCI ((LPC_MCI_TypeDef *) LPC_MCI_BASE )
1431 #define LPC_GPDMA ((LPC_GPDMA_TypeDef *) LPC_GPDMA_BASE )
1432 #define LPC_GPDMACH0 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH0_BASE )
1433 #define LPC_GPDMACH1 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH1_BASE )
1434 #define LPC_GPDMACH2 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH2_BASE )
1435 #define LPC_GPDMACH3 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH3_BASE )
1436 #define LPC_GPDMACH4 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH4_BASE )
1437 #define LPC_GPDMACH5 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH5_BASE )
1438 #define LPC_GPDMACH6 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH6_BASE )
1439 #define LPC_GPDMACH7 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH7_BASE )
1440 #define LPC_EMAC ((LPC_EMAC_TypeDef *) LPC_EMAC_BASE )
1441 #define LPC_LCD ((LPC_LCD_TypeDef *) LPC_LCD_BASE )
1442 #define LPC_USB ((LPC_USB_TypeDef *) LPC_USB_BASE )
1443 #define LPC_GPIO0 ((LPC_GPIO_TypeDef *) LPC_GPIO0_BASE )
1444 #define LPC_GPIO1 ((LPC_GPIO_TypeDef *) LPC_GPIO1_BASE )
1445 #define LPC_GPIO2 ((LPC_GPIO_TypeDef *) LPC_GPIO2_BASE )
1446 #define LPC_GPIO3 ((LPC_GPIO_TypeDef *) LPC_GPIO3_BASE )
1447 #define LPC_GPIO4 ((LPC_GPIO_TypeDef *) LPC_GPIO4_BASE )
1448 #define LPC_GPIO5 ((LPC_GPIO_TypeDef *) LPC_GPIO5_BASE )
1449 #define LPC_EMC ((LPC_EMC_TypeDef *) LPC_EMC_BASE )
1450 #define LPC_CRC ((LPC_CRC_TypeDef *) LPC_CRC_BASE )
1451 #define LPC_EEPROM ((LPC_EEPROM_TypeDef *) LPC_EEPROM_BASE )
1453 #endif // __LPC177x_8x_H__