Download UM10601 LPC81x User manual

Transcript
UM10601
NXP Semiconductors
Chapter 4: LPC81x System configuration (SYSCON)
2. Select the PLL input in the SYSPLLCLKSEL register. You have the following input
options:
– IRC: 12 MHz internal oscillator.
– System oscillator: External crystal oscillator using the XTALIN/XTALOUT pins.
– External clock input CLKIN. Select this pin through the switch matrix.
Section 4.6.8 “System PLL clock source select register”
3. Update the PLL clock source in the SYSPLLCLKUEN register.
Section 4.6.9 “System PLL clock source update register”
4. Configure the PLL M and N dividers.
Section 4.6.3 “System PLL control register”
5. Wait for the PLL to lock by monitoring the PLL lock status.
Section 4.6.4 “System PLL status register”
4.3.2 Configure the main clock and system clock
The clock source for the registers and memories is derived from main clock. The main
clock can be sourced from the IRC at a fixed clock frequency of 12 MHz or from the PLL.
The divided main clock is called the system clock and clocks the core, the memories, and
the peripherals (register interfaces and peripheral clocks).
1. Select the main clock. You have the following options:
– IRC: 12 MHz internal oscillator (default).
– PLL output: You must configure the PLL to use the PLL output.
Section 4.6.10 “Main clock source select register”
2. Update the main clock source.
Section 4.6.11 “Main clock source update enable register”
3. Select the divider value for the system clock. A divider value of 0 disables the system
clock.
Section 4.6.12 “System clock divider register”
4. Select the memories and peripherals that are operating in your application and
therefore must have an active clock. The core is always clocked.
Section 4.6.13 “System clock control register”
4.3.3 Set up the system oscillator using XTALIN and XTALOUT
If you want to use the system oscillator with the LPC81x, you need to assign the XTALIN
and XTALOUT pins, which connect to the external crystal, through the fixed-pin function in
the switch matrix. XTALIN and XTALOUT can only be assigned to pins PIO0_8 and
PIO0_9.
1. In the IOCON block, remove the pull-up and pull-down resistors in the IOCON
registers for pins PIO0_8 and PIO0_9.
2. In the switch matrix block, enable the 1-bit functions for XTALIN and XTALOUT.
3. In the SYSOSCCTRL register, disable the BYPASS bit and select the oscillator
frequency range according to the desired oscillator output clock.
UM10601
User manual
All information provided in this document is subject to legal disclaimers.
Rev. 1.6 — 2 April 2014
© NXP B.V. 2014. All rights reserved.
24 of 370