CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LPC2xxx System
Collaboration diagram for LPC2xxx System:

Modules

 APB(ARM Peripheral Bus) peripheries registers addresses
 LPC2xxx System etc periphirals
 NXP PLCK divider NXP PCLK Peripheral Clock devider -> PLCK divider (VPB bus clock dividers) Bit1 Bit0 Description 0 0 cclk/4 (1/4 From CPU CLOCK) 0 1 cclk/1 (No division) 1 0 cclk/2 (1/2 From CPU CLOCK) 1 1 cclk/6 or cclk/8.
 CMSIS Core Definitions for LPC2xxx
 This file defines all structures and symbols for CMSIS core:
 LPC2xxx IRQ Numbers
 APB(ARM Peripheral Bus) peripheries base addresses

Files

file  LPC2xxx.h
 APB(ARM Peripheral Bus) peripheries registers CMSIS like style.
file  system_LPC2xxx.c
 CMSIS like Device Peripheral Access Layer system.c Source File for the NXP LPC2xxx Device Series.
file  system_LPC2xxx_ISR.c
 Interrupt functions for CMSIS Device Peripheral Access Layer for the NXP LPC2xxx Device Series.

Macros

#define SystemVIC_ClearISR(IRQn)   SystemVIC_SetISR(NULL,IRQn,-1)
 This macro will clear ISR.

Functions

__STATIC_INLINE ISR_ptr_type GET_ISR_HANDLER_BY_NUMBER (const IRQn_Type IRQn)
__STATIC_INLINE void NVIC_DisableIRQ (IRQn_Type IRQn)
 Disable External Interrupt.
void NVIC_EnableIRQ (IRQn_Type IRQn)
 Enable External Interrupt.
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping (void)
 Get Priority Grouping.
__STATIC_INLINE void NVIC_SetPriority (IRQn_Type IRQn, uint32_t priority)
 Set Interrupt Priority.
__STATIC_INLINE void NVIC_SetPriorityGrouping (uint32_t PriorityGroup)
 Set Priority Grouping.
void SystemInit (void)
 Initialize the system.
void SystemVIC_Init (void)
 Initialize the system VIC.
uint32_t SysTick_Config (uint32_t ticks)
 System Tick Configuration.

Variables

const ISR_ptr_type ISR_HANDLES_ARRAY []
void *SystemVIC_SetISR isr_func MOVE_CODE_TO_FLASH
 Setup and turn on Interrupt in VIC.
const char sizeof_ISR_HANDLES_ARRAY
uint32_t SystemCoreClock

Detailed Description

Macro Definition Documentation

#define SystemVIC_ClearISR (   IRQn)    SystemVIC_SetISR(NULL,IRQn,-1)

This macro will clear ISR.

Parameters
[in]IRQnNumber of the interrupt for set priority

Definition at line 108 of file system_LPC2xxx.h.

Function Documentation

__STATIC_INLINE ISR_ptr_type GET_ISR_HANDLER_BY_NUMBER ( const IRQn_Type  IRQn)

Definition at line 1807 of file LPC2xxx.h.

References ISR_HANDLES_ARRAY, NULL, and sizeof_ISR_HANDLES_ARRAY.

Referenced by NVIC_EnableIRQ().

Here is the caller graph for this function:

__STATIC_INLINE void NVIC_DisableIRQ ( IRQn_Type  IRQn)

Disable External Interrupt.

The function enables a device-specific interrupt in the NVIC interrupt controller.

Parameters
[in]IRQnExternal interrupt number. Value cannot be negative.

Definition at line 1847 of file LPC2xxx.h.

References VIC.

void NVIC_EnableIRQ ( IRQn_Type  IRQn)

Enable External Interrupt.

The function enables a device-specific interrupt in the NVIC interrupt controller.

Parameters
[in]IRQnExternal interrupt number. Value cannot be negative.

Definition at line 500 of file core_cm0.h.

References GET_ISR_HANDLER_BY_NUMBER(), NULL, NVIC, SystemVIC_SetISR(), and VIC.

Here is the call graph for this function:

__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping ( void  )

Get Priority Grouping.

The function only for compatibility PriorityGroup == 7 is supported only

Returns
Always 7

Definition at line 1873 of file LPC2xxx.h.

__STATIC_INLINE void NVIC_SetPriority ( IRQn_Type  IRQn,
uint32_t  priority 
)

Set Interrupt Priority.

The function sets the priority of an interrupt.

Note
The priority cannot be set for every core interrupt.
Parameters
[in]IRQnInterrupt number.
[in]priorityPriority to set.

Definition at line 1823 of file LPC2xxx.h.

References sizeof_ISR_HANDLES_ARRAY, and VIC.

__STATIC_INLINE void NVIC_SetPriorityGrouping ( uint32_t  PriorityGroup)

Set Priority Grouping.

The function only for compatibility PriorityGroup == 7 is supported only

Parameters
[in]PriorityGroupPriority grouping field.

Definition at line 1861 of file LPC2xxx.h.

void SystemInit ( void  )

Initialize the system.

Parameters
none
Returns
none

Setup the microcontroller system. Initialize the System and update the SystemCoreClock variable.

Parameters
none
Returns
none

Setup the microcontroller system. Initialize the System.

Returns
none

Setup the microcontroller system. Initialize the System and update the SystemCoreClock variable.

Definition at line 61 of file system_ARMCM0.c.

References __isr_vector, __SYSTEM_CLOCK, CCLKCFG_Val, CLKOUTCFG_Val, CLKSRCSEL_Val, FLASHCFG_Val, LPC_SC, PCLKSEL0_Val, PCLKSEL1_Val, PCONP_Val, PLL0CFG_Val, PLL1CFG_Val, SCB, SCS_Val, SystemCoreClock, and USBCLKCFG_Val.

void SystemVIC_Init ( void  )

Initialize the system VIC.

Returns
none

Setup the microcontroller VIC system. Initialize the VIC and reset all previous VIC interrupts.

Definition at line 360 of file system_LPC2xxx.c.

References SystemVIC_SetISR(), VIC, VIC_DEFAULT_ISR, and VIC_MAX_IRQ_NUMBER.

Here is the call graph for this function:

uint32_t SysTick_Config ( uint32_t  ticks)

System Tick Configuration.

The function initializes the System Timer and its interrupt, and starts the System Tick Timer. Counter is in free running mode to generate periodic interrupts.

Parameters
[in]ticksNumber of ticks between two interrupts.
Returns
0 Function succeeded.
1 Function failed.
Note
When the variable __Vendor_SysTickConfig is set to 1, then the function SysTick_Config is not included. In this case, the file device.h must contain a vendor-specific implementation of this function.

Definition at line 641 of file core_cm0.h.

References __NVIC_PRIO_BITS, NVIC_SetPriority(), SysTick, SysTick_CTRL_CLKSOURCE_Msk, SysTick_CTRL_ENABLE_Msk, SysTick_CTRL_TICKINT_Msk, SysTick_IRQn, and SysTick_LOAD_RELOAD_Msk.

Here is the call graph for this function:

Variable Documentation

const ISR_ptr_type ISR_HANDLES_ARRAY[]

Definition at line 453 of file system_LPC2xxx.c.

Referenced by GET_ISR_HANDLER_BY_NUMBER().

void* SystemVIC_SetISR isr_func MOVE_CODE_TO_FLASH

Setup and turn on Interrupt in VIC.

Set Interrupt Priority

This function sets the priority for the specified interrupt. The interrupt number can be positive to specify an external (device specific) interrupt, or negative to specify an internal (core) interrupt.

Note: The priority cannot be set for every core interrupt.

Parameters
[in]*isr_funcISR_HANDLER))' pointer to ISR function
[in]IRQnNumber of the interrupt for set priority
[in]priorityThe priority of ISR if priority is negative then ISR is disabled so SystemVIC_SetISR(NULL,IRQn,-1) will clear ISR
const char sizeof_ISR_HANDLES_ARRAY

Definition at line 525 of file system_LPC2xxx.c.

Referenced by GET_ISR_HANDLER_BY_NUMBER(), and NVIC_SetPriority().

uint32_t SystemCoreClock

System Clock Frequency (Core Clock)

Definition at line 39 of file system_ARMCM0.c.