LPCOpen Platform for LPC18XX/43XX microcontrollers: CHIP: LPC18xx/43xx support functions

| LPCOpen Platform for LPC18XX/43XX microcontrollers 18XX43XX LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers

- Main Page
- Modules
- Data Structures
- Files

Functions | Variables
CHIP: LPC18xx/43xx support functions
LPC18xx/43xx chip specific drivers

## Detailed Description

## Functions
void | SystemCoreClockUpdate (void)
| Update system core clock rate, should be called if the system has a clock rate change. More...
void | Chip_USB0_Init (void)
| USB0 Pin and clock initialization Calling this function will initialize the USB0 pins and the clock. More...
void | Chip_USB1_Init (void)
| USB1 Pin and clock initialization Calling this function will initialize the USB0 pins and the clock. More...
void | Chip_SystemInit (void)
| Set up and initialize hardware prior to call to main() More...
void | Chip_SetupCoreClock (CHIP_CGU_CLKIN_T clkin, uint32_t core_freq, bool setbase)
| Clock and PLL initialization based input given in clkin. More...
void | Chip_SetupXtalClocking (void)
| Clock and PLL initialization based on the external oscillator. More...
void | Chip_SetupIrcClocking (void)
| Clock and PLL initialization based on the internal oscillator. More...

## Variables
uint32_t | SystemCoreClock
| Current system clock rate, mainly used for sysTick. More...

## Function Documentation

void Chip_SetupCoreClock | ( | CHIP_CGU_CLKIN_T | clkin,
|  | uint32_t | core_freq,
|  | bool | setbase
| ) |  |

Clock and PLL initialization based input given in clkin.

Parameters

  clkin | : Input reference clock to PLL1 (MAINPLL) see CHIP_CGU_CLKIN_T
  core_freq | : Desired output frequency of the PLL1 (Base clock to CPU Core)
  setbase | : Setup default base clock of peripherals (see notes)

Returns
  None

Note
  This API will initialize the MAINPLL (PLL1) to the frequency given by core_freq, and will use this PLL's output as the base clock for CPU Core. If clkin is CLKIN_CRYSTAL then External Crystal Oscillator of frequency 12MHz will be used as the input reference clock to PLL1.
  Parameter setbase if true will set APB[1,3], SSP[0,1], UART[0,1,2,3], SPI base clocks to MAINPLL's output clock. If setbase is false then the base clock settings for the peripherals will not be modified, only CPU Core's base clock will be updated to use clock generated by PLL1.

Definition at line 81 of file sysinit_18xx_43xx.c.

void Chip_SetupIrcClocking | ( | void |  | ) |

Clock and PLL initialization based on the internal oscillator.

Returns
  None

Note
  This API will initialize the MAINPLL (PLL1) to the maximum frequency (180MHz[LPC18xx] or 204MHz[LPC43xx]) and uses this PLL's output as the base clock for CPU Core. Internal RC Oscillator will be used as the input reference clock to PLL1.

Definition at line 152 of file sysinit_18xx_43xx.c.

void Chip_SetupXtalClocking | ( | void |  | ) |

Clock and PLL initialization based on the external oscillator.

Returns
  None

Note
  This API will initialize the MAINPLL (PLL1) to the maximum frequency (180MHz[LPC18xx] or 204MHz[LPC43xx]) and uses this PLL's output as the base clock for CPU Core. External Crystal Oscillator of frequency 12MHz will be used as the input reference clock to PLL1.

Definition at line 146 of file sysinit_18xx_43xx.c.

void Chip_SystemInit | ( | void |  | ) |

Set up and initialize hardware prior to call to main()

Returns
  None

Note
  Chip_SystemInit() is called prior to the application and sets up system clocking prior to the application starting.

Definition at line 158 of file sysinit_18xx_43xx.c.

void Chip_USB0_Init | ( | void |  | ) |

USB0 Pin and clock initialization Calling this function will initialize the USB0 pins and the clock.

Note
  This function will assume that the chip is clocked by an external crystal oscillator of frequency 12MHz

Definition at line 76 of file chip_18xx_43xx.c.

void Chip_USB1_Init | ( | void |  | ) |

USB1 Pin and clock initialization Calling this function will initialize the USB0 pins and the clock.

Note
  This function will assume that the chip is clocked by an external crystal oscillator of frequency 12MHz

Definition at line 91 of file chip_18xx_43xx.c.

void SystemCoreClockUpdate | ( | void |  | ) |

Update system core clock rate, should be called if the system has a clock rate change.

Returns
  None

Definition at line 113 of file chip_18xx_43xx.c.

## Variable Documentation

uint32_t SystemCoreClock

Current system clock rate, mainly used for sysTick.

Definition at line 50 of file chip_18xx_43xx.c.