MCB1700_Welcome
system_LPC17xx.c File Reference

CMSIS Device System Source File for NXP LPC17xx Device Series. More...

#include <stdint.h>
#include "LPC17xx.h"
Include dependency graph for system_LPC17xx.c:

Macros

#define CLOCK_SETUP   1
 
#define SCS_Val   0x00000020
 
#define CLKSRCSEL_Val   0x00000001
 
#define PLL0_SETUP   1
 
#define PLL0CFG_Val   0x00050063
 
#define PLL1_SETUP   1
 
#define PLL1CFG_Val   0x00000023
 
#define CCLKCFG_Val   0x00000003
 
#define USBCLKCFG_Val   0x00000000
 
#define PCLKSEL0_Val   0x00000000
 
#define PCLKSEL1_Val   0x00000000
 
#define PCONP_Val   0x042887DE
 
#define CLKOUTCFG_Val   0x00000000
 
#define FLASH_SETUP   1
 
#define FLASHCFG_Val   0x00004000
 
#define CHECK_RANGE(val, min, max)   ((val < min) || (val > max))
 
#define CHECK_RSVD(val, mask)   (val & mask)
 
#define XTAL   (12000000UL) /* Oscillator frequency */
 
#define OSC_CLK   ( XTAL) /* Main oscillator frequency */
 
#define RTC_CLK   ( 32768UL) /* RTC oscillator frequency */
 
#define IRC_OSC   ( 4000000UL) /* Internal RC oscillator frequency */
 
#define __M   (((PLL0CFG_Val ) & 0x7FFF) + 1)
 
#define __N   (((PLL0CFG_Val >> 16) & 0x00FF) + 1)
 
#define __FCCO(__F_IN)   ((2ULL * __M * __F_IN) / __N)
 
#define __CCLK_DIV   (((CCLKCFG_Val ) & 0x00FF) + 1)
 
#define __CORE_CLK   (__FCCO(OSC_CLK) / __CCLK_DIV)
 

Functions

void SystemCoreClockUpdate (void)
 
void SystemInit (void)
 

Variables

uint32_t SystemCoreClock = __CORE_CLK
 

Detailed Description

CMSIS Device System Source File for NXP LPC17xx Device Series.

Version
V1.14
Date
05. April 2016

Macro Definition Documentation

◆ __CCLK_DIV

#define __CCLK_DIV   (((CCLKCFG_Val ) & 0x00FF) + 1)

◆ __CORE_CLK

#define __CORE_CLK   (__FCCO(OSC_CLK) / __CCLK_DIV)

◆ __FCCO

#define __FCCO (   __F_IN)    ((2ULL * __M * __F_IN) / __N)

◆ __M

#define __M   (((PLL0CFG_Val ) & 0x7FFF) + 1)

◆ __N

#define __N   (((PLL0CFG_Val >> 16) & 0x00FF) + 1)

◆ CCLKCFG_Val

#define CCLKCFG_Val   0x00000003

◆ CHECK_RANGE

#define CHECK_RANGE (   val,
  min,
  max 
)    ((val < min) || (val > max))

◆ CHECK_RSVD

#define CHECK_RSVD (   val,
  mask 
)    (val & mask)

◆ CLKOUTCFG_Val

#define CLKOUTCFG_Val   0x00000000

◆ CLKSRCSEL_Val

#define CLKSRCSEL_Val   0x00000001

◆ CLOCK_SETUP

#define CLOCK_SETUP   1

◆ FLASH_SETUP

#define FLASH_SETUP   1

◆ FLASHCFG_Val

#define FLASHCFG_Val   0x00004000

◆ IRC_OSC

#define IRC_OSC   ( 4000000UL) /* Internal RC oscillator frequency */

◆ OSC_CLK

#define OSC_CLK   ( XTAL) /* Main oscillator frequency */

◆ PCLKSEL0_Val

#define PCLKSEL0_Val   0x00000000

◆ PCLKSEL1_Val

#define PCLKSEL1_Val   0x00000000

◆ PCONP_Val

#define PCONP_Val   0x042887DE

◆ PLL0_SETUP

#define PLL0_SETUP   1

◆ PLL0CFG_Val

#define PLL0CFG_Val   0x00050063

◆ PLL1_SETUP

#define PLL1_SETUP   1

◆ PLL1CFG_Val

#define PLL1CFG_Val   0x00000023

◆ RTC_CLK

#define RTC_CLK   ( 32768UL) /* RTC oscillator frequency */

◆ SCS_Val

#define SCS_Val   0x00000020

◆ USBCLKCFG_Val

#define USBCLKCFG_Val   0x00000000

◆ XTAL

#define XTAL   (12000000UL) /* Oscillator frequency */

Function Documentation

◆ SystemCoreClockUpdate()

void SystemCoreClockUpdate ( void  )

◆ SystemInit()

void SystemInit ( void  )

Variable Documentation

◆ SystemCoreClock

uint32_t SystemCoreClock = __CORE_CLK