From fcb71c37bc3f5af96d037b084486dfb3b156f0fb Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 1 Oct 2008 23:34:27 +0000 Subject: [PATCH] Integrating LPC214x USB driver git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@970 42af7a65-404d-4744-a932-0658087f49c3 --- configs/mcu123-lpc214x/include/board.h | 18 +++++++++++++----- configs/mcu123-lpc214x/nsh/defconfig | 8 ++++---- configs/mcu123-lpc214x/ostest/defconfig | 8 ++++---- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/configs/mcu123-lpc214x/include/board.h b/configs/mcu123-lpc214x/include/board.h index 080b06abe0..e860cbb5ec 100644 --- a/configs/mcu123-lpc214x/include/board.h +++ b/configs/mcu123-lpc214x/include/board.h @@ -50,12 +50,20 @@ /* Clocking *****************************************************************/ -#define LPC214X_FOSC 12000000 -#define LPC214X_PLL_M 5 -#define LPC214X_MSEL (PLL_M-1) -#define LPC214X_PLL_P 2 +/* Oscillator frequency */ -#define LPC214X_PCLKFREQ (LPC214X_FOSC/4) /* PCLK must be FOSC/4 */ +#define LPC214X_FOSC 12000000 + +/* PLL0 settings CCLK = PLL_M * FOSC PCLK = CCLK/APBDIV */ + +#define LPC214X_PLL_M 5 +#define LPC214X_PLL_P 2 +#define LPC214X_APB_DIV 1 + +/* USB Pll settings -- 48 MHz needed. FUSB = PLL_M FOSC */ + +#define LPC214X_USBPLL_M 4 +#define LPC214X_USBPLL_P 2 /* LED definitions **********************************************************/ diff --git a/configs/mcu123-lpc214x/nsh/defconfig b/configs/mcu123-lpc214x/nsh/defconfig index 8c0cb137e9..3dec91a3a2 100644 --- a/configs/mcu123-lpc214x/nsh/defconfig +++ b/configs/mcu123-lpc214x/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_CHIP=lpc214x CONFIG_ARCH_LPC2148=y CONFIG_ARCH_BOARD=mcu123-lpc214x CONFIG_ARCH_BOARD_MCU123=y -CONFIG_BOARD_LOOPSPERMSEC=4327 +CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y CONFIG_DRAM_SIZE=0x00008000 CONFIG_DRAM_START=0x40000000 @@ -72,7 +72,7 @@ CONFIG_RAM_MODE=n CONFIG_CODE_BASE=0x00000000 CONFIG_PLL_SETUP=y CONFIG_MAM_SETUP=y -CONFIG_VPBDIV_SETUP=y +CONFIG_APBDIV_SETUP=y CONFIG_EMC_SETUP=n CONFIG_BCFG0_SETUP=n CONFIG_BCFG1_SETUP=n @@ -170,8 +170,8 @@ CONFIG_RR_INTERVAL=0 CONFIG_SCHED_INSTRUMENTATION=n CONFIG_TASK_NAME_SIZE=0 CONFIG_START_YEAR=2008 -CONFIG_START_MONTH=9 -CONFIG_START_DAY=17 +CONFIG_START_MONTH=10 +CONFIG_START_DAY=1 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y CONFIG_DEV_LOWCONSOLE=n diff --git a/configs/mcu123-lpc214x/ostest/defconfig b/configs/mcu123-lpc214x/ostest/defconfig index 1d284076ba..4a1e381939 100644 --- a/configs/mcu123-lpc214x/ostest/defconfig +++ b/configs/mcu123-lpc214x/ostest/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_CHIP=lpc214x CONFIG_ARCH_LPC2148=y CONFIG_ARCH_BOARD=mcu123-lpc214x CONFIG_ARCH_BOARD_MCU123=y -CONFIG_BOARD_LOOPSPERMSEC=4327 +CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y CONFIG_DRAM_SIZE=0x00008000 CONFIG_DRAM_START=0x40000000 @@ -72,7 +72,7 @@ CONFIG_RAM_MODE=n CONFIG_CODE_BASE=0x00000000 CONFIG_PLL_SETUP=y CONFIG_MAM_SETUP=y -CONFIG_VPBDIV_SETUP=y +CONFIG_APBDIV_SETUP=y CONFIG_EMC_SETUP=n CONFIG_BCFG0_SETUP=n CONFIG_BCFG1_SETUP=n @@ -170,8 +170,8 @@ CONFIG_RR_INTERVAL=0 CONFIG_SCHED_INSTRUMENTATION=n CONFIG_TASK_NAME_SIZE=0 CONFIG_START_YEAR=2008 -CONFIG_START_MONTH=9 -CONFIG_START_DAY=17 +CONFIG_START_MONTH=10 +CONFIG_START_DAY=1 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y CONFIG_DEV_LOWCONSOLE=y