Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
95:7e07b6fb45cf
.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 66:9c8f0e3462fb 1 /****************************************************************************
bogdanm 66:9c8f0e3462fb 2 * $Id:: LPC8xx.h 6437 2012-10-31 11:06:06Z dep00694 $
bogdanm 66:9c8f0e3462fb 3 * Project: NXP LPC8xx software example
bogdanm 66:9c8f0e3462fb 4 *
bogdanm 66:9c8f0e3462fb 5 * Description:
bogdanm 66:9c8f0e3462fb 6 * CMSIS Cortex-M0+ Core Peripheral Access Layer Header File for
bogdanm 66:9c8f0e3462fb 7 * NXP LPC800 Device Series
bogdanm 66:9c8f0e3462fb 8 *
bogdanm 66:9c8f0e3462fb 9 ****************************************************************************
bogdanm 66:9c8f0e3462fb 10 * Software that is described herein is for illustrative purposes only
bogdanm 66:9c8f0e3462fb 11 * which provides customers with programming information regarding the
bogdanm 66:9c8f0e3462fb 12 * products. This software is supplied "AS IS" without any warranties.
bogdanm 66:9c8f0e3462fb 13 * NXP Semiconductors assumes no responsibility or liability for the
bogdanm 66:9c8f0e3462fb 14 * use of the software, conveys no license or title under any patent,
bogdanm 66:9c8f0e3462fb 15 * copyright, or mask work right to the product. NXP Semiconductors
bogdanm 66:9c8f0e3462fb 16 * reserves the right to make changes in the software without
bogdanm 66:9c8f0e3462fb 17 * notification. NXP Semiconductors also make no representation or
bogdanm 66:9c8f0e3462fb 18 * warranty that such application will be suitable for the specified
bogdanm 66:9c8f0e3462fb 19 * use without further testing or modification.
bogdanm 66:9c8f0e3462fb 20
bogdanm 66:9c8f0e3462fb 21 * Permission to use, copy, modify, and distribute this software and its
bogdanm 66:9c8f0e3462fb 22 * documentation is hereby granted, under NXP Semiconductors'
bogdanm 66:9c8f0e3462fb 23 * relevant copyright in the software, without fee, provided that it
bogdanm 66:9c8f0e3462fb 24 * is used in conjunction with NXP Semiconductors microcontrollers. This
bogdanm 66:9c8f0e3462fb 25 * copyright, permission, and disclaimer notice must appear in all copies of
bogdanm 66:9c8f0e3462fb 26 * this code.
bogdanm 66:9c8f0e3462fb 27 ****************************************************************************/
bogdanm 66:9c8f0e3462fb 28 #ifndef __LPC8xx_H__
bogdanm 66:9c8f0e3462fb 29 #define __LPC8xx_H__
bogdanm 66:9c8f0e3462fb 30
bogdanm 66:9c8f0e3462fb 31 #ifdef __cplusplus
bogdanm 66:9c8f0e3462fb 32 extern "C" {
bogdanm 66:9c8f0e3462fb 33 #endif
bogdanm 66:9c8f0e3462fb 34
bogdanm 66:9c8f0e3462fb 35 /** @addtogroup LPC8xx_Definitions LPC8xx Definitions
bogdanm 66:9c8f0e3462fb 36 This file defines all structures and symbols for LPC8xx:
bogdanm 66:9c8f0e3462fb 37 - Registers and bitfields
bogdanm 66:9c8f0e3462fb 38 - peripheral base address
bogdanm 66:9c8f0e3462fb 39 - PIO definitions
bogdanm 66:9c8f0e3462fb 40 @{
bogdanm 66:9c8f0e3462fb 41 */
bogdanm 66:9c8f0e3462fb 42
bogdanm 66:9c8f0e3462fb 43
bogdanm 66:9c8f0e3462fb 44 /******************************************************************************/
bogdanm 66:9c8f0e3462fb 45 /* Processor and Core Peripherals */
bogdanm 66:9c8f0e3462fb 46 /******************************************************************************/
bogdanm 66:9c8f0e3462fb 47 /** @addtogroup LPC8xx_CMSIS LPC8xx CMSIS Definitions
bogdanm 66:9c8f0e3462fb 48 Configuration of the Cortex-M0+ Processor and Core Peripherals
bogdanm 66:9c8f0e3462fb 49 @{
bogdanm 66:9c8f0e3462fb 50 */
bogdanm 66:9c8f0e3462fb 51
bogdanm 66:9c8f0e3462fb 52 /*
bogdanm 66:9c8f0e3462fb 53 * ==========================================================================
bogdanm 66:9c8f0e3462fb 54 * ---------- Interrupt Number Definition -----------------------------------
bogdanm 66:9c8f0e3462fb 55 * ==========================================================================
bogdanm 66:9c8f0e3462fb 56 */
bogdanm 66:9c8f0e3462fb 57 typedef enum IRQn
bogdanm 66:9c8f0e3462fb 58 {
bogdanm 66:9c8f0e3462fb 59 /****** Cortex-M0 Processor Exceptions Numbers ***************************************************/
bogdanm 66:9c8f0e3462fb 60 Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset*/
bogdanm 66:9c8f0e3462fb 61 NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
bogdanm 66:9c8f0e3462fb 62 HardFault_IRQn = -13, /*!< 3 Cortex-M0 Hard Fault Interrupt */
bogdanm 66:9c8f0e3462fb 63 SVCall_IRQn = -5, /*!< 11 Cortex-M0 SV Call Interrupt */
bogdanm 66:9c8f0e3462fb 64 PendSV_IRQn = -2, /*!< 14 Cortex-M0 Pend SV Interrupt */
bogdanm 66:9c8f0e3462fb 65 SysTick_IRQn = -1, /*!< 15 Cortex-M0 System Tick Interrupt */
bogdanm 66:9c8f0e3462fb 66
bogdanm 66:9c8f0e3462fb 67 /****** LPC8xx Specific Interrupt Numbers ********************************************************/
bogdanm 66:9c8f0e3462fb 68 SPI0_IRQn = 0, /*!< SPI0 */
bogdanm 66:9c8f0e3462fb 69 SPI1_IRQn = 1, /*!< SPI1 */
bogdanm 66:9c8f0e3462fb 70 Reserved0_IRQn = 2, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 71 UART0_IRQn = 3, /*!< USART0 */
bogdanm 66:9c8f0e3462fb 72 UART1_IRQn = 4, /*!< USART1 */
bogdanm 66:9c8f0e3462fb 73 UART2_IRQn = 5, /*!< USART2 */
bogdanm 66:9c8f0e3462fb 74 Reserved1_IRQn = 6, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 75 Reserved2_IRQn = 7, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 76 I2C_IRQn = 8, /*!< I2C */
bogdanm 66:9c8f0e3462fb 77 SCT_IRQn = 9, /*!< SCT */
bogdanm 66:9c8f0e3462fb 78 MRT_IRQn = 10, /*!< MRT */
bogdanm 66:9c8f0e3462fb 79 CMP_IRQn = 11, /*!< CMP */
bogdanm 66:9c8f0e3462fb 80 WDT_IRQn = 12, /*!< WDT */
bogdanm 66:9c8f0e3462fb 81 BOD_IRQn = 13, /*!< BOD */
bogdanm 66:9c8f0e3462fb 82 Reserved3_IRQn = 14, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 83 WKT_IRQn = 15, /*!< WKT Interrupt */
bogdanm 66:9c8f0e3462fb 84 Reserved4_IRQn = 16, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 85 Reserved5_IRQn = 17, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 86 Reserved6_IRQn = 18, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 87 Reserved7_IRQn = 19, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 88 Reserved8_IRQn = 20, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 89 Reserved9_IRQn = 21, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 90 Reserved10_IRQn = 22, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 91 Reserved11_IRQn = 23, /*!< Reserved Interrupt */
bogdanm 66:9c8f0e3462fb 92 PININT0_IRQn = 24, /*!< External Interrupt 0 */
bogdanm 66:9c8f0e3462fb 93 PININT1_IRQn = 25, /*!< External Interrupt 1 */
bogdanm 66:9c8f0e3462fb 94 PININT2_IRQn = 26, /*!< External Interrupt 2 */
bogdanm 66:9c8f0e3462fb 95 PININT3_IRQn = 27, /*!< External Interrupt 3 */
bogdanm 66:9c8f0e3462fb 96 PININT4_IRQn = 28, /*!< External Interrupt 4 */
bogdanm 66:9c8f0e3462fb 97 PININT5_IRQn = 29, /*!< External Interrupt 5 */
bogdanm 66:9c8f0e3462fb 98 PININT6_IRQn = 30, /*!< External Interrupt 6 */
bogdanm 66:9c8f0e3462fb 99 PININT7_IRQn = 31, /*!< External Interrupt 7 */
bogdanm 66:9c8f0e3462fb 100 } IRQn_Type;
bogdanm 66:9c8f0e3462fb 101
bogdanm 66:9c8f0e3462fb 102 /*
bogdanm 66:9c8f0e3462fb 103 * ==========================================================================
bogdanm 66:9c8f0e3462fb 104 * ----------- Processor and Core Peripheral Section ------------------------
bogdanm 66:9c8f0e3462fb 105 * ==========================================================================
bogdanm 66:9c8f0e3462fb 106 */
bogdanm 66:9c8f0e3462fb 107
bogdanm 66:9c8f0e3462fb 108 /* Configuration of the Cortex-M0+ Processor and Core Peripherals */
bogdanm 66:9c8f0e3462fb 109 #define __MPU_PRESENT 0 /*!< MPU present or not */
bogdanm 66:9c8f0e3462fb 110 #define __VTOR_PRESENT 1 /**< Defines if an VTOR is present or not */
bogdanm 66:9c8f0e3462fb 111 #define __NVIC_PRIO_BITS 2 /*!< Number of Bits used for Priority Levels */
bogdanm 66:9c8f0e3462fb 112 #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
bogdanm 66:9c8f0e3462fb 113
bogdanm 66:9c8f0e3462fb 114 /*@}*/ /* end of group LPC8xx_CMSIS */
bogdanm 66:9c8f0e3462fb 115
bogdanm 66:9c8f0e3462fb 116
bogdanm 66:9c8f0e3462fb 117 #include "core_cm0plus.h" /* Cortex-M0+ processor and core peripherals */
bogdanm 66:9c8f0e3462fb 118 #include "system_LPC8xx.h" /* System Header */
bogdanm 66:9c8f0e3462fb 119
bogdanm 66:9c8f0e3462fb 120
bogdanm 66:9c8f0e3462fb 121 /******************************************************************************/
bogdanm 66:9c8f0e3462fb 122 /* Device Specific Peripheral Registers structures */
bogdanm 66:9c8f0e3462fb 123 /******************************************************************************/
bogdanm 66:9c8f0e3462fb 124
bogdanm 66:9c8f0e3462fb 125 #if defined ( __CC_ARM )
bogdanm 66:9c8f0e3462fb 126 #pragma anon_unions
bogdanm 66:9c8f0e3462fb 127 #endif
bogdanm 66:9c8f0e3462fb 128
bogdanm 66:9c8f0e3462fb 129 /*------------- System Control (SYSCON) --------------------------------------*/
bogdanm 66:9c8f0e3462fb 130 /** @addtogroup LPC8xx_SYSCON LPC8xx System Control Block
bogdanm 66:9c8f0e3462fb 131 @{
bogdanm 66:9c8f0e3462fb 132 */
bogdanm 66:9c8f0e3462fb 133 typedef struct
bogdanm 66:9c8f0e3462fb 134 {
bogdanm 66:9c8f0e3462fb 135 __IO uint32_t SYSMEMREMAP; /*!< Offset: 0x000 System memory remap (R/W) */
bogdanm 66:9c8f0e3462fb 136 __IO uint32_t PRESETCTRL; /*!< Offset: 0x004 Peripheral reset control (R/W) */
bogdanm 66:9c8f0e3462fb 137 __IO uint32_t SYSPLLCTRL; /*!< Offset: 0x008 System PLL control (R/W) */
bogdanm 66:9c8f0e3462fb 138 __IO uint32_t SYSPLLSTAT; /*!< Offset: 0x00C System PLL status (R/W ) */
bogdanm 66:9c8f0e3462fb 139 uint32_t RESERVED0[4];
bogdanm 66:9c8f0e3462fb 140
bogdanm 66:9c8f0e3462fb 141 __IO uint32_t SYSOSCCTRL; /*!< Offset: 0x020 System oscillator control (R/W) */
bogdanm 66:9c8f0e3462fb 142 __IO uint32_t WDTOSCCTRL; /*!< Offset: 0x024 Watchdog oscillator control (R/W) */
bogdanm 66:9c8f0e3462fb 143 uint32_t RESERVED1[2];
bogdanm 66:9c8f0e3462fb 144 __IO uint32_t SYSRSTSTAT; /*!< Offset: 0x030 System reset status Register (R/W ) */
bogdanm 66:9c8f0e3462fb 145 uint32_t RESERVED2[3];
bogdanm 66:9c8f0e3462fb 146 __IO uint32_t SYSPLLCLKSEL; /*!< Offset: 0x040 System PLL clock source select (R/W) */
bogdanm 66:9c8f0e3462fb 147 __IO uint32_t SYSPLLCLKUEN; /*!< Offset: 0x044 System PLL clock source update enable (R/W) */
bogdanm 66:9c8f0e3462fb 148 uint32_t RESERVED3[10];
bogdanm 66:9c8f0e3462fb 149
bogdanm 66:9c8f0e3462fb 150 __IO uint32_t MAINCLKSEL; /*!< Offset: 0x070 Main clock source select (R/W) */
bogdanm 66:9c8f0e3462fb 151 __IO uint32_t MAINCLKUEN; /*!< Offset: 0x074 Main clock source update enable (R/W) */
bogdanm 66:9c8f0e3462fb 152 __IO uint32_t SYSAHBCLKDIV; /*!< Offset: 0x078 System AHB clock divider (R/W) */
bogdanm 66:9c8f0e3462fb 153 uint32_t RESERVED4[1];
bogdanm 66:9c8f0e3462fb 154
bogdanm 66:9c8f0e3462fb 155 __IO uint32_t SYSAHBCLKCTRL; /*!< Offset: 0x080 System AHB clock control (R/W) */
bogdanm 66:9c8f0e3462fb 156 uint32_t RESERVED5[4];
bogdanm 66:9c8f0e3462fb 157 __IO uint32_t UARTCLKDIV; /*!< Offset: 0x094 UART clock divider (R/W) */
bogdanm 66:9c8f0e3462fb 158 uint32_t RESERVED6[18];
bogdanm 66:9c8f0e3462fb 159
bogdanm 66:9c8f0e3462fb 160 __IO uint32_t CLKOUTSEL; /*!< Offset: 0x0E0 CLKOUT clock source select (R/W) */
bogdanm 66:9c8f0e3462fb 161 __IO uint32_t CLKOUTUEN; /*!< Offset: 0x0E4 CLKOUT clock source update enable (R/W) */
bogdanm 66:9c8f0e3462fb 162 __IO uint32_t CLKOUTDIV; /*!< Offset: 0x0E8 CLKOUT clock divider (R/W) */
bogdanm 66:9c8f0e3462fb 163 uint32_t RESERVED7;
bogdanm 66:9c8f0e3462fb 164 __IO uint32_t UARTFRGDIV; /*!< Offset: 0x0F0 UART fractional divider SUB(R/W) */
bogdanm 66:9c8f0e3462fb 165 __IO uint32_t UARTFRGMULT; /*!< Offset: 0x0F4 UART fractional divider ADD(R/W) */
bogdanm 66:9c8f0e3462fb 166 uint32_t RESERVED8[1];
bogdanm 66:9c8f0e3462fb 167 __IO uint32_t EXTTRACECMD; /*!< (@ 0x400480FC) External trace buffer command register */
bogdanm 66:9c8f0e3462fb 168 __IO uint32_t PIOPORCAP0; /*!< Offset: 0x100 POR captured PIO status 0 (R/ ) */
bogdanm 66:9c8f0e3462fb 169 uint32_t RESERVED9[12];
bogdanm 66:9c8f0e3462fb 170 __IO uint32_t IOCONCLKDIV[7]; /*!< (@0x40048134-14C) Peripheral clock x to the IOCON block for programmable glitch filter */
bogdanm 66:9c8f0e3462fb 171 __IO uint32_t BODCTRL; /*!< Offset: 0x150 BOD control (R/W) */
bogdanm 66:9c8f0e3462fb 172 __IO uint32_t SYSTCKCAL; /*!< Offset: 0x154 System tick counter calibration (R/W) */
bogdanm 66:9c8f0e3462fb 173 uint32_t RESERVED10[6];
bogdanm 66:9c8f0e3462fb 174 __IO uint32_t IRQLATENCY; /*!< (@ 0x40048170) IRQ delay */
bogdanm 66:9c8f0e3462fb 175 __IO uint32_t NMISRC; /*!< (@ 0x40048174) NMI Source Control */
bogdanm 66:9c8f0e3462fb 176 __IO uint32_t PINTSEL[8]; /*!< (@ 0x40048178) GPIO Pin Interrupt Select register 0 */
bogdanm 66:9c8f0e3462fb 177 uint32_t RESERVED11[27];
bogdanm 66:9c8f0e3462fb 178 __IO uint32_t STARTERP0; /*!< Offset: 0x204 Start logic signal enable Register 0 (R/W) */
bogdanm 66:9c8f0e3462fb 179 uint32_t RESERVED12[3];
bogdanm 66:9c8f0e3462fb 180 __IO uint32_t STARTERP1; /*!< Offset: 0x214 Start logic signal enable Register 0 (R/W) */
bogdanm 66:9c8f0e3462fb 181 uint32_t RESERVED13[6];
bogdanm 66:9c8f0e3462fb 182 __IO uint32_t PDSLEEPCFG; /*!< Offset: 0x230 Power-down states in Deep-sleep mode (R/W) */
bogdanm 66:9c8f0e3462fb 183 __IO uint32_t PDAWAKECFG; /*!< Offset: 0x234 Power-down states after wake-up (R/W) */
bogdanm 66:9c8f0e3462fb 184 __IO uint32_t PDRUNCFG; /*!< Offset: 0x238 Power-down configuration Register (R/W) */
bogdanm 66:9c8f0e3462fb 185 uint32_t RESERVED14[110];
bogdanm 66:9c8f0e3462fb 186 __I uint32_t DEVICE_ID; /*!< Offset: 0x3F4 Device ID (R/ ) */
bogdanm 66:9c8f0e3462fb 187 } LPC_SYSCON_TypeDef;
bogdanm 66:9c8f0e3462fb 188 /*@}*/ /* end of group LPC8xx_SYSCON */
bogdanm 66:9c8f0e3462fb 189
bogdanm 66:9c8f0e3462fb 190
bogdanm 66:9c8f0e3462fb 191 /**
bogdanm 66:9c8f0e3462fb 192 * @brief Product name title=UM10462 Chapter title=LPC8xx I/O configuration Modification date=3/16/2011 Major revision=0 Minor revision=3 (IOCONFIG)
bogdanm 66:9c8f0e3462fb 193 */
bogdanm 66:9c8f0e3462fb 194
bogdanm 66:9c8f0e3462fb 195 typedef struct { /*!< (@ 0x40044000) IOCONFIG Structure */
bogdanm 66:9c8f0e3462fb 196 __IO uint32_t PIO0_17; /*!< (@ 0x40044000) I/O configuration for pin PIO0_17 */
bogdanm 66:9c8f0e3462fb 197 __IO uint32_t PIO0_13; /*!< (@ 0x40044004) I/O configuration for pin PIO0_13 */
bogdanm 66:9c8f0e3462fb 198 __IO uint32_t PIO0_12; /*!< (@ 0x40044008) I/O configuration for pin PIO0_12 */
bogdanm 66:9c8f0e3462fb 199 __IO uint32_t PIO0_5; /*!< (@ 0x4004400C) I/O configuration for pin PIO0_5 */
bogdanm 66:9c8f0e3462fb 200 __IO uint32_t PIO0_4; /*!< (@ 0x40044010) I/O configuration for pin PIO0_4 */
bogdanm 66:9c8f0e3462fb 201 __IO uint32_t PIO0_3; /*!< (@ 0x40044014) I/O configuration for pin PIO0_3 */
bogdanm 66:9c8f0e3462fb 202 __IO uint32_t PIO0_2; /*!< (@ 0x40044018) I/O configuration for pin PIO0_2 */
bogdanm 66:9c8f0e3462fb 203 __IO uint32_t PIO0_11; /*!< (@ 0x4004401C) I/O configuration for pin PIO0_11 */
bogdanm 66:9c8f0e3462fb 204 __IO uint32_t PIO0_10; /*!< (@ 0x40044020) I/O configuration for pin PIO0_10 */
bogdanm 66:9c8f0e3462fb 205 __IO uint32_t PIO0_16; /*!< (@ 0x40044024) I/O configuration for pin PIO0_16 */
bogdanm 66:9c8f0e3462fb 206 __IO uint32_t PIO0_15; /*!< (@ 0x40044028) I/O configuration for pin PIO0_15 */
bogdanm 66:9c8f0e3462fb 207 __IO uint32_t PIO0_1; /*!< (@ 0x4004402C) I/O configuration for pin PIO0_1 */
bogdanm 66:9c8f0e3462fb 208 __IO uint32_t Reserved; /*!< (@ 0x40044030) I/O configuration for pin (Reserved) */
bogdanm 66:9c8f0e3462fb 209 __IO uint32_t PIO0_9; /*!< (@ 0x40044034) I/O configuration for pin PIO0_9 */
bogdanm 66:9c8f0e3462fb 210 __IO uint32_t PIO0_8; /*!< (@ 0x40044038) I/O configuration for pin PIO0_8 */
bogdanm 66:9c8f0e3462fb 211 __IO uint32_t PIO0_7; /*!< (@ 0x4004403C) I/O configuration for pin PIO0_7 */
bogdanm 66:9c8f0e3462fb 212 __IO uint32_t PIO0_6; /*!< (@ 0x40044040) I/O configuration for pin PIO0_6 */
bogdanm 66:9c8f0e3462fb 213 __IO uint32_t PIO0_0; /*!< (@ 0x40044044) I/O configuration for pin PIO0_0 */
bogdanm 66:9c8f0e3462fb 214 __IO uint32_t PIO0_14; /*!< (@ 0x40044048) I/O configuration for pin PIO0_14 */
bogdanm 66:9c8f0e3462fb 215 } LPC_IOCON_TypeDef;
bogdanm 66:9c8f0e3462fb 216 /*@}*/ /* end of group LPC8xx_IOCON */
bogdanm 66:9c8f0e3462fb 217
bogdanm 66:9c8f0e3462fb 218 /**
bogdanm 66:9c8f0e3462fb 219 * @brief Product name title=UM10462 Chapter title=LPC8xx Flash programming firmware Major revision=0 Minor revision=3 (FLASHCTRL)
bogdanm 66:9c8f0e3462fb 220 */
bogdanm 66:9c8f0e3462fb 221 typedef struct { /*!< (@ 0x40040000) FLASHCTRL Structure */
bogdanm 66:9c8f0e3462fb 222 __I uint32_t RESERVED0[4];
bogdanm 66:9c8f0e3462fb 223 __IO uint32_t FLASHCFG; /*!< (@ 0x40040010) Flash configuration register */
bogdanm 66:9c8f0e3462fb 224 __I uint32_t RESERVED1[3];
bogdanm 66:9c8f0e3462fb 225 __IO uint32_t FMSSTART; /*!< (@ 0x40040020) Signature start address register */
bogdanm 66:9c8f0e3462fb 226 __IO uint32_t FMSSTOP; /*!< (@ 0x40040024) Signature stop-address register */
bogdanm 66:9c8f0e3462fb 227 __I uint32_t RESERVED2;
bogdanm 66:9c8f0e3462fb 228 __I uint32_t FMSW0;
bogdanm 66:9c8f0e3462fb 229 } LPC_FLASHCTRL_TypeDef;
bogdanm 66:9c8f0e3462fb 230 /*@}*/ /* end of group LPC8xx_FLASHCTRL */
bogdanm 66:9c8f0e3462fb 231
bogdanm 66:9c8f0e3462fb 232
bogdanm 66:9c8f0e3462fb 233 /*------------- Power Management Unit (PMU) --------------------------*/
bogdanm 66:9c8f0e3462fb 234 /** @addtogroup LPC8xx_PMU LPC8xx Power Management Unit
bogdanm 66:9c8f0e3462fb 235 @{
bogdanm 66:9c8f0e3462fb 236 */
bogdanm 66:9c8f0e3462fb 237 typedef struct
bogdanm 66:9c8f0e3462fb 238 {
bogdanm 66:9c8f0e3462fb 239 __IO uint32_t PCON; /*!< Offset: 0x000 Power control Register (R/W) */
bogdanm 66:9c8f0e3462fb 240 __IO uint32_t GPREG0; /*!< Offset: 0x004 General purpose Register 0 (R/W) */
bogdanm 66:9c8f0e3462fb 241 __IO uint32_t GPREG1; /*!< Offset: 0x008 General purpose Register 1 (R/W) */
bogdanm 66:9c8f0e3462fb 242 __IO uint32_t GPREG2; /*!< Offset: 0x00C General purpose Register 2 (R/W) */
bogdanm 66:9c8f0e3462fb 243 __IO uint32_t GPREG3; /*!< Offset: 0x010 General purpose Register 3 (R/W) */
bogdanm 66:9c8f0e3462fb 244 __IO uint32_t DPDCTRL; /*!< Offset: 0x014 Deep power-down control register (R/W) */
bogdanm 66:9c8f0e3462fb 245 } LPC_PMU_TypeDef;
bogdanm 66:9c8f0e3462fb 246 /*@}*/ /* end of group LPC8xx_PMU */
bogdanm 66:9c8f0e3462fb 247
bogdanm 66:9c8f0e3462fb 248
bogdanm 66:9c8f0e3462fb 249 /*------------- Switch Matrix Port --------------------------*/
bogdanm 66:9c8f0e3462fb 250 /** @addtogroup LPC8xx_SWM LPC8xx Switch Matrix Port
bogdanm 66:9c8f0e3462fb 251 @{
bogdanm 66:9c8f0e3462fb 252 */
bogdanm 66:9c8f0e3462fb 253 typedef struct
bogdanm 66:9c8f0e3462fb 254 {
bogdanm 66:9c8f0e3462fb 255 union {
bogdanm 66:9c8f0e3462fb 256 __IO uint32_t PINASSIGN[9];
bogdanm 66:9c8f0e3462fb 257 struct {
bogdanm 66:9c8f0e3462fb 258 __IO uint32_t PINASSIGN0;
bogdanm 66:9c8f0e3462fb 259 __IO uint32_t PINASSIGN1;
bogdanm 66:9c8f0e3462fb 260 __IO uint32_t PINASSIGN2;
bogdanm 66:9c8f0e3462fb 261 __IO uint32_t PINASSIGN3;
bogdanm 66:9c8f0e3462fb 262 __IO uint32_t PINASSIGN4;
bogdanm 66:9c8f0e3462fb 263 __IO uint32_t PINASSIGN5;
bogdanm 66:9c8f0e3462fb 264 __IO uint32_t PINASSIGN6;
bogdanm 66:9c8f0e3462fb 265 __IO uint32_t PINASSIGN7;
bogdanm 66:9c8f0e3462fb 266 __IO uint32_t PINASSIGN8;
bogdanm 66:9c8f0e3462fb 267 };
bogdanm 66:9c8f0e3462fb 268 };
bogdanm 66:9c8f0e3462fb 269 __I uint32_t RESERVED0[103];
bogdanm 66:9c8f0e3462fb 270 __IO uint32_t PINENABLE0;
bogdanm 66:9c8f0e3462fb 271 } LPC_SWM_TypeDef;
bogdanm 66:9c8f0e3462fb 272 /*@}*/ /* end of group LPC8xx_SWM */
bogdanm 66:9c8f0e3462fb 273
bogdanm 66:9c8f0e3462fb 274
bogdanm 66:9c8f0e3462fb 275 // ------------------------------------------------------------------------------------------------
bogdanm 66:9c8f0e3462fb 276 // ----- GPIO_PORT -----
bogdanm 66:9c8f0e3462fb 277 // ------------------------------------------------------------------------------------------------
bogdanm 66:9c8f0e3462fb 278
bogdanm 66:9c8f0e3462fb 279 /**
bogdanm 66:9c8f0e3462fb 280 * @brief Product name title=UM10462 Chapter title=LPC8xx GPIO Modification date=3/17/2011 Major revision=0 Minor revision=3 (GPIO_PORT)
bogdanm 66:9c8f0e3462fb 281 */
bogdanm 66:9c8f0e3462fb 282
bogdanm 66:9c8f0e3462fb 283 typedef struct {
bogdanm 66:9c8f0e3462fb 284 __IO uint8_t B0[18]; /*!< (@ 0xA0000000) Byte pin registers port 0 */
bogdanm 66:9c8f0e3462fb 285 __I uint16_t RESERVED0[2039];
bogdanm 66:9c8f0e3462fb 286 __IO uint32_t W0[18]; /*!< (@ 0xA0001000) Word pin registers port 0 */
bogdanm 66:9c8f0e3462fb 287 uint32_t RESERVED1[1006];
bogdanm 66:9c8f0e3462fb 288 __IO uint32_t DIR0; /* 0x2000 */
bogdanm 66:9c8f0e3462fb 289 uint32_t RESERVED2[31];
bogdanm 66:9c8f0e3462fb 290 __IO uint32_t MASK0; /* 0x2080 */
bogdanm 66:9c8f0e3462fb 291 uint32_t RESERVED3[31];
bogdanm 66:9c8f0e3462fb 292 __IO uint32_t PIN0; /* 0x2100 */
bogdanm 66:9c8f0e3462fb 293 uint32_t RESERVED4[31];
bogdanm 66:9c8f0e3462fb 294 __IO uint32_t MPIN0; /* 0x2180 */
bogdanm 66:9c8f0e3462fb 295 uint32_t RESERVED5[31];
bogdanm 66:9c8f0e3462fb 296 __IO uint32_t SET0; /* 0x2200 */
bogdanm 66:9c8f0e3462fb 297 uint32_t RESERVED6[31];
bogdanm 66:9c8f0e3462fb 298 __O uint32_t CLR0; /* 0x2280 */
bogdanm 66:9c8f0e3462fb 299 uint32_t RESERVED7[31];
bogdanm 66:9c8f0e3462fb 300 __O uint32_t NOT0; /* 0x2300 */
bogdanm 66:9c8f0e3462fb 301
bogdanm 66:9c8f0e3462fb 302 } LPC_GPIO_PORT_TypeDef;
bogdanm 66:9c8f0e3462fb 303
bogdanm 66:9c8f0e3462fb 304
bogdanm 66:9c8f0e3462fb 305 // ------------------------------------------------------------------------------------------------
bogdanm 66:9c8f0e3462fb 306 // ----- PIN_INT -----
bogdanm 66:9c8f0e3462fb 307 // ------------------------------------------------------------------------------------------------
bogdanm 66:9c8f0e3462fb 308
bogdanm 66:9c8f0e3462fb 309 /**
bogdanm 66:9c8f0e3462fb 310 * @brief Product name title=UM10462 Chapter title=LPC8xx GPIO Modification date=3/17/2011 Major revision=0 Minor revision=3 (PIN_INT)
bogdanm 66:9c8f0e3462fb 311 */
bogdanm 66:9c8f0e3462fb 312
bogdanm 66:9c8f0e3462fb 313 typedef struct { /*!< (@ 0xA0004000) PIN_INT Structure */
bogdanm 66:9c8f0e3462fb 314 __IO uint32_t ISEL; /*!< (@ 0xA0004000) Pin Interrupt Mode register */
bogdanm 66:9c8f0e3462fb 315 __IO uint32_t IENR; /*!< (@ 0xA0004004) Pin Interrupt Enable (Rising) register */
bogdanm 66:9c8f0e3462fb 316 __IO uint32_t SIENR; /*!< (@ 0xA0004008) Set Pin Interrupt Enable (Rising) register */
bogdanm 66:9c8f0e3462fb 317 __IO uint32_t CIENR; /*!< (@ 0xA000400C) Clear Pin Interrupt Enable (Rising) register */
bogdanm 66:9c8f0e3462fb 318 __IO uint32_t IENF; /*!< (@ 0xA0004010) Pin Interrupt Enable Falling Edge / Active Level register */
bogdanm 66:9c8f0e3462fb 319 __IO uint32_t SIENF; /*!< (@ 0xA0004014) Set Pin Interrupt Enable Falling Edge / Active Level register */
bogdanm 66:9c8f0e3462fb 320 __IO uint32_t CIENF; /*!< (@ 0xA0004018) Clear Pin Interrupt Enable Falling Edge / Active Level address */
bogdanm 66:9c8f0e3462fb 321 __IO uint32_t RISE; /*!< (@ 0xA000401C) Pin Interrupt Rising Edge register */
bogdanm 66:9c8f0e3462fb 322 __IO uint32_t FALL; /*!< (@ 0xA0004020) Pin Interrupt Falling Edge register */
bogdanm 66:9c8f0e3462fb 323 __IO uint32_t IST; /*!< (@ 0xA0004024) Pin Interrupt Status register */
bogdanm 66:9c8f0e3462fb 324 __IO uint32_t PMCTRL; /*!< (@ 0xA0004028) GPIO pattern match interrupt control register */
bogdanm 66:9c8f0e3462fb 325 __IO uint32_t PMSRC; /*!< (@ 0xA000402C) GPIO pattern match interrupt bit-slice source register */
bogdanm 66:9c8f0e3462fb 326 __IO uint32_t PMCFG; /*!< (@ 0xA0004030) GPIO pattern match interrupt bit slice configuration register */
bogdanm 66:9c8f0e3462fb 327 } LPC_PIN_INT_TypeDef;
bogdanm 66:9c8f0e3462fb 328
bogdanm 66:9c8f0e3462fb 329
bogdanm 66:9c8f0e3462fb 330 /*------------- CRC Engine (CRC) -----------------------------------------*/
bogdanm 66:9c8f0e3462fb 331 /** @addtogroup LPC8xx_CRC
bogdanm 66:9c8f0e3462fb 332 @{
bogdanm 66:9c8f0e3462fb 333 */
bogdanm 66:9c8f0e3462fb 334 typedef struct
bogdanm 66:9c8f0e3462fb 335 {
bogdanm 66:9c8f0e3462fb 336 __IO uint32_t MODE;
bogdanm 66:9c8f0e3462fb 337 __IO uint32_t SEED;
bogdanm 66:9c8f0e3462fb 338 union {
bogdanm 66:9c8f0e3462fb 339 __I uint32_t SUM;
bogdanm 66:9c8f0e3462fb 340 __O uint32_t WR_DATA_DWORD;
bogdanm 66:9c8f0e3462fb 341 __O uint16_t WR_DATA_WORD;
bogdanm 66:9c8f0e3462fb 342 uint16_t RESERVED_WORD;
bogdanm 66:9c8f0e3462fb 343 __O uint8_t WR_DATA_BYTE;
bogdanm 66:9c8f0e3462fb 344 uint8_t RESERVED_BYTE[3];
bogdanm 66:9c8f0e3462fb 345 };
bogdanm 66:9c8f0e3462fb 346 } LPC_CRC_TypeDef;
bogdanm 66:9c8f0e3462fb 347 /*@}*/ /* end of group LPC8xx_CRC */
bogdanm 66:9c8f0e3462fb 348
bogdanm 66:9c8f0e3462fb 349 /*------------- Comparator (CMP) --------------------------------------------------*/
bogdanm 66:9c8f0e3462fb 350 /** @addtogroup LPC8xx_CMP LPC8xx Comparator
bogdanm 66:9c8f0e3462fb 351 @{
bogdanm 66:9c8f0e3462fb 352 */
bogdanm 66:9c8f0e3462fb 353 typedef struct { /*!< (@ 0x40024000) CMP Structure */
bogdanm 66:9c8f0e3462fb 354 __IO uint32_t CTRL; /*!< (@ 0x40024000) Comparator control register */
bogdanm 66:9c8f0e3462fb 355 __IO uint32_t LAD; /*!< (@ 0x40024004) Voltage ladder register */
bogdanm 66:9c8f0e3462fb 356 } LPC_CMP_TypeDef;
bogdanm 66:9c8f0e3462fb 357 /*@}*/ /* end of group LPC8xx_CMP */
bogdanm 66:9c8f0e3462fb 358
bogdanm 66:9c8f0e3462fb 359
bogdanm 66:9c8f0e3462fb 360 /*------------- Wakeup Timer (WKT) --------------------------------------------------*/
bogdanm 66:9c8f0e3462fb 361 /** @addtogroup LPC8xx_WKT
bogdanm 66:9c8f0e3462fb 362 @{
bogdanm 66:9c8f0e3462fb 363 */
bogdanm 66:9c8f0e3462fb 364 typedef struct { /*!< (@ 0x40028000) WKT Structure */
bogdanm 66:9c8f0e3462fb 365 __IO uint32_t CTRL; /*!< (@ 0x40028000) Alarm/Wakeup Timer Control register */
bogdanm 66:9c8f0e3462fb 366 uint32_t Reserved[2];
bogdanm 66:9c8f0e3462fb 367 __IO uint32_t COUNT; /*!< (@ 0x4002800C) Alarm/Wakeup TImer counter register */
bogdanm 66:9c8f0e3462fb 368 } LPC_WKT_TypeDef;
bogdanm 66:9c8f0e3462fb 369 /*@}*/ /* end of group LPC8xx_WKT */
bogdanm 66:9c8f0e3462fb 370
bogdanm 66:9c8f0e3462fb 371 /*------------- Multi-Rate Timer(MRT) --------------------------------------------------*/
Kojto 95:7e07b6fb45cf 372 //New, Copied from lpc824
Kojto 95:7e07b6fb45cf 373 /**
Kojto 95:7e07b6fb45cf 374 * @brief Multi-Rate Timer (MRT) (MRT)
Kojto 95:7e07b6fb45cf 375 */
Kojto 95:7e07b6fb45cf 376 typedef struct { /*!< (@ 0x40004000) MRT Structure */
Kojto 95:7e07b6fb45cf 377 __IO uint32_t INTVAL0; /*!< (@ 0x40004000) MRT0 Time interval value register. This value
Kojto 95:7e07b6fb45cf 378 is loaded into the TIMER0 register. */
Kojto 95:7e07b6fb45cf 379 __I uint32_t TIMER0; /*!< (@ 0x40004004) MRT0 Timer register. This register reads the
Kojto 95:7e07b6fb45cf 380 value of the down-counter. */
Kojto 95:7e07b6fb45cf 381 __IO uint32_t CTRL0; /*!< (@ 0x40004008) MRT0 Control register. This register controls
Kojto 95:7e07b6fb45cf 382 the MRT0 modes. */
Kojto 95:7e07b6fb45cf 383 __IO uint32_t STAT0; /*!< (@ 0x4000400C) MRT0 Status register. */
Kojto 95:7e07b6fb45cf 384 __IO uint32_t INTVAL1; /*!< (@ 0x40004010) MRT0 Time interval value register. This value
Kojto 95:7e07b6fb45cf 385 is loaded into the TIMER0 register. */
Kojto 95:7e07b6fb45cf 386 __I uint32_t TIMER1; /*!< (@ 0x40004014) MRT0 Timer register. This register reads the
Kojto 95:7e07b6fb45cf 387 value of the down-counter. */
Kojto 95:7e07b6fb45cf 388 __IO uint32_t CTRL1; /*!< (@ 0x40004018) MRT0 Control register. This register controls
Kojto 95:7e07b6fb45cf 389 the MRT0 modes. */
Kojto 95:7e07b6fb45cf 390 __IO uint32_t STAT1; /*!< (@ 0x4000401C) MRT0 Status register. */
Kojto 95:7e07b6fb45cf 391 __IO uint32_t INTVAL2; /*!< (@ 0x40004020) MRT0 Time interval value register. This value
Kojto 95:7e07b6fb45cf 392 is loaded into the TIMER0 register. */
Kojto 95:7e07b6fb45cf 393 __I uint32_t TIMER2; /*!< (@ 0x40004024) MRT0 Timer register. This register reads the
Kojto 95:7e07b6fb45cf 394 value of the down-counter. */
Kojto 95:7e07b6fb45cf 395 __IO uint32_t CTRL2; /*!< (@ 0x40004028) MRT0 Control register. This register controls
Kojto 95:7e07b6fb45cf 396 the MRT0 modes. */
Kojto 95:7e07b6fb45cf 397 __IO uint32_t STAT2; /*!< (@ 0x4000402C) MRT0 Status register. */
Kojto 95:7e07b6fb45cf 398 __IO uint32_t INTVAL3; /*!< (@ 0x40004030) MRT0 Time interval value register. This value
Kojto 95:7e07b6fb45cf 399 is loaded into the TIMER0 register. */
Kojto 95:7e07b6fb45cf 400 __I uint32_t TIMER3; /*!< (@ 0x40004034) MRT0 Timer register. This register reads the
Kojto 95:7e07b6fb45cf 401 value of the down-counter. */
Kojto 95:7e07b6fb45cf 402 __IO uint32_t CTRL3; /*!< (@ 0x40004038) MRT0 Control register. This register controls
Kojto 95:7e07b6fb45cf 403 the MRT0 modes. */
Kojto 95:7e07b6fb45cf 404 __IO uint32_t STAT3; /*!< (@ 0x4000403C) MRT0 Status register. */
Kojto 95:7e07b6fb45cf 405 __I uint32_t RESERVED0[45];
Kojto 95:7e07b6fb45cf 406 __I uint32_t IDLE_CH; /*!< (@ 0x400040F4) Idle channel register. This register returns
Kojto 95:7e07b6fb45cf 407 the number of the first idle channel. */
Kojto 95:7e07b6fb45cf 408 __IO uint32_t IRQ_FLAG; /*!< (@ 0x400040F8) Global interrupt flag register */
bogdanm 66:9c8f0e3462fb 409 } LPC_MRT_TypeDef;
bogdanm 66:9c8f0e3462fb 410
bogdanm 66:9c8f0e3462fb 411 /*------------- Universal Asynchronous Receiver Transmitter (USART) -----------*/
bogdanm 66:9c8f0e3462fb 412 /** @addtogroup LPC8xx_UART LPC8xx Universal Asynchronous Receiver/Transmitter
bogdanm 66:9c8f0e3462fb 413 @{
bogdanm 66:9c8f0e3462fb 414 */
bogdanm 66:9c8f0e3462fb 415 /**
bogdanm 66:9c8f0e3462fb 416 * @brief Product name title=LPC8xx MCU Chapter title=USART Modification date=4/18/2012 Major revision=0 Minor revision=9 (USART)
bogdanm 66:9c8f0e3462fb 417 */
bogdanm 66:9c8f0e3462fb 418 typedef struct
bogdanm 66:9c8f0e3462fb 419 {
bogdanm 66:9c8f0e3462fb 420 __IO uint32_t CFG; /* 0x00 */
bogdanm 66:9c8f0e3462fb 421 __IO uint32_t CTRL;
bogdanm 66:9c8f0e3462fb 422 __IO uint32_t STAT;
bogdanm 66:9c8f0e3462fb 423 __IO uint32_t INTENSET;
bogdanm 66:9c8f0e3462fb 424 __O uint32_t INTENCLR; /* 0x10 */
bogdanm 66:9c8f0e3462fb 425 __I uint32_t RXDATA;
bogdanm 66:9c8f0e3462fb 426 __I uint32_t RXDATA_STAT;
bogdanm 66:9c8f0e3462fb 427 __IO uint32_t TXDATA;
bogdanm 66:9c8f0e3462fb 428 __IO uint32_t BRG; /* 0x20 */
bogdanm 66:9c8f0e3462fb 429 __IO uint32_t INTSTAT;
bogdanm 66:9c8f0e3462fb 430 } LPC_USART_TypeDef;
bogdanm 66:9c8f0e3462fb 431
bogdanm 66:9c8f0e3462fb 432 /*@}*/ /* end of group LPC8xx_USART */
bogdanm 66:9c8f0e3462fb 433
bogdanm 66:9c8f0e3462fb 434
bogdanm 66:9c8f0e3462fb 435 /*------------- Synchronous Serial Interface Controller (SPI) -----------------------*/
bogdanm 66:9c8f0e3462fb 436 /** @addtogroup LPC8xx_SPI LPC8xx Synchronous Serial Port
bogdanm 66:9c8f0e3462fb 437 @{
bogdanm 66:9c8f0e3462fb 438 */
bogdanm 66:9c8f0e3462fb 439 typedef struct
bogdanm 66:9c8f0e3462fb 440 {
bogdanm 66:9c8f0e3462fb 441 __IO uint32_t CFG; /* 0x00 */
bogdanm 66:9c8f0e3462fb 442 __IO uint32_t DLY;
bogdanm 66:9c8f0e3462fb 443 __IO uint32_t STAT;
bogdanm 66:9c8f0e3462fb 444 __IO uint32_t INTENSET;
bogdanm 66:9c8f0e3462fb 445 __O uint32_t INTENCLR; /* 0x10 */
bogdanm 66:9c8f0e3462fb 446 __I uint32_t RXDAT;
bogdanm 66:9c8f0e3462fb 447 __IO uint32_t TXDATCTL;
bogdanm 66:9c8f0e3462fb 448 __IO uint32_t TXDAT;
bogdanm 66:9c8f0e3462fb 449 __IO uint32_t TXCTRL; /* 0x20 */
bogdanm 66:9c8f0e3462fb 450 __IO uint32_t DIV;
bogdanm 66:9c8f0e3462fb 451 __I uint32_t INTSTAT;
bogdanm 66:9c8f0e3462fb 452 } LPC_SPI_TypeDef;
bogdanm 66:9c8f0e3462fb 453 /*@}*/ /* end of group LPC8xx_SPI */
bogdanm 66:9c8f0e3462fb 454
bogdanm 66:9c8f0e3462fb 455
bogdanm 66:9c8f0e3462fb 456 /*------------- Inter-Integrated Circuit (I2C) -------------------------------*/
bogdanm 66:9c8f0e3462fb 457 /** @addtogroup LPC8xx_I2C I2C-Bus Interface
bogdanm 66:9c8f0e3462fb 458 @{
bogdanm 66:9c8f0e3462fb 459 */
bogdanm 66:9c8f0e3462fb 460 typedef struct
bogdanm 66:9c8f0e3462fb 461 {
bogdanm 66:9c8f0e3462fb 462 __IO uint32_t CFG; /* 0x00 */
bogdanm 66:9c8f0e3462fb 463 __IO uint32_t STAT;
bogdanm 66:9c8f0e3462fb 464 __IO uint32_t INTENSET;
bogdanm 66:9c8f0e3462fb 465 __O uint32_t INTENCLR;
bogdanm 66:9c8f0e3462fb 466 __IO uint32_t TIMEOUT; /* 0x10 */
bogdanm 66:9c8f0e3462fb 467 __IO uint32_t DIV;
bogdanm 66:9c8f0e3462fb 468 __IO uint32_t INTSTAT;
bogdanm 66:9c8f0e3462fb 469 uint32_t Reserved0[1];
bogdanm 66:9c8f0e3462fb 470 __IO uint32_t MSTCTL; /* 0x20 */
bogdanm 66:9c8f0e3462fb 471 __IO uint32_t MSTTIME;
bogdanm 66:9c8f0e3462fb 472 __IO uint32_t MSTDAT;
bogdanm 66:9c8f0e3462fb 473 uint32_t Reserved1[5];
bogdanm 66:9c8f0e3462fb 474 __IO uint32_t SLVCTL; /* 0x40 */
bogdanm 66:9c8f0e3462fb 475 __IO uint32_t SLVDAT;
bogdanm 66:9c8f0e3462fb 476 __IO uint32_t SLVADR0;
bogdanm 66:9c8f0e3462fb 477 __IO uint32_t SLVADR1;
bogdanm 66:9c8f0e3462fb 478 __IO uint32_t SLVADR2; /* 0x50 */
bogdanm 66:9c8f0e3462fb 479 __IO uint32_t SLVADR3;
bogdanm 66:9c8f0e3462fb 480 __IO uint32_t SLVQUAL0;
bogdanm 66:9c8f0e3462fb 481 uint32_t Reserved2[9];
bogdanm 66:9c8f0e3462fb 482 __I uint32_t MONRXDAT; /* 0x80 */
bogdanm 66:9c8f0e3462fb 483 } LPC_I2C_TypeDef;
bogdanm 66:9c8f0e3462fb 484
bogdanm 66:9c8f0e3462fb 485 /*@}*/ /* end of group LPC8xx_I2C */
bogdanm 66:9c8f0e3462fb 486
bogdanm 66:9c8f0e3462fb 487 /**
bogdanm 66:9c8f0e3462fb 488 * @brief State Configurable Timer (SCT) (SCT)
bogdanm 66:9c8f0e3462fb 489 */
bogdanm 66:9c8f0e3462fb 490
bogdanm 66:9c8f0e3462fb 491 /**
bogdanm 66:9c8f0e3462fb 492 * @brief Product name title=UM10430 Chapter title=LPC8xx State Configurable Timer (SCT) Modification date=1/18/2011 Major revision=0 Minor revision=7 (SCT)
bogdanm 66:9c8f0e3462fb 493 */
bogdanm 66:9c8f0e3462fb 494
bogdanm 66:9c8f0e3462fb 495 #define CONFIG_SCT_nEV (6) /* Number of events */
bogdanm 66:9c8f0e3462fb 496 #define CONFIG_SCT_nRG (5) /* Number of match/compare registers */
bogdanm 66:9c8f0e3462fb 497 #define CONFIG_SCT_nOU (4) /* Number of outputs */
bogdanm 66:9c8f0e3462fb 498
bogdanm 66:9c8f0e3462fb 499 typedef struct
bogdanm 66:9c8f0e3462fb 500 {
bogdanm 66:9c8f0e3462fb 501 __IO uint32_t CONFIG; /* 0x000 Configuration Register */
bogdanm 66:9c8f0e3462fb 502 union {
bogdanm 66:9c8f0e3462fb 503 __IO uint32_t CTRL_U; /* 0x004 Control Register */
bogdanm 66:9c8f0e3462fb 504 struct {
bogdanm 66:9c8f0e3462fb 505 __IO uint16_t CTRL_L; /* 0x004 low control register */
bogdanm 66:9c8f0e3462fb 506 __IO uint16_t CTRL_H; /* 0x006 high control register */
bogdanm 66:9c8f0e3462fb 507 };
bogdanm 66:9c8f0e3462fb 508 };
bogdanm 66:9c8f0e3462fb 509 __IO uint16_t LIMIT_L; /* 0x008 limit register for counter L */
bogdanm 66:9c8f0e3462fb 510 __IO uint16_t LIMIT_H; /* 0x00A limit register for counter H */
bogdanm 66:9c8f0e3462fb 511 __IO uint16_t HALT_L; /* 0x00C halt register for counter L */
bogdanm 66:9c8f0e3462fb 512 __IO uint16_t HALT_H; /* 0x00E halt register for counter H */
bogdanm 66:9c8f0e3462fb 513 __IO uint16_t STOP_L; /* 0x010 stop register for counter L */
bogdanm 66:9c8f0e3462fb 514 __IO uint16_t STOP_H; /* 0x012 stop register for counter H */
bogdanm 66:9c8f0e3462fb 515 __IO uint16_t START_L; /* 0x014 start register for counter L */
bogdanm 66:9c8f0e3462fb 516 __IO uint16_t START_H; /* 0x016 start register for counter H */
bogdanm 66:9c8f0e3462fb 517 uint32_t RESERVED1[10]; /* 0x018-0x03C reserved */
bogdanm 66:9c8f0e3462fb 518 union {
bogdanm 66:9c8f0e3462fb 519 __IO uint32_t COUNT_U; /* 0x040 counter register */
bogdanm 66:9c8f0e3462fb 520 struct {
bogdanm 66:9c8f0e3462fb 521 __IO uint16_t COUNT_L; /* 0x040 counter register for counter L */
bogdanm 66:9c8f0e3462fb 522 __IO uint16_t COUNT_H; /* 0x042 counter register for counter H */
bogdanm 66:9c8f0e3462fb 523 };
bogdanm 66:9c8f0e3462fb 524 };
bogdanm 66:9c8f0e3462fb 525 __IO uint16_t STATE_L; /* 0x044 state register for counter L */
bogdanm 66:9c8f0e3462fb 526 __IO uint16_t STATE_H; /* 0x046 state register for counter H */
bogdanm 66:9c8f0e3462fb 527 __I uint32_t INPUT; /* 0x048 input register */
bogdanm 66:9c8f0e3462fb 528 __IO uint16_t REGMODE_L; /* 0x04C match - capture registers mode register L */
bogdanm 66:9c8f0e3462fb 529 __IO uint16_t REGMODE_H; /* 0x04E match - capture registers mode register H */
bogdanm 66:9c8f0e3462fb 530 __IO uint32_t OUTPUT; /* 0x050 output register */
bogdanm 66:9c8f0e3462fb 531 __IO uint32_t OUTPUTDIRCTRL; /* 0x054 Output counter direction Control Register */
bogdanm 66:9c8f0e3462fb 532 __IO uint32_t RES; /* 0x058 conflict resolution register */
bogdanm 66:9c8f0e3462fb 533 uint32_t RESERVED2[37]; /* 0x05C-0x0EC reserved */
bogdanm 66:9c8f0e3462fb 534 __IO uint32_t EVEN; /* 0x0F0 event enable register */
bogdanm 66:9c8f0e3462fb 535 __IO uint32_t EVFLAG; /* 0x0F4 event flag register */
bogdanm 66:9c8f0e3462fb 536 __IO uint32_t CONEN; /* 0x0F8 conflict enable register */
bogdanm 66:9c8f0e3462fb 537 __IO uint32_t CONFLAG; /* 0x0FC conflict flag register */
bogdanm 66:9c8f0e3462fb 538
bogdanm 66:9c8f0e3462fb 539 union {
bogdanm 66:9c8f0e3462fb 540 __IO union { /* 0x100-... Match / Capture value */
bogdanm 66:9c8f0e3462fb 541 uint32_t U; /* SCTMATCH[i].U Unified 32-bit register */
bogdanm 66:9c8f0e3462fb 542 struct {
bogdanm 66:9c8f0e3462fb 543 uint16_t L; /* SCTMATCH[i].L Access to L value */
bogdanm 66:9c8f0e3462fb 544 uint16_t H; /* SCTMATCH[i].H Access to H value */
bogdanm 66:9c8f0e3462fb 545 };
bogdanm 66:9c8f0e3462fb 546 } MATCH[CONFIG_SCT_nRG];
bogdanm 66:9c8f0e3462fb 547 __I union {
bogdanm 66:9c8f0e3462fb 548 uint32_t U; /* SCTCAP[i].U Unified 32-bit register */
bogdanm 66:9c8f0e3462fb 549 struct {
bogdanm 66:9c8f0e3462fb 550 uint16_t L; /* SCTCAP[i].L Access to H value */
bogdanm 66:9c8f0e3462fb 551 uint16_t H; /* SCTCAP[i].H Access to H value */
bogdanm 66:9c8f0e3462fb 552 };
bogdanm 66:9c8f0e3462fb 553 } CAP[CONFIG_SCT_nRG];
bogdanm 66:9c8f0e3462fb 554 };
bogdanm 66:9c8f0e3462fb 555
bogdanm 66:9c8f0e3462fb 556
bogdanm 66:9c8f0e3462fb 557 uint32_t RESERVED3[32-CONFIG_SCT_nRG]; /* ...-0x17C reserved */
bogdanm 66:9c8f0e3462fb 558
bogdanm 66:9c8f0e3462fb 559 union {
bogdanm 66:9c8f0e3462fb 560 __IO uint16_t MATCH_L[CONFIG_SCT_nRG]; /* 0x180-... Match Value L counter */
bogdanm 66:9c8f0e3462fb 561 __I uint16_t CAP_L[CONFIG_SCT_nRG]; /* 0x180-... Capture Value L counter */
bogdanm 66:9c8f0e3462fb 562 };
bogdanm 66:9c8f0e3462fb 563 uint16_t RESERVED4[32-CONFIG_SCT_nRG]; /* ...-0x1BE reserved */
bogdanm 66:9c8f0e3462fb 564 union {
bogdanm 66:9c8f0e3462fb 565 __IO uint16_t MATCH_H[CONFIG_SCT_nRG]; /* 0x1C0-... Match Value H counter */
bogdanm 66:9c8f0e3462fb 566 __I uint16_t CAP_H[CONFIG_SCT_nRG]; /* 0x1C0-... Capture Value H counter */
bogdanm 66:9c8f0e3462fb 567 };
bogdanm 66:9c8f0e3462fb 568
bogdanm 66:9c8f0e3462fb 569 uint16_t RESERVED5[32-CONFIG_SCT_nRG]; /* ...-0x1FE reserved */
bogdanm 66:9c8f0e3462fb 570
bogdanm 66:9c8f0e3462fb 571
bogdanm 66:9c8f0e3462fb 572 union {
bogdanm 66:9c8f0e3462fb 573 __IO union { /* 0x200-... Match Reload / Capture Control value */
bogdanm 66:9c8f0e3462fb 574 uint32_t U; /* SCTMATCHREL[i].U Unified 32-bit register */
bogdanm 66:9c8f0e3462fb 575 struct {
bogdanm 66:9c8f0e3462fb 576 uint16_t L; /* SCTMATCHREL[i].L Access to L value */
bogdanm 66:9c8f0e3462fb 577 uint16_t H; /* SCTMATCHREL[i].H Access to H value */
bogdanm 66:9c8f0e3462fb 578 };
bogdanm 66:9c8f0e3462fb 579 } MATCHREL[CONFIG_SCT_nRG];
bogdanm 66:9c8f0e3462fb 580 __IO union {
bogdanm 66:9c8f0e3462fb 581 uint32_t U; /* SCTCAPCTRL[i].U Unified 32-bit register */
bogdanm 66:9c8f0e3462fb 582 struct {
bogdanm 66:9c8f0e3462fb 583 uint16_t L; /* SCTCAPCTRL[i].L Access to H value */
bogdanm 66:9c8f0e3462fb 584 uint16_t H; /* SCTCAPCTRL[i].H Access to H value */
bogdanm 66:9c8f0e3462fb 585 };
bogdanm 66:9c8f0e3462fb 586 } CAPCTRL[CONFIG_SCT_nRG];
bogdanm 66:9c8f0e3462fb 587 };
bogdanm 66:9c8f0e3462fb 588
bogdanm 66:9c8f0e3462fb 589 uint32_t RESERVED6[32-CONFIG_SCT_nRG]; /* ...-0x27C reserved */
bogdanm 66:9c8f0e3462fb 590
bogdanm 66:9c8f0e3462fb 591 union {
bogdanm 66:9c8f0e3462fb 592 __IO uint16_t MATCHREL_L[CONFIG_SCT_nRG]; /* 0x280-... Match Reload value L counter */
bogdanm 66:9c8f0e3462fb 593 __IO uint16_t CAPCTRL_L[CONFIG_SCT_nRG]; /* 0x280-... Capture Control value L counter */
bogdanm 66:9c8f0e3462fb 594 };
bogdanm 66:9c8f0e3462fb 595 uint16_t RESERVED7[32-CONFIG_SCT_nRG]; /* ...-0x2BE reserved */
bogdanm 66:9c8f0e3462fb 596 union {
bogdanm 66:9c8f0e3462fb 597 __IO uint16_t MATCHREL_H[CONFIG_SCT_nRG]; /* 0x2C0-... Match Reload value H counter */
bogdanm 66:9c8f0e3462fb 598 __IO uint16_t CAPCTRL_H[CONFIG_SCT_nRG]; /* 0x2C0-... Capture Control value H counter */
bogdanm 66:9c8f0e3462fb 599 };
bogdanm 66:9c8f0e3462fb 600 uint16_t RESERVED8[32-CONFIG_SCT_nRG]; /* ...-0x2FE reserved */
bogdanm 66:9c8f0e3462fb 601
bogdanm 66:9c8f0e3462fb 602 __IO struct { /* 0x300-0x3FC SCTEVENT[i].STATE / SCTEVENT[i].CTRL*/
bogdanm 66:9c8f0e3462fb 603 uint32_t STATE; /* Event State Register */
bogdanm 66:9c8f0e3462fb 604 uint32_t CTRL; /* Event Control Register */
bogdanm 66:9c8f0e3462fb 605 } EVENT[CONFIG_SCT_nEV];
bogdanm 66:9c8f0e3462fb 606
bogdanm 66:9c8f0e3462fb 607 uint32_t RESERVED9[128-2*CONFIG_SCT_nEV]; /* ...-0x4FC reserved */
bogdanm 66:9c8f0e3462fb 608
bogdanm 66:9c8f0e3462fb 609 __IO struct { /* 0x500-0x57C SCTOUT[i].SET / SCTOUT[i].CLR */
bogdanm 66:9c8f0e3462fb 610 uint32_t SET; /* Output n Set Register */
bogdanm 66:9c8f0e3462fb 611 uint32_t CLR; /* Output n Clear Register */
bogdanm 66:9c8f0e3462fb 612 } OUT[CONFIG_SCT_nOU];
bogdanm 66:9c8f0e3462fb 613
bogdanm 66:9c8f0e3462fb 614 uint32_t RESERVED10[191-2*CONFIG_SCT_nOU]; /* ...-0x7F8 reserved */
bogdanm 66:9c8f0e3462fb 615
bogdanm 66:9c8f0e3462fb 616 __I uint32_t MODULECONTENT; /* 0x7FC Module Content */
bogdanm 66:9c8f0e3462fb 617
bogdanm 66:9c8f0e3462fb 618 } LPC_SCT_TypeDef;
bogdanm 66:9c8f0e3462fb 619 /*@}*/ /* end of group LPC8xx_SCT */
bogdanm 66:9c8f0e3462fb 620
bogdanm 66:9c8f0e3462fb 621
bogdanm 66:9c8f0e3462fb 622 /*------------- Watchdog Timer (WWDT) -----------------------------------------*/
bogdanm 66:9c8f0e3462fb 623 /** @addtogroup LPC8xx_WDT LPC8xx WatchDog Timer
bogdanm 66:9c8f0e3462fb 624 @{
bogdanm 66:9c8f0e3462fb 625 */
bogdanm 66:9c8f0e3462fb 626 typedef struct
bogdanm 66:9c8f0e3462fb 627 {
bogdanm 66:9c8f0e3462fb 628 __IO uint32_t MOD; /*!< Offset: 0x000 Watchdog mode register (R/W) */
bogdanm 66:9c8f0e3462fb 629 __IO uint32_t TC; /*!< Offset: 0x004 Watchdog timer constant register (R/W) */
bogdanm 66:9c8f0e3462fb 630 __O uint32_t FEED; /*!< Offset: 0x008 Watchdog feed sequence register (W) */
bogdanm 66:9c8f0e3462fb 631 __I uint32_t TV; /*!< Offset: 0x00C Watchdog timer value register (R) */
bogdanm 66:9c8f0e3462fb 632 uint32_t RESERVED; /*!< Offset: 0x010 RESERVED */
bogdanm 66:9c8f0e3462fb 633 __IO uint32_t WARNINT; /*!< Offset: 0x014 Watchdog timer warning int. register (R/W) */
bogdanm 66:9c8f0e3462fb 634 __IO uint32_t WINDOW; /*!< Offset: 0x018 Watchdog timer window value register (R/W) */
bogdanm 66:9c8f0e3462fb 635 } LPC_WWDT_TypeDef;
bogdanm 66:9c8f0e3462fb 636 /*@}*/ /* end of group LPC8xx_WDT */
bogdanm 66:9c8f0e3462fb 637
bogdanm 66:9c8f0e3462fb 638
bogdanm 66:9c8f0e3462fb 639 #if defined ( __CC_ARM )
bogdanm 66:9c8f0e3462fb 640 #pragma no_anon_unions
bogdanm 66:9c8f0e3462fb 641 #endif
bogdanm 66:9c8f0e3462fb 642
bogdanm 66:9c8f0e3462fb 643 /******************************************************************************/
bogdanm 66:9c8f0e3462fb 644 /* Peripheral memory map */
bogdanm 66:9c8f0e3462fb 645 /******************************************************************************/
bogdanm 66:9c8f0e3462fb 646 /* Base addresses */
bogdanm 66:9c8f0e3462fb 647 #define LPC_FLASH_BASE (0x00000000UL)
bogdanm 66:9c8f0e3462fb 648 #define LPC_RAM_BASE (0x10000000UL)
bogdanm 66:9c8f0e3462fb 649 #define LPC_ROM_BASE (0x1FFF0000UL)
bogdanm 66:9c8f0e3462fb 650 #define LPC_APB0_BASE (0x40000000UL)
bogdanm 66:9c8f0e3462fb 651 #define LPC_AHB_BASE (0x50000000UL)
bogdanm 66:9c8f0e3462fb 652
bogdanm 66:9c8f0e3462fb 653 /* APB0 peripherals */
bogdanm 66:9c8f0e3462fb 654 #define LPC_WWDT_BASE (LPC_APB0_BASE + 0x00000)
bogdanm 66:9c8f0e3462fb 655 #define LPC_MRT_BASE (LPC_APB0_BASE + 0x04000)
bogdanm 66:9c8f0e3462fb 656 #define LPC_WKT_BASE (LPC_APB0_BASE + 0x08000)
bogdanm 66:9c8f0e3462fb 657 #define LPC_SWM_BASE (LPC_APB0_BASE + 0x0C000)
bogdanm 66:9c8f0e3462fb 658 #define LPC_PMU_BASE (LPC_APB0_BASE + 0x20000)
bogdanm 66:9c8f0e3462fb 659 #define LPC_CMP_BASE (LPC_APB0_BASE + 0x24000)
bogdanm 66:9c8f0e3462fb 660
bogdanm 66:9c8f0e3462fb 661 #define LPC_FLASHCTRL_BASE (LPC_APB0_BASE + 0x40000)
bogdanm 66:9c8f0e3462fb 662 #define LPC_IOCON_BASE (LPC_APB0_BASE + 0x44000)
bogdanm 66:9c8f0e3462fb 663 #define LPC_SYSCON_BASE (LPC_APB0_BASE + 0x48000)
bogdanm 66:9c8f0e3462fb 664 #define LPC_I2C_BASE (LPC_APB0_BASE + 0x50000)
bogdanm 66:9c8f0e3462fb 665 #define LPC_SPI0_BASE (LPC_APB0_BASE + 0x58000)
bogdanm 66:9c8f0e3462fb 666 #define LPC_SPI1_BASE (LPC_APB0_BASE + 0x5C000)
bogdanm 66:9c8f0e3462fb 667 #define LPC_USART0_BASE (LPC_APB0_BASE + 0x64000)
bogdanm 66:9c8f0e3462fb 668 #define LPC_USART1_BASE (LPC_APB0_BASE + 0x68000)
bogdanm 66:9c8f0e3462fb 669 #define LPC_USART2_BASE (LPC_APB0_BASE + 0x6C000)
bogdanm 66:9c8f0e3462fb 670
bogdanm 66:9c8f0e3462fb 671 /* AHB peripherals */
bogdanm 66:9c8f0e3462fb 672 #define LPC_CRC_BASE (LPC_AHB_BASE + 0x00000)
bogdanm 66:9c8f0e3462fb 673 #define LPC_SCT_BASE (LPC_AHB_BASE + 0x04000)
bogdanm 66:9c8f0e3462fb 674
bogdanm 66:9c8f0e3462fb 675 #define LPC_GPIO_PORT_BASE (0xA0000000)
bogdanm 66:9c8f0e3462fb 676 #define LPC_PIN_INT_BASE (LPC_GPIO_PORT_BASE + 0x4000)
bogdanm 66:9c8f0e3462fb 677
bogdanm 66:9c8f0e3462fb 678 /******************************************************************************/
bogdanm 66:9c8f0e3462fb 679 /* Peripheral declaration */
bogdanm 66:9c8f0e3462fb 680 /******************************************************************************/
bogdanm 66:9c8f0e3462fb 681 #define LPC_WWDT ((LPC_WWDT_TypeDef *) LPC_WWDT_BASE )
bogdanm 66:9c8f0e3462fb 682 #define LPC_MRT ((LPC_MRT_TypeDef *) LPC_MRT_BASE )
bogdanm 66:9c8f0e3462fb 683
bogdanm 66:9c8f0e3462fb 684
bogdanm 66:9c8f0e3462fb 685 #define LPC_WKT ((LPC_WKT_TypeDef *) LPC_WKT_BASE )
bogdanm 66:9c8f0e3462fb 686 #define LPC_SWM ((LPC_SWM_TypeDef *) LPC_SWM_BASE )
bogdanm 66:9c8f0e3462fb 687 #define LPC_PMU ((LPC_PMU_TypeDef *) LPC_PMU_BASE )
bogdanm 66:9c8f0e3462fb 688 #define LPC_CMP ((LPC_CMP_TypeDef *) LPC_CMP_BASE )
bogdanm 66:9c8f0e3462fb 689
bogdanm 66:9c8f0e3462fb 690 #define LPC_FLASHCTRL ((LPC_FLASHCTRL_TypeDef *) LPC_FLASHCTRL_BASE )
bogdanm 66:9c8f0e3462fb 691 #define LPC_IOCON ((LPC_IOCON_TypeDef *) LPC_IOCON_BASE )
bogdanm 66:9c8f0e3462fb 692 #define LPC_SYSCON ((LPC_SYSCON_TypeDef *) LPC_SYSCON_BASE)
bogdanm 66:9c8f0e3462fb 693 #define LPC_I2C ((LPC_I2C_TypeDef *) LPC_I2C_BASE )
bogdanm 66:9c8f0e3462fb 694 #define LPC_SPI0 ((LPC_SPI_TypeDef *) LPC_SPI0_BASE )
bogdanm 66:9c8f0e3462fb 695 #define LPC_SPI1 ((LPC_SPI_TypeDef *) LPC_SPI1_BASE )
bogdanm 66:9c8f0e3462fb 696 #define LPC_USART0 ((LPC_USART_TypeDef *) LPC_USART0_BASE )
bogdanm 66:9c8f0e3462fb 697 #define LPC_USART1 ((LPC_USART_TypeDef *) LPC_USART1_BASE )
bogdanm 66:9c8f0e3462fb 698 #define LPC_USART2 ((LPC_USART_TypeDef *) LPC_USART2_BASE )
bogdanm 66:9c8f0e3462fb 699
bogdanm 66:9c8f0e3462fb 700 #define LPC_CRC ((LPC_CRC_TypeDef *) LPC_CRC_BASE )
bogdanm 66:9c8f0e3462fb 701 #define LPC_SCT ((LPC_SCT_TypeDef *) LPC_SCT_BASE )
bogdanm 66:9c8f0e3462fb 702
bogdanm 66:9c8f0e3462fb 703 #define LPC_GPIO_PORT ((LPC_GPIO_PORT_TypeDef *) LPC_GPIO_PORT_BASE )
bogdanm 66:9c8f0e3462fb 704 #define LPC_PIN_INT ((LPC_PIN_INT_TypeDef *) LPC_PIN_INT_BASE )
bogdanm 66:9c8f0e3462fb 705
bogdanm 66:9c8f0e3462fb 706 #ifdef __cplusplus
bogdanm 66:9c8f0e3462fb 707 }
bogdanm 66:9c8f0e3462fb 708 #endif
bogdanm 66:9c8f0e3462fb 709
bogdanm 66:9c8f0e3462fb 710 #endif /* __LPC8xx_H__ */