资源简介
是芯片lpc1114的开发板的例程。是芯片lpc1114的开发板的例程。
代码片段和文件信息
/****************************************************************************
* $Id:: clkconfig.c 3635 2010-06-02 00:31:46Z usb00423 $
* Project: NXP LPC11xx Clock Configuration example
*
* Description:
* This file contains clock configuration code example which include
* watchdog setup and debug clock out setup.
*
****************************************************************************
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
* products. This software is supplied “AS IS“ without any warranties.
* NXP Semiconductors assumes no responsibility or liability for the
* use of the software conveys no license or title under any patent
* copyright or mask work right to the product. NXP Semiconductors
* reserves the right to make changes in the software without
* notification. NXP Semiconductors also make no representation or
* warranty that such application will be suitable for the specified
* use without further testing or modification.
****************************************************************************/
#include “LPC11xx.h“
#include “clkconfig.h“
/*****************************************************************************
** Function name: WDT_CLK_Setup
**
** Descriptions: Configure WDT clock.
** parameters: clock source: irc_osc(0) main_clk(1) wdt_osc(2).
**
** Returned value: None
**
*****************************************************************************/
void WDT_CLK_Setup ( uint32_t clksrc )
{
/* Watchdog configuration. */
/* Freq = 0.5Mhz div_sel is 0 divided by 2. WDT_OSC should be 250khz */
LPC_SYSCON->WDTOSCCTRL = (0x5<<5)|0x00;
LPC_SYSCON->WDTCLKSEL = clksrc; /* Select clock source */
LPC_SYSCON->WDTCLKUEN = 0x01; /* Update clock */
LPC_SYSCON->WDTCLKUEN = 0x00; /* Toggle update register once */
LPC_SYSCON->WDTCLKUEN = 0x01;
while ( !(LPC_SYSCON->WDTCLKUEN & 0x01) ); /* Wait until updated */
LPC_SYSCON->WDTCLKDIV = 1; /* Divided by 1 */
LPC_SYSCON->PDRUNCFG &= ~(0x1<<6); /* Let WDT clock run */
return;
}
/*****************************************************************************
** Function name: CLKOUT_Setup
**
** Descriptions: Configure CLKOUT for reference clock check.
** parameters: clock source: irc_osc(0) sys_osc(1) wdt_osc(2)
** main_clk(3).
**
** Returned value: None
**
*****************************************************************************/
void CLKOUT_Setup ( uint32_t clksrc )
{
/* debug PLL after configuration. */
LPC_SYSCON->CLKOUTCLKSEL = clksrc; /* Select Main clock */
LPC_SYSCON->CLKOUTUEN = 0x01; /* Update clock */
LPC_SYSCON->CLKOUTUEN = 0x00; /* Toggle update register once */
LPC_SYSCON->CLKOUTUEN = 0x01;
while ( !(LPC_SYSCON->CLKOUTUEN & 0x01) ); /* Wait unt
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3082 2010-06-01 17:33 TFT_LCD_ILI9325_LPC11XX_TOUCH\clkconfig.c
文件 75 2010-09-04 11:17 TFT_LCD_ILI9325_LPC11XX_TOUCH\code.crf
文件 23 2010-09-04 11:17 TFT_LCD_ILI9325_LPC11XX_TOUCH\code.d
文件 158504 2010-09-04 11:17 TFT_LCD_ILI9325_LPC11XX_TOUCH\code.o
文件 15913 2009-04-09 15:42 TFT_LCD_ILI9325_LPC11XX_TOUCH\core_cm0.c
文件 3166 2010-09-04 11:22 TFT_LCD_ILI9325_LPC11XX_TOUCH\core_cm0.crf
文件 68 2010-09-04 11:22 TFT_LCD_ILI9325_LPC11XX_TOUCH\core_cm0.d
文件 26754 2009-05-26 10:30 TFT_LCD_ILI9325_LPC11XX_TOUCH\core_cm0.h
文件 7996 2010-09-04 11:22 TFT_LCD_ILI9325_LPC11XX_TOUCH\core_cm0.o
文件 588846 2010-01-24 16:12 TFT_LCD_ILI9325_LPC11XX_TOUCH\Jli
文件 34323 2010-09-04 11:22 TFT_LCD_ILI9325_LPC11XX_TOUCH\lcd_demo.crf
文件 375 2010-09-04 11:22 TFT_LCD_ILI9325_LPC11XX_TOUCH\lcd_demo.d
文件 41012 2010-09-04 11:22 TFT_LCD_ILI9325_LPC11XX_TOUCH\lcd_demo.o
文件 31705 2011-11-27 13:00 TFT_LCD_ILI9325_LPC11XX_TOUCH\LPC11xx.h
文件 27215 2011-11-27 14:01 TFT_LCD_ILI9325_LPC11XX_TOUCH\lst\startup_LPC11xx.lst
文件 33974 2010-01-27 17:38 TFT_LCD_ILI9325_LPC11XX_TOUCH\lst\startup_LPC13xx.lst
文件 31670 2010-01-24 15:24 TFT_LCD_ILI9325_LPC11XX_TOUCH\lst\startup_LPC17xx.lst
文件 51494 2011-11-27 14:02 TFT_LCD_ILI9325_LPC11XX_TOUCH\lst\TTF_LCD.map
文件 55361 2009-10-09 15:52 TFT_LCD_ILI9325_LPC11XX_TOUCH\lst\TTF_LCD_0x2000.map
文件 75 2011-11-27 14:01 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\code.crf
文件 29 2011-11-27 14:01 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\code.d
文件 158428 2011-11-27 14:01 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\code.o
文件 3165 2011-11-27 14:01 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\core_cm0.crf
文件 79 2011-11-27 14:01 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\core_cm0.d
文件 7928 2011-11-27 14:01 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\core_cm0.o
文件 3172 2010-01-27 17:38 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\core_cm3.crf
文件 86 2010-01-27 17:38 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\core_cm3.d
文件 8196 2010-01-27 17:38 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\core_cm3.o
文件 19 2011-11-27 13:52 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\ExtDll.iex
文件 395 2011-11-27 14:01 TFT_LCD_ILI9325_LPC11XX_TOUCH\obj\font_data.crf
............此处省略86个文件信息
- 上一篇:Puzzler.2.05电脑上玩魔方绿色版
- 下一篇:cad文字统计
评论
共有 条评论