22 #ifndef LIBBSP_ARM_LPC32XX_LPC32XX_H    23 #define LIBBSP_ARM_LPC32XX_LPC32XX_H    49 #define LPC32XX_BASE_ADC 0x40048000    50 #define LPC32XX_BASE_SYSCON 0x40004000    51 #define LPC32XX_BASE_DEBUG_CTRL 0x40040000    52 #define LPC32XX_BASE_DMA 0x31000000    53 #define LPC32XX_BASE_EMC 0x31080000    54 #define LPC32XX_BASE_EMC_CS_0 0xe0000000    55 #define LPC32XX_BASE_EMC_CS_1 0xe1000000    56 #define LPC32XX_BASE_EMC_CS_2 0xe2000000    57 #define LPC32XX_BASE_EMC_CS_3 0xe3000000    58 #define LPC32XX_BASE_EMC_DYCS_0 0x80000000    59 #define LPC32XX_BASE_EMC_DYCS_1 0xa0000000    60 #define LPC32XX_BASE_ETB_CFG 0x310c0000    61 #define LPC32XX_BASE_ETB_DATA 0x310e0000    62 #define LPC32XX_BASE_ETHERNET 0x31060000    63 #define LPC32XX_BASE_GPIO 0x40028000    64 #define LPC32XX_BASE_I2C_1 0x400a0000    65 #define LPC32XX_BASE_I2C_2 0x400a8000    66 #define LPC32XX_BASE_I2S_0 0x20094000    67 #define LPC32XX_BASE_I2S_1 0x2009c000    68 #define LPC32XX_BASE_IRAM 0x08000000    69 #define LPC32XX_BASE_IROM 0x0c000000    70 #define LPC32XX_BASE_KEYSCAN 0x40050000    71 #define LPC32XX_BASE_LCD 0x31040000    72 #define LPC32XX_BASE_MCPWM 0x400e8000    73 #define LPC32XX_BASE_MIC 0x40008000    74 #define LPC32XX_BASE_NAND_MLC 0x200a8000    75 #define LPC32XX_BASE_NAND_SLC 0x20020000    76 #define LPC32XX_BASE_PWM_1 0x4005c000    77 #define LPC32XX_BASE_PWM_2 0x4005c004    78 #define LPC32XX_BASE_PWM_3 0x4002c000    79 #define LPC32XX_BASE_PWM_4 0x40030000    80 #define LPC32XX_BASE_RTC 0x40024000    81 #define LPC32XX_BASE_RTC_RAM 0x40024080    82 #define LPC32XX_BASE_SDCARD 0x20098000    83 #define LPC32XX_BASE_SIC_1 0x4000c000    84 #define LPC32XX_BASE_SIC_2 0x40010000    85 #define LPC32XX_BASE_SPI_1 0x20088000    86 #define LPC32XX_BASE_SPI_2 0x20090000    87 #define LPC32XX_BASE_SSP_0 0x20084000    88 #define LPC32XX_BASE_SSP_1 0x2008c000    89 #define LPC32XX_BASE_TIMER_0 0x40044000    90 #define LPC32XX_BASE_TIMER_1 0x4004c000    91 #define LPC32XX_BASE_TIMER_2 0x40058000    92 #define LPC32XX_BASE_TIMER_3 0x40060000    93 #define LPC32XX_BASE_TIMER_5 0x4002c000    94 #define LPC32XX_BASE_TIMER_6 0x40030000    95 #define LPC32XX_BASE_TIMER_HS 0x40038000    96 #define LPC32XX_BASE_TIMER_MS 0x40034000    97 #define LPC32XX_BASE_UART_1 0x40014000    98 #define LPC32XX_BASE_UART_2 0x40018000    99 #define LPC32XX_BASE_UART_3 0x40080000   100 #define LPC32XX_BASE_UART_4 0x40088000   101 #define LPC32XX_BASE_UART_5 0x40090000   102 #define LPC32XX_BASE_UART_6 0x40098000   103 #define LPC32XX_BASE_UART_7 0x4001c000   104 #define LPC32XX_BASE_USB 0x31020000   105 #define LPC32XX_BASE_USB_OTG_I2C 0x31020300   106 #define LPC32XX_BASE_WDT 0x4003c000   116 #define LPC32XX_U3CLK (*(volatile uint32_t *) 0x400040d0)   117 #define LPC32XX_U4CLK (*(volatile uint32_t *) 0x400040d4)   118 #define LPC32XX_U5CLK (*(volatile uint32_t *) 0x400040d8)   119 #define LPC32XX_U6CLK (*(volatile uint32_t *) 0x400040dc)   120 #define LPC32XX_IRDACLK (*(volatile uint32_t *) 0x400040e0)   121 #define LPC32XX_UART_CTRL (*(volatile uint32_t *) 0x40054000)   122 #define LPC32XX_UART_CLKMODE (*(volatile uint32_t *) 0x40054004)   123 #define LPC32XX_UART_LOOP (*(volatile uint32_t *) 0x40054008)   124 #define LPC32XX_SW_INT (*(volatile uint32_t *) 0x400040a8)   125 #define LPC32XX_MAC_CLK_CTRL (*(volatile uint32_t *) 0x40004090)   126 #define LPC32XX_USB_DIV (*(volatile uint32_t *) 0x4000401c)   127 #define LPC32XX_OTG_CLK_CTRL (*(volatile uint32_t *) 0x31020ff4)   128 #define LPC32XX_OTG_CLK_STAT (*(volatile uint32_t *) 0x31020ff8)   129 #define LPC32XX_OTG_STAT_CTRL (*(volatile uint32_t *) 0x31020110)   130 #define LPC32XX_I2C_RX (*(volatile uint32_t *) 0x31020300)   131 #define LPC32XX_I2C_TX (*(volatile uint32_t *) 0x31020300)   132 #define LPC32XX_I2C_STS (*(volatile uint32_t *) 0x31020304)   133 #define LPC32XX_I2C_CTL (*(volatile uint32_t *) 0x31020308)   134 #define LPC32XX_I2C_CLKHI (*(volatile uint32_t *) 0x3102030c)   135 #define LPC32XX_I2C_CLKLO (*(volatile uint32_t *) 0x31020310)   136 #define LPC32XX_PWR_CTRL (*(volatile uint32_t *) 0x40004044)   137 #define LPC32XX_OSC_CTRL (*(volatile uint32_t *) 0x4000404c)   138 #define LPC32XX_SYSCLK_CTRL (*(volatile uint32_t *) 0x40004050)   139 #define LPC32XX_PLL397_CTRL (*(volatile uint32_t *) 0x40004048)   140 #define LPC32XX_HCLKPLL_CTRL (*(volatile uint32_t *) 0x40004058)   141 #define LPC32XX_HCLKDIV_CTRL (*(volatile uint32_t *) 0x40004040)   142 #define LPC32XX_TEST_CLK (*(volatile uint32_t *) 0x400040a4)   143 #define LPC32XX_AUTOCLK_CTRL (*(volatile uint32_t *) 0x400040ec)   144 #define LPC32XX_START_ER_PIN (*(volatile uint32_t *) 0x40004030)   145 #define LPC32XX_START_ER_INT (*(volatile uint32_t *) 0x40004020)   146 #define LPC32XX_P0_INTR_ER (*(volatile uint32_t *) 0x40004018)   147 #define LPC32XX_START_SR_PIN (*(volatile uint32_t *) 0x40004038)   148 #define LPC32XX_START_SR_INT (*(volatile uint32_t *) 0x40004028)   149 #define LPC32XX_START_RSR_PIN (*(volatile uint32_t *) 0x40004034)   150 #define LPC32XX_START_RSR_INT (*(volatile uint32_t *) 0x40004024)   151 #define LPC32XX_START_APR_PIN (*(volatile uint32_t *) 0x4000403c)   152 #define LPC32XX_START_APR_INT (*(volatile uint32_t *) 0x4000402c)   153 #define LPC32XX_USB_CTRL (*(volatile uint32_t *) 0x40004064)   154 #define LPC32XX_USBDIV_CTRL (*(volatile uint32_t *) 0x4000401c)   155 #define LPC32XX_MS_CTRL (*(volatile uint32_t *) 0x40004080)   156 #define LPC32XX_DMACLK_CTRL (*(volatile uint32_t *) 0x400040e8)   157 #define LPC32XX_FLASHCLK_CTRL (*(volatile uint32_t *) 0x400040c8)   158 #define LPC32XX_MACCLK_CTRL (*(volatile uint32_t *) 0x40004090)   159 #define LPC32XX_LCDCLK_CTRL (*(volatile uint32_t *) 0x40004054)   160 #define LPC32XX_I2S_CTRL (*(volatile uint32_t *) 0x4000407c)   161 #define LPC32XX_SSP_CTRL (*(volatile uint32_t *) 0x40004078)   162 #define LPC32XX_SPI_CTRL (*(volatile uint32_t *) 0x400040c4)   163 #define LPC32XX_I2CCLK_CTRL (*(volatile uint32_t *) 0x400040ac)   164 #define LPC32XX_TIMCLK_CTRL1 (*(volatile uint32_t *) 0x400040c0)   165 #define LPC32XX_TIMCLK_CTRL (*(volatile uint32_t *) 0x400040bc)   166 #define LPC32XX_ADCLK_CTRL (*(volatile uint32_t *) 0x400040b4)   167 #define LPC32XX_ADCLK_CTRL1 (*(volatile uint32_t *) 0x40004060)   168 #define LPC32XX_KEYCLK_CTRL (*(volatile uint32_t *) 0x400040b0)   169 #define LPC32XX_PWMCLK_CTRL (*(volatile uint32_t *) 0x400040b8)   170 #define LPC32XX_UARTCLK_CTRL (*(volatile uint32_t *) 0x400040e4)   171 #define LPC32XX_POS0_IRAM_CTRL (*(volatile uint32_t *) 0x40004110)   172 #define LPC32XX_POS1_IRAM_CTRL (*(volatile uint32_t *) 0x40004114)   173 #define LPC32XX_SDRAMCLK_CTRL (*(volatile uint32_t *) 0x40004068)   183 #define PWR_STOP BSP_BIT32(0)   184 #define PWR_HIGHCORE_ALWAYS BSP_BIT32(1)   185 #define PWR_NORMAL_RUN_MODE BSP_BIT32(2)   186 #define PWR_SYSCLKEN_ALWAYS BSP_BIT32(3)   187 #define PWR_SYSCLKEN_HIGH BSP_BIT32(4)   188 #define PWR_HIGHCORE_HIGH BSP_BIT32(5)   189 #define PWR_SDRAM_AUTO_REFRESH BSP_BIT32(7)   190 #define PWR_UPDATE_EMCSREFREQ BSP_BIT32(8)   191 #define PWR_EMCSREFREQ BSP_BIT32(9)   192 #define PWR_HCLK_USES_PERIPH_CLK BSP_BIT32(10)   202 #define HCLK_PLL_LOCK BSP_BIT32(0)   203 #define HCLK_PLL_M(val) BSP_FLD32(val, 1, 8)   204 #define HCLK_PLL_M_GET(reg) BSP_FLD32GET(reg, 1, 8)   205 #define HCLK_PLL_N(val) BSP_FLD32(val, 9, 10)   206 #define HCLK_PLL_N_GET(reg) BSP_FLD32GET(reg, 9, 10)   207 #define HCLK_PLL_P(val) BSP_FLD32(val, 11, 12)   208 #define HCLK_PLL_P_GET(reg) BSP_FLD32GET(reg, 11, 12)   209 #define HCLK_PLL_FBD_FCLKOUT BSP_BIT32(13)   210 #define HCLK_PLL_DIRECT BSP_BIT32(14)   211 #define HCLK_PLL_BYPASS BSP_BIT32(15)   212 #define HCLK_PLL_POWER BSP_BIT32(16)   222 #define HCLK_DIV_HCLK(val) BSP_FLD32(val, 0, 1)   223 #define HCLK_DIV_HCLK_GET(reg) BSP_FLD32GET(reg, 0, 1)   224 #define HCLK_DIV_PERIPH_CLK(val) BSP_FLD32(val, 2, 6)   225 #define HCLK_DIV_PERIPH_CLK_GET(reg) BSP_FLD32GET(reg, 2, 6)   226 #define HCLK_DIV_DDRAM_CLK(val) BSP_FLD32(val, 7, 8)   227 #define HCLK_DIV_DDRAM_CLK_GET(reg) BSP_FLD32GET(reg, 7, 8)   237 #define TIMCLK_CTRL_WDT BSP_BIT32(0)   238 #define TIMCLK_CTRL_HST BSP_BIT32(1)   242 #define LPC32XX_FILL(a, b, s) uint8_t reserved_ ## b [b - a - sizeof(s)]   243 #define LPC32XX_RESERVE(a, b) uint8_t reserved_ ## b [b - a]   287 #define WDTTIM_INT_MATCH_INT BSP_BIT32(0)   297 #define WDTTIM_CTRL_COUNT_ENAB BSP_BIT32(0)   298 #define WDTTIM_CTRL_RESET_COUNT BSP_BIT32(1)   299 #define WDTTIM_CTRL_PAUSE_EN BSP_BIT32(2)   309 #define WDTTIM_MCTRL_MR0_INT BSP_BIT32(0)   310 #define WDTTIM_MCTRL_RESET_COUNT0 BSP_BIT32(1)   311 #define WDTTIM_MCTRL_STOP_COUNT0 BSP_BIT32(2)   312 #define WDTTIM_MCTRL_M_RES1 BSP_BIT32(3)   313 #define WDTTIM_MCTRL_M_RES2 BSP_BIT32(4)   314 #define WDTTIM_MCTRL_RESFRC1 BSP_BIT32(5)   315 #define WDTTIM_MCTRL_RESFRC2 BSP_BIT32(6)   325 #define WDTTIM_EMR_EXT_MATCH0 BSP_BIT32(0)   326 #define WDTTIM_EMR_MATCH_CTRL(val) BSP_FLD32(val, 4, 5)   327 #define WDTTIM_EMR_MATCH_CTRL_SET(reg, val) BSP_FLD32SET(reg, val, 4, 5)   337 #define WDTTIM_RES_WDT BSP_BIT32(0)   382   uint32_t reserved_0 [2];
   386   uint32_t reserved_1 [45];
   389   uint32_t rxdescriptor;
   391   uint32_t rxdescriptornum;
   392   uint32_t rxproduceindex;
   393   uint32_t rxconsumeindex;
   394   uint32_t txdescriptor;
   396   uint32_t txdescriptornum;
   397   uint32_t txproduceindex;
   398   uint32_t txconsumeindex;
   399   uint32_t reserved_2 [10];
   403   uint32_t reserved_3 [3];
   404   uint32_t flowcontrolcnt;
   405   uint32_t flowcontrolsts;
   406   uint32_t reserved_4 [34];
   407   uint32_t rxfilterctrl;
   408   uint32_t rxfilterwolsts;
   409   uint32_t rxfilterwolclr;
   410   uint32_t reserved_5 [1];
   411   uint32_t hashfilterl;
   412   uint32_t hashfilterh;
   413   uint32_t reserved_6 [882];
   418   uint32_t reserved_7 [1];
   432   uint32_t p3_inp_state;
   433   uint32_t p3_outp_set;
   434   uint32_t p3_outp_clr;
   435   uint32_t p3_outp_state;
   438   uint32_t p2_dir_state;
   439   uint32_t p2_inp_state;
   440   uint32_t p2_outp_set;
   441   uint32_t p2_outp_clr;
   444   uint32_t p2_mux_state;
   445   LPC32XX_RESERVE(0x034, 0x040);
   446   uint32_t p0_inp_state;
   447   uint32_t p0_outp_set;
   448   uint32_t p0_outp_clr;
   449   uint32_t p0_outp_state;
   452   uint32_t p0_dir_state;
   453   LPC32XX_RESERVE(0x05c, 0x060);
   454   uint32_t p1_inp_state;
   455   uint32_t p1_outp_set;
   456   uint32_t p1_outp_clr;
   457   uint32_t p1_outp_state;
   460   uint32_t p1_dir_state;
   461   LPC32XX_RESERVE(0x07c, 0x110);
   464   uint32_t p3_mux_state;
   465   LPC32XX_RESERVE(0x11c, 0x120);
   468   uint32_t p0_mux_state;
   469   LPC32XX_RESERVE(0x12c, 0x130);
   472   uint32_t p1_mux_state;
   505   uint32_t reserved_0 [5];
   514   uint32_t reserved_0 [8191];
   520   uint32_t reserved_1 [8191];
   525   uint32_t ecc_auto_enc;
   526   uint32_t ecc_auto_dec;
   531   uint32_t sw_wp_add_low;
   532   uint32_t sw_wp_add_hig;
   555   LPC32XX_FILL(0x20094000, 0x20098000, 
lpc_i2s);
   559   LPC32XX_FILL(0x2009c000, 0x200a8000, 
lpc_i2s);
   563   LPC32XX_FILL(0x31000000, 0x31020000, 
lpc_dma);
   571   LPC32XX_FILL(0x31080000, 0x31080400, 
lpc_emc);
   595   LPC32XX_FILL(0x4002c000, 0x40030000, 
lpc_timer);
   597   LPC32XX_FILL(0x40030000, 0x40034000, 
lpc_timer);
   607   LPC32XX_FILL(0x40044000, 0x40048000, 
lpc_timer);
   611   LPC32XX_FILL(0x4004c000, 0x40050000, 
lpc_timer);
   617   LPC32XX_FILL(0x40058000, 0x4005c000, 
lpc_timer);
   621   LPC32XX_FILL(0x40060000, 0x40080000, 
lpc_timer);
 Definition: lpc32xx.h:248
 
Definition: lpc32xx.h:257
 
Definition: lpc32xx.h:364
 
Definition: lpc32xx.h:367
 
I2S control block.
Definition: lpc-i2s.h:46
 
Timer control block.
Definition: lpc-timer.h:133
 
Definition: lpc32xx.h:431
 
Definition: lpc32xx.h:278
 
Definition: lpc32xx.h:508
 
Definition: lpc32xx.h:245
 
Definition: lpc32xx.h:275
 
Definition: lpc32xx.h:251
 
DMA control block.
Definition: lpc-dma.h:66
 
Definition: lpc32xx.h:263
 
Definition: lpc32xx.h:361
 
Definition: lpc32xx.h:358
 
Definition: lpc32xx.h:341
 
Definition: lpc32xx.h:272
 
Definition: intercom.c:74
 
Definition: lpc32xx.h:269
 
Definition: lpc32xx.h:260
 
Definition: lpc32xx.h:543
 
Definition: 8xx_immap.h:201
 
Definition: lpc32xx.h:352
 
Definition: lpc32xx.h:266
 
Definition: lpc-emc.h:135
 
Definition: lpc32xx.h:355
 
Definition: lpc32xx.h:422
 
Definition: lpc32xx.h:490
 
Definition: lpc32xx.h:501
 
Definition: lpc32xx.h:475
 
Definition: lpc32xx.h:254