bit description”: Changed the system clock rates of the following:
– 2 system clocks flash access time (for system clock rates up to 24 MHz).
– 3 system clocks flash access time (for system clock rates up to 48 MHz).
– 4 system clocks flash access time (for system clock rates up to 72 MHz).
– 5 system clocks flash access time (for system clock rates up to 84 MHz).
– Added 0x5, 6 system clocks flash access time (for system clock rates up to 100 MHz).
• Added text and a remark to Section 30.1 “How to read this chapter”.
• Added a remark to Section 30.3 “General description”.
• Added text and a remark to Section 30.4 “API description”.
• Added Table 466 “Power API calls in LPCOpen power library”.
• Renamed section 30.4.1 to Section 30.4.1 “Chip_POWER_SetPLL”.
• Renamed section 30.4.2 to Section 30.4.2 “Chip_POWER_SetVoltage”.
• Deleted Param0: mode and Low power mode; was secti on 30.4.2.1.
• Added text to Section 4.5.47.1 “CPU Control register”: The user can assign Cortex-M0+ to be the
master CPU via this register if needed after it is brought out of reset by Cortex-M4.
• Added text to Section 4.6.3 “Brown-out detection”: On the LPC5410x, the BOD is enabled by
default after power-up. At this time the BOD is set to the lowest value (1.5v) with no factory trimming
applied. In the BOD block the interrupt portion is turned off and only the reset portion is on. After
POR/BOD resets, the BootROM takes over and applies the factory BOD trim value so that the trip
points become accurate. See the LPC5410x data sheet for BOD interrupt/reset voltage levels in the
BOD static characteristics.
• Updated description of 15:12,TIMEOUT VALUE; Specifies the maximum time value for timeout at
the timer position identified by TimeoutBase. Minimum time TimeoutValue - 1 (clocks of wdt_clk).
See Table 383 “Configuration register for USARTn (CFGUSART[0:3], address offset
[0x1000:0x1300]) bit description”.
• Updated the values in the sentence: TimeoutValue can be any value from 2 to 15. This gives a
maximum timeout range of 2 counts (too small to be useful) at the bottom end, up to 15 * 32,768
(491,520) counts at the upper end. See Section 24.5.7.1 “Receiver Timeout”
• Updated text in Table 468 “set_voltage routine”: Param1: desired frequency (in Hz); was: Param1:
desired frequency (in MHz).
• Removed text from Section 5.2 “General description”, list 3:
...or for monitoring analog inputs (comparators and internal voltage reference and temperature
sensor via one of the comparators).
• Removed comparator from Section 13.5 “General description”: This provides an extremely powerful
control tool - particularly when the SCT inputs and outputs are connected to other on-chip
resources (ADC triggers, other timers etc.) in addition to general-purpose I/O.
• Added AHBCLKDIV register should be set to 1 in: List item 2 “Select the IRC as the main clock and
set the AHBCLKDIV register to 1. See Table 45, Table 46, and Table 58.”, Section 5.3.4.2
“Programming Deep-sleep mode”.
• Added AHBCLKDIV register should be set to 1 in: List item 2 “Select the IRC as the main clock and
set the AHBCLKDIV register to 1. See Table 45, Table 46, and Table 58.”, Section 5.3.5.2
“Programming Power-down mode”.
• Added registers, DIRSET0, DIRCLR0, DIRNOT0. See Table 134 “Register overview: GPIO port
(base address 0x1C00 0000)” and Section 9.5.10 “GPIO port direction set registers”, Section 9.5.11
“GPIO port direction clear registers”, and Section 9.5.12 “GPIO port direction toggle registers”.
• Added note to Table 223 “SCT DMA 0 request register (DMAREQ0, address 0x5000 405C) bit
description” and Table 224 “SCT DMA 1 request register (DMAREQ1, address 0x5000 4060) bit
description”.
• Added remark to Section 4.5.37.5.1 “System PLL spread spectrum control register 0”: If the 32 kHz
RTC oscillator is used as the reference input to the PLL, then use fixed values SELI=1, SELP=6
and SELR=0, instead of applying the above rules. These values reduce the PLL loop bandwidth to
combat the effect of reference oscillator jitter on the PLL output signal.
• In Table 62 “Flash configuration register (FLASHCFG, main syscon: address 0x4000 0124) bit
description” replaced offset in table title to address 0x4000 0124.
2.1• Added text to Section 17.2 “Features”: 24-bit interrupt timer clocked from CPU clock.
…continued
• Added address to Section 31.3.7.3 “RAM used by IAP command handler”’: Flash programming
commands use the top 32 bytes of on-chip SRAM0, 0x0200 FFE0 - 0x0200 FFFF (see Section
2.1.1 for details of the SRAM configuration). The maximum stack usage in the user allocated stack
space is 128 bytes and grows downwards.
• Removed Receiver Idle from Section 21.2 “Features” and replaced with Transmitter Idle.
• Added the text receiver to List item • “A receiver timeout feature (for USART and SPI) provides a
means to get data left for a time in a FIFO that has not reached its threshold to be transferred.” in
Section 24.3 “Features”.
• Added List item • “Timeouts: The watchdog oscillator must run for the UART and SPI timeout
counter to work. Enable the watchdog oscillator via the PDRUNCFG register (Table 72).” to the
Section 24.2 “Basic configuration”.
• Added text, The source of the timeout clock is the watchdog oscillator with a nominal frequency of
500 kHz to Section 24.5.7.1 “Receiver Timeout”, and Section 24.5.15.1 “Receiver Timeout”.
• Added text to Section 21.5 “General description”: The USART receiver timeout fea ture can also be
used to identify the USART receiver idle state. Set the bit TIMEOUTCONTONEMPTY in the
respective CFGUSART register to 1 to allow the timeout to flag idle state of the USART peripheral.
• Fixed the reset value of MSTTIME (Master timing configuration); was 0x77, now 0x56. See
T able 340 “Register overview: I2C0/1/2 (register base addresses 0x4009 4000 (I2C0), 0x4009 8000
(I2C1), 0x4009 C000 (I2C2))”.
• Added the Flash Management Registers FMSSTART and FMSSTOPUpdated to Chapter 28
“LPC5410x Flash signature generator”.
• Typographic errors have been corrected and minor pieces of information added or clarified
throughout the document.
2.020150410
• Registers supporting use of dual processors on LPC54102 devices has been added to the Syscon
chapter.
• A Power Management chapter has been added.
• Some pins in the Pin description chapter have the type changed to Z for open drain pins.
• A section has been added to the ADC chapter describing how to configure sample times for
different conversion configurations.
• The ADC operating speed is increased to 5 Ms/s.
• Updated Section 4.5.33 “Flash configuration register” text and Table 62.
• Typographic errors have been corrected and minor pieces of information added or clarified
throughout the document.
1.120141121
• In the NVIC chapter, the bit numbers for the priority register fields have been corrected.
• In the Syscon chapter, a functional description section has been added following the register
descriptions to provide additional information about some functions.
• The SCTimer/PWM chapter has been revised to better explain the function.
• Description of the ISP-AP interface and commands is added to the Debug chapter.
• References to Timer 0, 1, 2, 3, and 4 have been updated to use the terminology of the Standard
counter/timers chapter (CT32B0, 1, 2, 3, 4).
• Typographic errors have been corrected and minor pieces of information added or clarified
The LPC5410x are ARM Cortex-M4 based microcontrollers for embedded applications.
these devices include an optional ARM Cortex-M0+ coprocessor, 104 KB of on-chip
SRAM, 512 KB on-chip flash, five general-purpose timers, one State-Configurable Timer
with PWM capabilities (SCTimer/PWM), one R TC/alarm timer , one 24-bit Multi-Rate T imer
(MRT), a Windowed Watchdog Timer (WWDT), four USARTs, two SPIs, three Fast-mode
2
plus I
C-bus interfaces with high-speed slave mode, and one 12-bit 5 Msamples/sec
ADC.
The ARM Cortex-M4 is a 32-bit core that of fers system enha ncement s such as low power
consumption, enhanced debug features, and a high level of support block integ ration. The
ARM Cortex-M4 CPU incorporates a 3-stage pipeline, uses a Harvard architecture with
separate local instruction and data buses as well as a third bus for periphe rals, and
includes an internal prefetch unit that supports sp eculative branching. The ARM
Cortex-M4 supports single-cycle digital signal processing and SIMD instructions. The
Cortex-M4 is the Cortex-M4 with the inclusion of the 32-bit Floating Point Unit.
1.2 Features
The ARM Cortex-M0+ coprocessor available on some devices is an energy-efficient and
easy-to-use 32-bit core which is code- and tool-compatible with the Cortex-M4 core. The
Cortex-M0+ coprocessor offers up to 100 MHz performance with a simple instruction set
and reduced code size.
Refer to LPC5410x data sheets for complete details on specific products and
configurations.
• Dual processor core: ARM Cortex-M4 and ARM Cortex-M0+ included fo r LPC54102
devices. Cortex-M4 only is present on LPC54101 devices.
• ARM Cortex-M4 CPU:
– ARM Cortex-M4 processor, running at a frequency of up to 100 MHz.
– Floating Point Unit (FPU) and Memory Protection Unit (MPU).
– The CPU can operate at frequencies of up to 100 MHz.
– ARM Cortex -M 4 bu ilt- in Ne ste d Vectored Interrupt Controller (NVIC).
– Non-maskable Interrupt (NMI) with a selection of sources.
– Serial Wire Debug (SWD) with 8 breakpoints and 4 watchpoints. Includes Serial
Wire Output for enhanced debug capabilities.
– System tick timer.
• ARM Cortex-M0+ CPU (present on LPC54102 devices):
– ARM Cortex-M0+ processor, running at a frequency of up to 100 MHz (using the
same clock as the Cortex-M4).
– The CPU can operate at frequencies of up to 100 MHz.
– ARM Cortex-M0+ built-in Nested Vectored Interrupt Controller (NVIC).
– Non-maskable Interrupt (NMI) with a selection of sources.
– Serial Wire Deb ug (SWD) with 4 br ea kp oin ts and 2 watchp oints.
– System tick timer.
UM10850
• On-Chip memory:
– Up to 512 KB on-chi p flash programming memory with flash accelerator and 256
Byte page write and erase.
– Up to 104 KB total SRAM composed of:
– Up to 96 KB contiguous main SRAM.
– An additional 8 KB SRAM.
• ROM API support:
– Flash In-A pp licatio n Pro gr a mm in g (IAP ) an d In- Sys te m Pro gr a mmin g (ISP).
– Power Control API.
• Serial interfaces:
– Four USART interfaces with synchronous mode and 32 kHz mode for wake-up
from Deep-sleep and Power-down modes. The USAR Ts includ e a FIFO buffer, and
share a fractional baud-rate generator.
– Two SPI interfaces, each with 4 slave selects and flexible data configuration. The
SPIs include a FIFO buffer. Able to wake up the device from Deep-sleep and
Power-down modes when used in slave mode.
2
– Three I
of up to 1Mbit/s and with multiple address recognitio n an d mo n ito r mo de . Eac h
2
I
able to wake up the device from Deep-sleep and Power-down modes.
C-bus interfaces supporting fast mode and Fast-mode Plus with data rates
C-bus interface also supports High Speed Mode as a slave. The slave function is
• Digital peripherals:
– DMA controller with 22 channels and 20 programmable triggers, able to access all
memories and DMA-capable peripherals.
– Up to 50 General-Purpose I/O (GPIO) pins. Most GPIOs have configurable
pull-up/pull-down resistors, open-drain mode, and input inverter.
– GPIO registers are located on AHB for fast access.
– Up to eight GPIOs can be selected as pin interrupts (PINT), triggered by rising,
falling or both input edges.
– Two GPIO grouped interrupts (GINT) enable an interrupt based on a logical
(AND/OR) combination of input states.
– CRC engine.
• Timers
– Five 32-bit standard general purpose timers/counters, four of which support up to 4
capture inputs and 4 compare outputs, PWM mode, and external count input.
Specific timer events can be selected to generate DMA requests. The fifth timer
does not have external pin connections and may be used for internal timing
operations.
– One State Configurable Timer/PWM (SCTimer/PWM) 6 input and 8 output
functions (including capture and match). Inputs and outputs can be routed to/from
external pins and internally to/from selected peripherals. Internally, the SCT
supports 13 captures/matches, 13 events and 13 states.
The ARM Cortex-M4 includes three AHB-Lite buses, one system bus and the I-code and
D-code buses. One bus is dedicated for instruction fetch (I-code), and one bus is
dedicated for data access (D-code). The use of two core buses allows for simultaneous
operations if concurrent operations target different devices.
A multi-layer AHB matrix connects the CPU buses and other bus masters to peripherals in
a flexible manner that optimizes performance by allowing peripherals on different slaves
ports of the matrix to be accessed simultaneously by different bus masters. More
information on the multilayer matrix can be found in Section 2.1.3
multilayer matrix are shown in Figure 1
APB peripherals are connected to the AHB matrix via two APB buses using separate
slave ports from the multilayer AHB matrix. This allows for better performance by reducing
collisions between the CPU and the DMA controller, and also for peripherals on the
asynchronous bridge to have a fixed clock that does not track the system clock.
1.5 ARM Cortex-M4 processor
UM10850
Chapter 1: LPC5410x Introductory information
. Connections in the
.
The Cortex-M4 is a general purpose 32-bit microprocessor, which offers high performance
and very low power consumption. The Cortex-M4 offers a Thumb-2 instruction set, low
interrupt latency, interruptible/continuable multiple load and store instructions, automatic
state save and restore for interrupts, tightly integrated interrupt controller, and multiple
core buses capable of simultaneou s accesses.
A 3-stage pipeline is employed so that all parts of the processing and memory systems
can operate continuously. Typically , while on e in struction is b eing e xecuted, its successor
is being decoded, and a third instruction is being fetched from memory.
Information about Cortex-M4 configuration options can be found in Chapter 32
1.6 ARM Cortex-M0+ processor (present on LPC54102 devices)
The Cortex-M0+ is a general purpose 32-bit microprocessor with extremely low power
consumption. The Cortex-M0+ includes the bulk of the Thumb instruction set and a small
subset of Thumb-2 Instructions. The Cortex-M0+ has a 2-stage pipeline in order to
decrease power consumption, and includes a 32-cycle multiplier.
Information about Cortex-M0+ configuration options can be found in Chapter 32
The LPC5410x incorporates several distinct memory regions. Figure 2 shows the overall
map of the entire address space from the user program viewpoint following reset.
The APB peripheral area is 512 KB in size and is divided to allow for up to 32 peripherals.
Each peripheral is allocated 16 KB of space, simplifying the address decoding.
The registers incorporated into the CPU, such as NVIC, SysTick, and sleep mode control,
are located on the private peripheral bus.
2.1.1Main SRAM
The parts contain up to a tot al 96 KB of contigu ous, on-chip st atic RAM memory (this is in
addition to SRAM2 as noted in the next section below, so the total device SRAM can be
up to 104 KB). For each SRAM configuration, the SRAM is divi ded into two blocks:
SRAM0 (up to 64 KB) and SRAM1 (up to 32 KB). The bottom 8 KB of SRAM can be
enabled separately in order to allow saving dat a with minimal power usage during
Power-down mode. The remaining portion of SRAM0 and the entire SRAM1 can also be
disabled or enabled individually in the SYSCON block to save power. See Section 4.5.22
“AHB Clock Control register 0” and Section 4.5.38 “Power Configuration register”.
Table 1.Main SRAM configuration
SRAM0SRAM1
(total main SRAM = up to 96 KB)
SizeUp to 64 KBUp to 32 KB
Address range
Power Control
(via Power API)
• Always begins at 0x0200 0000.
• Continues to 0x0200 FFFF (for full 64
KB).
• First 8 KB is has a separate power switch.
• Remaining SRAM0 has a single power
switch.
• Begins at end of SRAM0, 0x0201 0000 when SRAM0
is a full 64 KB.
• Ends at 0x0201 7FFF for 32 KB SRAM1 with 64 KB
SRAM0.
• All of SRAM1 has a single power switch.
2.1.1.1SRAM2
An additional on-chip static RAM memory, SRAM2, is available that is not contiguous to
SRAM0 and SRAM1. This can be used, for example, as the location for the program
stack, or any other use. SRAM2 can be disabled or enabled in the SYSCON block to save
power. See Section 4.5.22 “
Configuration register”.
AHB Clock Control register 0” and Section 4.5.38 “Power
2.1.1.2SRAM usage notes
Although always contiguous on all LPC5410x devices, SRAM0 and SRAM1 are placed on
different AHB matrix ports. This allows user programs to potentially obtain better
performance by dividing RAM usage among the 2 ports. For example, simultaneous
access to SRAM0 by the CPU and SRAM1 by the system DMA controller does not result
in any bus stalls for either master.
Generally speaking, the CPU will read or write all peripheral data at some point, even
when all such data is read from or sent to a peripheral by DMA. So, minimizing stalls is
likely to involve putting data to/from different peripherals in RAM on each port.
Alternatively, sequences of data from the same peripheral could be alternated between
RAM on each port. this could be helpful if DMA fills or empties a RAM buffer, then signals
the CPU before proceeding on to a second buffer. the CPU would then tend to access the
data while the DMA is using the other RAM.
The private peripheral bus includes CPU peripherals such as the NVIC, SysTick, and the core control registers.
Page 14
NXP Semiconductors
2.1.3AHB multilayer matrix
The LPC5410x uses a multi-layer AHB matrix to connect the CPU buses and other bus
masters to peripherals in a flexible manner that optimizes performance by allowing
peripherals that are on different slave po rts of the matrix to be accessed simultaneously
by different bus masters. Figure 1
2.1.4Memory Protection Unit (MPU)
The Cortex-M4 processor has a memory protection unit (MPU) that provides fine grain
memory control, enabling applications to implement security privilege levels, separating
code, data and stack on a task-by-task basis. Such requirements are critical in many
embedded applications.
The MPU register interface is located on the private peripheral bus and is described in
detail in Ref. 1 “
UM10850
Chapter 2: LPC5410x Memory mapping
shows details of the potential matrix connections.
• Support for NMI from any interrupt (see Section 4.5.3).
3.3 General description
The tight coupling to the NVIC to the CPU allows for low interrupt latency and efficient
processing of late arriving interrupts.
3.3.1Interrupt sources
Table 2 lists the interrupt sources for each peripheral function. Each peripheral device
may have one or more interrupt lines to the Vectored Interrupt Controller. Each line may
represent more than one interrupt source. The interrupt number does not imply any
interrupt priority.
See Ref. 1 “
the NVIC and the NVIC registers.
Table 2.Connection of interrupt sources to the NVIC
ISER0R/W0x100Interrupt Set Enable Register 0. This register allows enabling interrupts
ISER1R/W0x104Interrupt Set Enable Register 1. See ISER0 description.0Table 5
ICER0R/W0x180Interrupt Clear Enable Register 0. This register allows disabling
ICER1R/W0x184Interrupt Clear Enable Register 1. See ISER0 description.0Table 7
ISPR0R/W0x200Interrupt Set Pending Register 0. This register allows changing the
ISPR1R/W0x204Interrupt Set Pending Register 1. See ISPR0 description.0Table 9
ICPR0R/W0x280Interrupt Clear Pending Register 0. This register allows changing the
ICPR1R/W0x284Interrupt Clear Pending Register 1. See ICPR0 description.0Table 11
[1]
IABR0
IABR1
IPR0R/W0x400Interrupt Priority Register 0. This register contains the 3-bit priority fields
IPR1R/W0x404Interrupt Priority Register 1. This register contains the 3-bit priority fields
IPR2R/W0x408Interrupt Priority Register 2. This register contains the 3-bit priority fields
IPR3R/W0x40CInterrupt Priority Register 3. This register contains the 3-bit priority fields
IPR4R/W0x410Interrupt Priority Register 4. This register contains the 3-bit priority fields
IPR5R/W0x414Interrupt Priority Register 5. This register contains the 3-bit priority fields
IPR6R/W0x418Interrupt Priority Register 6. This register contains the 3-bit priority fields
IPR7R/W0x41CInterrupt Priority Register 7. This register contains the 3-bit priority fields
IPR8R/W0x420Interrupt Priority Register 8. This register contains the 3-bit priority fields
IPR9R/W0x424Interrupt Priority Register 9. This register contains the 3-bit priority fields
IPR10R/W0x428Interrupt Priority Register 10. Th is register contains the 3-bit priority field
STIR
RO0x300Interrupt Active Bit Register 0. This register allows reading the current
[1]
RO0x304Interrupt Active Bit Register 1. See IABR0 description.0Table 13
[1]
WO0xF00Software Trigger Interrupt Register, allows software to generate
offset
DescriptionReset
value
0Table 4
and reading back the interrupt enables for peripheral functions.
0Table 6
interrupts and reading back the interrupt enables for peripheral functions.
0Table 8
interrupt state to pending and reading back the interrupt pending state for
peripheral functions.
0Table 10
interrupt state to not pending and reading back the interrupt pending
state for peripheral functions.
0Table 12
interrupt active state for specific peripheral functions.
0Table 14
for interrupts 0 to 3.
0Table 15
for interrupts 4 to 7.
0Table 16
for interrupts 8 to 11.
0Table 17
for interrupts 12 to 15.
0Table 18
for interrupts 16 to 19.
0Table 19
for interrupts 20 to 23.
0Table 20
for interrupts 24 to 27.
0Table 21
for interrupts 28 to 31.
0Table 22
for interrupts 32 to 35.
0Table 23
for interrupts 36 to 39.
0Table 24
for interrupt 40.
-Table 25
interrupts.
Reference
[1] This register is not available for the Cortex-M0+.
The ISER0 register allows enabling the first 32 peripheral interrupts, or for reading the
enabled state of those interrupts. The rema ining interrupts are enabled via the ISER1
register (Section 3.4.2
registers (Section 3.4.3
Table 4.Interrupt Set-Enable Register 0 register
BitNameValueFunction
0ISE_WDT
1ISE_BOD
2--Reserved. Read value is undefined, only zero should be written.
3ISE_DMA
4ISE_GINT0
5ISE_PINT0
6ISE_PINT1
7ISE_PINT2
8ISE_PINT3
9ISE_UTICK
10ISE_MRT
11ISE_CT32B0
12ISE_CT32B1
13ISE_CT32B2
14ISE_CT32B3
15ISE_CT32B4
16ISE_SCT0
17ISE_USART0
18ISE_USART1
19ISE_USART2
20ISE_USART3
21ISE_I2C0
22ISE_I2C1
23ISE_I2C2
24ISE_SPI0
25ISE_SPI1
26ISE_ADC0SEQA
27ISE_ADC0SEQB
28ISE_ADC0THOV
29ISE_RTC
30--Reserved. Read value is undefined, only zero should be written.
31ISE_MAILBOX
The ISER1 register allows enabling the second group of peripheral interrupts, or for
reading the enabled state of those interrupts. Disabling int er ru pts is done throu g h the
ICER0 and ICER1 registers (Section 3.4.3
Table 5.Interrupt Set-Enable Register 1 register
BitNameValueFunction
0ISE_GINT1
1ISE_PINT4
2ISE_PINT5
3ISE_PINT6
4ISE_PINT7
7:5--Reserved. Read value is undefined, only zero should be written.
8ISE_RIT
31:9--Reserved. Read value is undefined, only zero should be written.
[1]
[1]
[1]
[1]
[1]
[1]
GPIO group 1 interrupt enable.
Pin interrupt / pattern match engine slice 4 interrupt.
Pin interrupt / pattern match engine slice 5 interrupt.
Pin interrupt / pattern match engine slice 6 interrupt.
Pin interrupt / pattern match engine slice 7 interrupt.
Repetitive Interrupt Timer interrupt enable.
[1] Write: writing 0 has no effect, writing 1 enables the interrupt.
Read: 0 indicates that the interrupt is disabled, 1 indicates that the interrupt is enabled.
and Section 3.4.4).
UM10850
3.4.3Interrupt Clear-Enable Register 0
The ICER0 register allows disabling the first 32 peripheral interrupts, or for reading the
enabled state of those interrupts. The remaining interrupts are disabled via the ICER1
register (Section 3.4.4
registers (Section 3.4.1
Table 6.Interrupt Clear-Enable Register 0
BitNameFunction
31:0 ICE_...Peripheral interrupt disables. Bit numbers match ISER0 registers (Table 4
Write: writing 0 has no effect, writing 1 disables the interrupt.
Read: 0 indicates that the interrupt is disabled, 1 indicates that the interrupt is enabled.
). Enabling interrupts is done through the ISER0 and ISER1
and Section 3.4.2).
3.4.4Interrupt Clear-Enable Register 1 register
The ICER1 register allows disabling the second group of peripheral interrupts, or for
reading the enabled state of those interrupts. Enabling inter ru p ts is done throug h th e
ISER0 and ISER1 registers (Section 3.4.1
31:0 ICE_...Peripheral interrupt disables. Bit numbers match ISER1 registers (Table 5
Write: writing 0 has no effect, writing 1 disables the interrupt.
Read: 0 indicates that the interrupt is disabled, 1 indicates that the interrupt is enabled.
and Section 3.4.2).
). Unused bits are reserved.
). Unused bits are reserved.
3.4.5Interrupt Set-Pending Register 0 register
The ISPR0 register allows setting the pending state of th e first 32 pe ripher al inter rupts, or
for reading the pending state of those interrupts. The remaining interrupts can have their
pending state set via the ISPR1 register (Section 3.4.6
interrupts is done through the ICPR0 and ICPR1 registers (Section 3.4.7
31:0 ISP_...Peripheral interrupt pending set. Bit numbers match ISER0 registers (Table 4
Write: writing 0 has no effect, writing 1 changes the interrupt state to pending.
Read: 0 indicates that the interrupt is not pending, 1 indicates that the interrupt is pending.
3.4.6Interrupt Set-Pending Register 1 register
The ISPR1 register allows setting the pending state of the second group of peripheral
interrupts, or for reading the pending state of those interrupts. Clearing the pending state
of interrupts is done through the ICPR0 and ICPR1 registers (Section 3.4.7
Section 3.4.8
Table 9.Interrupt Set-Pending Register 1 register
BitNameFunction
31:0 ISP_...Peripheral interrupt pending set. Bit numbers match ISER1 registers (Table 5
Write: writing 0 has no effect, writing 1 changes the interrupt state to pending.
Read: 0 indicates that the interrupt is not pending, 1 indicates that the interrupt is pending.
).
UM10850
). Unused bits are reserved.
and
). Unused bits are reserved.
3.4.7Interrupt Clear-Pending Register 0 register
The ICPR0 register allows clearing the pending state of the first 32 peripheral interrupts,
or for reading the pending state of those interrupts. The remaining interrupts can have
their pending state cleared via the ICPR1 register (Section 3.4.8
state of interrupts is done through the ISPR0 and ISPR1 registers (Section 3.4.5
31:0 ICP_...Peripheral interrupt pendin g clear. Bit numbers match ISER0 registers (Table 4
Write: writing 0 has no effect, writing 1 changes the interrupt state to not pending.
Read: 0 indicates that the interrupt is not pending, 1 indicates that the interrupt is pending.
).
3.4.8Interrupt Clear-Pending Register 1 register
The ICPR1 register allows clearing the pending state of the second group of peripheral
interrupts, or for reading the p ending st ate of those interrupt s. Setting the pe nding st ate of
interrupts is done through the ISPR0 and ISPR1 registers (Section 3.4.5
31:0 ICP_...Peripheral interrupt pendin g clear. Bit numbers match ISER1 registers (Table 5
Write: writing 0 has no effect, writing 1 changes the interrupt state to not pending.
Read: 0 indicates that the interrupt is not pending, 1 indicates that the interrupt is pending.
The IABR0 register is a read-only register that allows reading the active state of the first
32 peripheral interrupts. Bits in IABR are set while the corresponding interrupt service
routines are in progress. Additional interrupts can have their active state read via the
IABR1 register (Section 3.4.10
Table 12. Interrupt Active Bit Register 0
BitNameFunction
31:0 IAB_...Peripheral interrupt active. Bit numbers match ISER0 registers (Table 4
Read: 0 indicates that the interrupt is not active, 1 indicates that the interrupt is active.
). IABR registers are not available for the Cortex-M0+.
3.4.10Interrupt Active Bit Register 1
The IABR1 register is a read-only register that allows reading the active state of the
second group of peripheral interrupts. Bits in IABR are set while the corresponding
interrupt service routines are in progress. IABR registers are not available for the
Cortex-M0+.
Table 13. Interrupt Active Bit Register 1
BitNameFunction
31:0 IAB_...Peripheral interrupt active. Bit numbers match ISER1 registers (Table 5
Read: 0 indicates that the interrupt is not active, 1 indicates that the interrupt is active.
UM10850
). Unused bits are reserved.
). Unused bits are reserved.
3.4.11Interrupt Priority Register 0
The IPR0 register controls the priority of the first 4 periphera l interrupts. Each interr upt can
have one of 32 priorities, where 0 is the highest priority.
The IPR1 register controls the priority of the second group of 4 peripheral interru pts. Each
interrupt can have one of 32 priorities, where 0 is the highest prior ity.
The IPR2 register controls the priority of the third group of 4 peripheral interrupts. Each
interrupt can have one of 32 priorities, where 0 is the highest prior ity.
The IPR3 register controls the priority of the fourth group of 4 peripheral interrupts. Each
interrupt can have one of 32 priorities, where 0 is the highest prior ity.
The IPR4 register controls the priority of the fifth group of 4 peripheral interrupts. Each
interrupt can have one of 32 priorities, where 0 is the highest prior ity.
The IPR5 register controls the priority of the sixth group of 4 peripheral interrupts. Each
interrupt can have one of 32 priorities, where 0 is the highest prior ity.
The IPR6 register controls the priority of the seventh group of 4 peripheral interrupts. Each
interrupt can have one of 32 priorities, where 0 is the highest prior ity.
The IPR7 register controls the priority of the eighth group of 4 peripheral interrupts. Each
interrupt can have one of 32 priorities, where 0 is the highest prior ity.
The IPR8 register controls the priority of the ninth and last group of 4 peripheral interrupts.
Each interrupt can have one of 32 priorities, where 0 is the highest priority.
The IPR9 register controls the priority of the tenth group of 4 peripheral interrupts. Each
interrupt can have one of 32 priorities, where 0 is the highest prior ity.
The IPR10 register controls the priority of the eleventh group of 4 peripheral interrupts.
Each interrupt can have one of 32 priorities, where 0 is the highest priority.
The STIR register provides an alternate way for software to generate an interrupt, in
addition to using the ISPR registers. This mechanism can only be used to generate
peripheral interrupts, not system exceptions. the STIR register is not available for the
Cortex-M0+.
By default, only privileged software can write to the STIR register. Unprivileged software
can be given this ability if privileged software sets the USERSETMPEND bit in the CCR
register.
The interrupt number to be programmed in this register is listed in Table 2
8:0INTIDWriting a value to this field generates an interrupt for the specified the interrupt number.
31:9-Reserved. Read value is undefined, only zero should be written.
• High-accuracy frequency measurement function for on-chip and off-chip clocks.
• Uses a selection of on-chip clocks as reference clock.
• Device ID register.
4.2 Basic configuration
Configure the SYSCON block as follows:
• The SYSCON uses the CLKIN, and CLKOUT pins which can be configured through
IOCON. See Section 4.3
• No clock configuration is needed. The clock to the SYSCON block is always enabled.
By default, the SYSCON block is clocked by the IRC.
• Target and reference clocks for the frequency measurement function are selected in
the input mux block. See Table 131
4.2.1Set up the PLL
The PLL creates a stable output clock at a higher frequen cy than the input clock. If a mai n
clock is needed with a frequency higher than the 12 MHz IRC clock, use the PLL to boost
the input frequency. The PLL can be set up by calling an API supplied by NXP
Semiconductors. Also see Section 4.6.4 “
“PLL registers”.
4.2.2Configure the main clock and system clock
The clock source for the registers and memories is derived from main clock. The main
clock can be selected from the sources listed in step 1 below.
. RESET is a dedicated pin.
.
PLL functional description” and Section 4.5.37
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. The following options are available:
– IRC: 12 MHz internal oscillator (default)
– CLKIN
– Watchdog oscillator
– The output of the system PLL
2. Select the divider value for the system clock. A divider value of 0 disables the system
3. Select the memories and peripherals that are operating in the application and
4.2.3Measure the frequency of a clock signal
The frequency of any on-chip or off-chip clock signal can be measured accurately with a
selectable reference clock. For example, the frequency measurement function can be
used to accurately determine the frequency of the watchdog oscillator which varies over a
wide range depending on process and temperature.
Chapter 4: LPC5410x System configuration (SYSCON)
– The RTC 32 kHz oscillator
Section 4.5.16 “
source select register B”.
clock.
Section 4.5.29 “
therefore must have an active clock. The core is always clocked.
Section 4.5.22 “
register 1”.
Main clock source select register A” and Section 4.5.17 “Main clock
System clock divider register”
AHB Clock Control register 0” and Section 4.5.23 “AHB Clock Control
UM10850
The clock frequency to be measured and the refe rence clock are selected in the input mux
block. See Section 8.6.4 “
and Section 8.6.5 “
Details on the accuracy and measurement process are described in Section 4.6.5
“Frequency measure function”.
To start a frequency measurement cycle and read the result, see Table 61
The system control block facilitates the clock generation. Many clocking variations are
possible. Figure 3
frequency is 100 MHz.
Frequency measure function reference clock select register”
Frequency measure function target clock select register”.
.
gives an overview of potential clock options. The maximum clock
Remark: In order for any of the clock multiplexers shown in Figure 3
currently selected clock must be running, and the clock to be switched to must also be
running. This is so that the multiplexer can gracefully switch between the two clocks
without glitches.
The low-power watchdog oscillator provides a fixed clock of approximately 500 kHz. The
accuracy of this clock is limited to +/- 40% over temperature, voltage, and silicon
processing variations. To determine the actual watchdog oscillator output, use the
frequency measure block. See Section 4.2.3
The part contains one system PL L that can be con figur ed to use a nu mbe r of clock in puts
and produce an output clock in the range of 1.2 MHz up to the maximum chip frequency,
and can be used to run most on-chip functions. The output of the PLL can be monitored
through the CLKOUT pin.
All system control block registers reside on word address boundaries. Details of the
registers appear in the description of each function. System configuration functions are
divided into 3 groups: Main system configuration at base address 0x4000 0000 (see
Table 27
Table 28
All address offsets not shown in the tables are reserved and should not be written to.
Remark: The reset value column shows the reset value seen when the boot loader
executes and the flash contains valid user code. During code development, a different
value may be seen if a debugger is used to halt execution prior to boot completion.
Table 27. Register overvie w: Main system configuration (base address 0x4000 0000)
NameAccessOffsetDescriptionReset value
AHBMATPRIOR/W0x004AHB multilayer matrix priority control0x0Table 30
SYSTCKCALR/W0x014System tick counter calibration0x0Table 31
NMISRCR/W0x01CNMI Source Select0x0Table 32
ASYNCAPBCTRLR/W0x020Asynchronous APB Control0x1Table 33
SYSRSTSTATR/W0x040System reset status registerNote [2]Table 34
PRESETCTRL0R/W0x044Peripheral reset control 00x0Table 35
PRESETCTRL1R/W0x048Peripheral reset control 10x0Table 36
PRESETCTRLSET0WO0x04CSet bits in PRESETCTRL0-Table 37
PRESETCTRLSET1WO0x050Set bits in PRESETCTRL1-Table 38
PRESETCTRLCLR0WO0x054Clear bits in PRESETCTRL0-Table 39
PRESETCTRLCLR1WO0x058Clear bits in PRESETCTRL1-Table 40
PIOPORCAP0RO0x05CPOR captured value of port 0Note [3]Table 41
PIOPORCAP1RO0x060POR captured value of port 1Note [3]Table 42
PIORESCAP0RO0x068Reset captured value of port 0Note [4]Table 43
PIORESCAP1RO0x06CReset captured value of port 1Note [4]Table 44
MAINCLKSELAR/W0x080Main clock source select A0x0Table 45
MAINCLKSELBR/W0x084Main clock source select B0x0Table 46
ADCCLKSELR/W0x08CADC clock source select0x0Table 47
CLKOUTSELAR/W0x094CLKOUT clock source select A0x0Table 48
CLKOUTSELBR/W0x098CLKOUT clock source select B0x0Table 49
SYSPLLCLKSELR/W0x0A0PLL clock source select0x0Table 50
AHBCLKCTRL0R/W0x0C0A HB Clock control 00x18BTable 51
AHBCLKCTRL1R/W0x0C4A HB Clock control 10x0Table 52
AHBCLKCTRLSET0WO0x0C8Set bits in AHBCLKCTRL0-Table 53
AHBCLKCTRLSET1WO0x0CCSet bits in AHBCLKCTRL1-Table 54
AHBCLKCTRLCLR0WO0x0D0Clear bits in AHBCLKCTRL0-Table 55
AHBCLKCTRLCLR1WO0x0D4Clear bits in AHBCLKCTRL1-Table 56
SYSTICKCLKDIVR/W0x0E0SYSTICK clock divider0x0Table 57
AHBCLKDIVR/W0x100System clock divider0x1Table 58
ADCCLKDIVR/W0x108ADC clock divider0x0Table 59
), Asynchronous system configuration at base address 0x4008 0000 (see
), and Other system registers at base addres s 0x4 00 2 C000 (see Table 29).
[1]
Reference
Page 30
NXP Semiconductors
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
Table 27. Register overvie w: Main system configuration (base address 0x4000 0000) …continued
NameAccessOffsetDescriptionReset value
CLKOUTDIVR/W0x10CCLKOUT clock divider0x0Table 60
FREQMECTRLR/W0x120Frequency measure register0x0Table 61
FLASHCFGR/W0x124Flash wait states configuration0x001ATable 62
FIFOCTRLR/W0x148Serial interface FIFO enables0Table 63
IRCCTRLR/W0x184IRC oscillator controlNote [5]Table 64
RTCOSCCTRLR/W0x190RTC oscillator 32 kHz output control0x1Table 65
SYSPLLCTRLR/W0x1B0PLL control0x8000Table 66
SYSPLLSTATRO0x1B4PLL status0x0Table 67
SYSPLLNDECR/W0x1B8PLL N decoder0x0Table 68
SYSPLLPDECR/W0x1BCPLL P decoder0x0Table 69
SYSPLLSSCTRL0R/W0x1C0PLL spread spectrum control 00x0Table 70
SYSPLLSSCTRL1R/W0x1C4PLL spread spectrum control 10x1000 0000Table 71
PDRUNCFGR/W0x210Power configuration register0xD80500Table 72
PDRUNCFGSETWO0x214Set bits in PDRUNCFG-Table 73
PDRUNCFGCLRWO0x218Clear bits in PDRUNCFG-Table 74
STARTER0R/W0x240Start logic 0 wake-up enable register 0x0Table 75
STARTER1R/W0x244Start logic 1 wake-up enable register 0x0Table 76
STARTERSET0WO0x248Set bits in STARTER0-Table 77
STARTERSET1WO0x24CSet bits in STAR TER1-Table 78
STARTERCLR0WO0x250Clear bits in STARTER0-Table 79
STARTERCLR1WO0x254Clear bits in STARTER1-Table 80
CPUCTRLR/W0x300CPU Control for multiple processors0x4DTable 81
CPBOOTR/W0x304Coprocessor Boot Address0Table 82
CPSTACKR/W0x308Coprocessor Stack Address0Table 83
CPSTATRO0x30CCoprocessor Status0Table 84
JTAGIDCODERO0x3F4JTAG ID code registersee tableTable 85
DEVICE_ID0RO0x3F8Part ID registerNote [5]Table 86
DEVICE_ID1RO0x3FCBoot ROM and device revision registerNote [5]Table 88
[1]
Reference
[1] Reset Value reflects the data stored in defined bits only. Reserved bits assumed to be 0.
[2] Depends on the source of the most recent reset.
[3] Determined by the voltage levels on device pins upon power-on reset.
[4] Determined by the voltage levels on device pins when a reset other than power-on reset occurs.
[5] Part dependent.
[1] Reset Value reflects the data stored in defined bits only. Reserved bits assumed to be 0.
[1]
Reference
4.5.1AHB matrix priority register
The Multilayer AHB Matrix arbitrates between several masters, only if they attempt to
access the same matrix slave port at the same time. Care should be taken if the value in
this register is changed, improper settings can seriously degrade performance.
Priority values are 3 = highest, 0 = lowest. When the priority is the same, the master with
the lower number is given priority. An example setting could put the Cortex-M4 D-code
bus as the highest priority, followed by the I-Code bus. All other masters could share a
lower priority.
1:0PRI_ICODEI-Code bus priority (master 0). Should be lower than PRI_DCODE for proper
3:2PRI_DCODED-Code bus priority (master 1).0
5:4PRI_SYSSystem bus priority (master 2).0
7:6-Reserved. Read value is undefined, only zero should be written.9:8PRI_DMADMA controller priority (master 5).0
13:10-Reserved. Read value is undefined, only zero should be written.15:14PRI_FIFOSystem FIFO bus priority (master 9).0
17:16PRI_M0Cortex-M0+ bus priority (master 10). Present on LPC54102 devices.0
31:18-Reserved. Read value is undefined, only zero should be written.-
0
operation.
4.5.2System tick counter calibration register
This register allows software to set up a default value for the SYST_CALIB register in the
System Tick Timer of each CPU. See Chapter 19
23:0CALSystem tick timer calibration value.0
24SKEWInitial value for the Systick timer.
25NOREFInitial value for the Systick timer.
31:26-Reserved.-
4.5.3NMI source selection register
The NMI source selection register selects a peripheral interrupts as source for the NMI
interrupt of both CPUs. For a list of all peripheral interrupts and their IRQ numbers see
Table 2
Remark: In order to change the interrupt source for the NMI, the NMI source must first be
disabled by writing 0 to the NMIEN bit. Then change the source b y updating the IRQN bits
and re-enable the NMI source by setting NMIEN.
5:0IRQM4The IRQ number of the interrupt that acts as the Non-Maskable Interrupt (NMI) for the
7:6-Reserved. Read value is undefined, only zero should be written.13:8IRQM0The IRQ number of the interrupt that acts as the Non-Maskable Interrupt (NMI) for the
29:14-Reserved. Read value is undefined, only zero should be written.30NMIENM0Write a 1 to this bit to enable the Non-Maskable Interrupt (NMI) source selected by IRQM0.
31NMIENM4Write a 1 to this bit to enable the Non-Maskable Interrupt (NMI) source selected by IRQM4.0
Cortex-M4, if enabled by NMIENM4.
Cortex-M0+, if enabled by NMIENM0. Present on LPC54102 devices.
Present on LPC54102 devices.
. For a description of the NMI functionality, see Ref. 1 “Cortex-M4 T RM”.
value
0
0
0
Remark: If the NMISRC register is used to select an interrupt as the source of
Non-Maskable interrupts, and the selected interrupt is enabled, one interrupt request can
result in both a Non-Maskable and a normal interrupt. This can be avoided by disabling
the normal interrupt in the NVIC.
4.5.4Asynchronous APB Control register
ASYNCAPBCTRL contains a global enable bit for the asynchronous APB bridge and
subsystem, allowing connection to the assoc iat ed per iph e ra ls.
Table 33. Asynchronous APB Control register (ASYNCAPBCTRL, address 0x4000 0020) bit description
BitSymbolValueDescriptionReset value
0ENABLEEnables the asynchronous APB bridge and subsystem.1
0Disabled. Asynchronous APB bridge is disabled.
1Enabled. Asynchronous APB bridge is enabled.
31:1 --Reserved. Read value is undefined, only zero should be written.-
The SYSRSTSTAT register shows the source of the latest reset event. The bits are
cleared by writing a one to any of the bits. The POR event clears all other bits in this
register. If another reset signal - for example the external RESET
after the POR signal is negated, then its bit is set to detected. Write a one to clear the
reset.
Table 34.System reset status register (SYSRSTSTAT, address 0x4000 0040) bit description
BitSymbolValueDescription
0PORPOR reset status
1EXTRSTStatus of the external RESET
2WDTStatus of the Watchdog reset
3BODStatus of the Brown-out detect reset
4SYSRSTStatus of the software system reset
31:5--Reserved
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
pin - remains asserted
0No POR detected
1POR detected. Writing a one clears this reset.
pin. External reset status.
0No reset event detect ed .
1Reset detected. Writing a one clears this reset.
0No WDT reset detected
1WDT reset detected. Writing a one clears this reset.
0No BOD reset detected
1BOD reset detected. Writing a one clears this reset.
0No System reset detected
1System reset detected. Writing a one clears this reset.
4.5.6Peripheral reset control register 0
The PRESETCTRL0 register allows software to reset specific peripherals. Writing a zero
to any assigned bit in this register clears the reset and allows the specified peripheral to
operate. Writing a one asserts the reset.
Table 35. Peripheral reset control register 0 (PRESETCTRL0, address 0x4000 0044) bit description
BitSymbolDescriptionReset value
6:0-Reserved. Read value is undefined, only zero should be written.0
7FLASH_RSTFlash controller reset control.
8FMC_RSTFlash accelerator reset control.
10:9-Reserved. Read value is undefined, only zero should be written.0
11MUX_RSTInput mux reset control.
12-Reserved. Read value is undefined, only zero should be written.0
13IOCON_RSTIOCON reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
0
0 = Clear reset to this function. 1 = Assert reset to this function.
0
0 = Clear reset to this function. 1 = Assert reset to this function.
0
0 = Clear reset to this function. 1 = Assert reset to this function.
Page 34
NXP Semiconductors
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
Table 35. Peripheral reset control register 0 (PRESETCTRL0, address 0x4000 0044) bit description
BitSymbolDescriptionReset value
14GPIO0_RSTGPIO0 reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
15GPIO1_RSTGPIO1 reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
17:16-Reserved. Read value is undefined, only zero should be written.0
18PINT_RSTPin interrupt (PINT) reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
19GINT_RSTGrouped interrupt (GINT) reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
20DMA_RSTDMA reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
21CRC_RSTCRC generator reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
22WWDT_RSTWatchdog timer reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
26:23-Reserved. Read value is undefined, only zero should be written.0
27ADC0_RSTADC0 reset control.
0 = Clear reset to this function. 1 = Assert reset to this function.
31:28-Reserved. Read value is undefined, only zero should be written.-
0
0
0
0
0
0
0
0
4.5.7Peripheral reset control register 1
The PRESETCTRL1 register allows software to reset specific peripherals. Writing a zero
to any assigned bit in this register clears the reset and allows the specified peripheral to
operate. Writing a one asserts the reset.
Table 36. Peripheral reset control register 1 (PRESETCTRL1, address 0x4000 0048) bit description
Table 36. Peripheral reset control register 1 (PRESETCTRL1, address 0x4000 0048) bit description
BitSymbolDescriptionReset value
21:11-Reserved. Read value is undefined, only zero should be written.0
22CT32B2_RSTCT32B2 reset control.
0 = Clear reset to this function.
1 = Assert reset to this function.
25:23-Reserved. Read value is undefined, only zero should be written.0
26CT32B3_RSTCT32B3 reset control.
0 = Clear reset to this function.
1 = Assert reset to this function.
27CT32B4_RSTCT32B4 reset control.
0 = Clear reset to this function.
1 = Assert reset to this function.
31:28-Reserved. Read value is undefined, only zero should be written.-
0
0
0
4.5.8Peripheral reset control set register 0
Writing a 1 to a bit position in PRESETCTRLSET0 sets the corresponding position in
PRESETCTRL0. This is a write-only register. For bit assignments, see Table 35
Table 37. Peripheral reset contr ol set regis ter 0 (PRESETCTRLSET0, address 0x4000 004C) bit description
BitSymbolDescriptionReset value
31:0RST_SET0Writing ones to this register sets the corresponding bit or bits in the PRESETCTRL0
register, if they are implemented.
Bits that do not correspond to defined bits in PRESETCTRL0 are reserved and only
zeroes should be written to them.
.
-
4.5.9Peripheral reset control set register 1
Writing a 1 to a bit position in PRESETCTRLSET1 sets the corresponding position in
PRESETCTRL1. This is a write-only register. For bit assignments, see Table 36
Table 38. Peripheral reset contr ol set regis ter 1 (PRESETCTRLSET1, address 0x4000 0050) bit description
BitSymbolDescriptionReset value
31:0RST_SET1Writing ones to this register sets the corresponding bit or bits in the PRESETCTRL1
register, if they are implemented.
Bits that do not correspond to defined bits in PRESETCTRL1 are reserved and only
zeroes should be written to them.
.
-
4.5.10Peripheral reset control clear register 0
Writing a 1 to a bit position in PRESETCTRLCLR0 clears the corresponding position in
PRESETCTRL0. This is a write-only register. For bit assignments, see Table 35
Table 39. Peripheral reset control clear register 0 (PRESETCTRLCLR0, address 0x4000 0054) bit description
BitSymbolDescriptionReset value
31:0RST_CLR0Writing ones to this register clears the corresponding bit or bits in the
PRESETCTRL0 register, if they are implemented.
Bits that do not correspond to defined bits in PRESETCTRL0 are reserved and only
zeroes should be written to them.
.
-
Page 36
NXP Semiconductors
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
4.5.1 1 Peripheral reset control clear register 1
Writing a 1 to a bit position in PRESETCTRLCLR1 clears the corresponding position in
PRESETCTRL1. This is a write-only register. For bit assignments, see Table 36
Table 40. Peripheral reset control clear register 1 (PRESETCTRLCLR1, address 0x4000 0058) bit description
BitSymbolDescriptionReset value
31:0RST_CLR1Writing ones to this register clears the corresponding bit or bits in the
PRESETCTRL1 register, if they are implemented.
Bits that do not correspond to defined bits in PRESETCTRL1 are reserved and only
zeroes should be written to them.
.
-
4.5.12POR captured value of port 0
The PIOPORCAP0 register captures the state of GPIO port 0 at power-on-r eset. Each bit
represents the power-on reset state of one GPIO pin. This register is a read-only register.
Table 41. POR captured PIO status register 0 (PIOPORCAP0, address 0x4000 005C) bit description
BitSymbolDescriptionReset value
31:0PIOPORCAPState of PIO0_31 through PIO0_0 at power-on resetDepends on external circuitry
4.5.13POR captured value of port 1
The PIOPORCAP1 register captures the state of GPIO port 1 at power-on-r eset. Each bit
represents the power-on reset state of one GPIO pin. This register is a read-only register.
Table 42. POR captured PIO status register 1 (PIOPORCAP1, address 0x4000 0060) bit description
BitSymbolDescriptionReset value
31:0PIOPORCAPState of PIO1_31 through PIO1_0 at power-on resetDepends on external circuitry
4.5.14Reset captured value of port 0
The PIORESCAP0 register captures the state of GPIO port 0 when a reset other than a
power-on reset occurs. Each bit represents the reset state of one GPIO pin. This register
is a read-only register.
Table 43. Reset captured PIO status register 0 (PIORESCAP0, address 0x4000 0068) bit description
BitSymbolDescriptionReset value
31:0PIORESCAPState of PIO0_31 through PIO0_0 for resets other than POR.Depends on external circuitry
4.5.15Reset captured value of port 1
The PIORESCAP0 register captures the state of GPIO port 1 when a reset other than a
power-on reset occurs. Each bit represents the reset state of one GPIO pin. This register
is a read-only register.
Table 44. Reset captured PIO status register 1 (PIORESCAP1, address 0x4000 006C) bit description
BitSymbolDescriptionReset value
31:0PIORESCAPState of PIO1_31 through PIO1_0 for resets other than POR.Depends on external circuitry
This register selects one of the internal oscillators, IRC, system oscillator, or watchdog
oscillator. The oscillator selected is then one of the inputs to the main clock source select
register B (see Table 46
the core, memories, and peripherals on the synchronous APB bus are derived from the
main clock.
Remark: Note that this selection is internally synchronized: the clock being switched from
and the clock being switched to must both be running and have occurred in specific states
before the selection actually changes.
Table 45.Main clock source select register A (MAINCLKSELA, addre ss 0x4000 0080) bit
BitSymbolValueDescriptionReset value
1:0SELClock source for main clock source selector A0
31:2--Reserved-
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
), which selects the clock source for the main clock. All clocks to
This register selects the clock source for the main clock. All clocks to the core, memories,
and peripherals are derived from the main clock.
One input to this register is the main clock source select register A (see Table 45
selects one of the three internal oscillators, IRC, system oscillator, or watchdog oscillator.
Remark: Note that this selection is internally synchronized: the clock being switched from
and the clock being switched to must both be running and have occurred in specific states
before the selection actually changes.
Table 46.Main clock source select register B (MAINCLKSELB, addre ss 0x4000 0084) bit
description
BitSymbolValueDescriptionReset value
1:0SELClock source for main clock source selector B. Selects the
This register selects a clock source for the 12-bit ADCs that is to the system clock. To use
a clock other than the Main clock, select the asynchronous clock mode in the ADC control
register.
This register pre-selects one of the internal oscillators for the clock sources visible on the
CLKOUT pin. The final selection for the CLKOUT clock source is done in the CLKOUT
clock source B register.
Remark: Note that this selection is internally synchronized: the clock being switched from
and the clock being switched to must both be running and have occurred in specific states
before the selection actually changes.
Table 48.CLKOUT clock source select regist er (CLKOUTSELA, address 0x4000 0094) bit
This register selects the clock source visible on the CLKOUT pin. The internal oscillators
are pre-selected in the CLKOUTSELA register (see Table 48
Remark: Note that this selection is internally synchronized: the clock being switched from
and the clock being switched to must both be running and have occurred in specific states
before the selection actually changes.
The AHBCLKCTRL0 register enables the clocks to individual system and peripheral
blocks. The system clock (bit 0) provides the clock for the AHB, the APB bridge, the CPU,
the SYSCON block, and the PMU. This clock cannot be disabled.
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
Regarding bits 3 and 4, see Section 2.1.1
Table 51. AHB Clock Control register 0 (AHBCLKCTRL0, address 0x4000 00C0) bit description
BitSymbolDescriptionReset value
0-Reserved. This read-only bit cannot be cleared.1
1ROMEnables the clock for the Boot ROM. 0 = Disable; 1 = Enable.1
2-Reserved. Read value is undefined, only zero should be written.0
3SRAM1Enables the clock for SRAM1. 0 = Disable; 1 = Enable.1
4SRAM2Enables the clock for SRAM2. 0 = Disable; 1 = Enable.0
6:5-Reserved. Read value is undefined, only zero should be written.0
7FLASHEnables the clock for the flash controller. 0 = Disable; 1 = Enable. This clock is
8FMCEnables the clock for the Flash accelerator. 0 = Disable; 1 = Enable. This clock is
10:9-Reserved. Read value is undefined, only zero should be written.0
11INPUTMUXEnables the clock for the input muxes. 0 = Disable; 1 = Enable.0
12-Reserved. Read value is undefined, only zero should be written.0
13IOCONEnables the clock for the IOCON block. 0 = Disable; 1 = Enable.0
14GPIO0Enables the clock for the GPIO0 port registers. 0 = Disable; 1 = Enable.0
15GPIO1Enables the clock for the GPIO1 port registers. 0 = Disable; 1 = Enable.0
17:16-Reserved. Read value is undefined, only zero should be written.0
18PINTEnables the clock for the pin interrupt block.0 = Disable; 1 = Enable.0
19GINTEnables the clock for the grouped pin interrupt block. 0 = Disable; 1 = Enable.0
20DMAEnables the clock for the DMA controller. 0 = Disable; 1 = Enable.0
21CRCEnables the clock for the CRC engine. 0 = Disable; 1 = Enable.0
22WWDTEnables the clock for the Watchdog Timer. 0 = Disable; 1 = Enable.0
23RTCEnables the clock for the RTC. 0 = Disable; 1 = Enable.0
25:24-Reserved. Read value is undefined, only zero should be written.0
26MAILBOXEnables the clock for the Mailbox. 0 = Disable; 1 = Enable. Present on LPC54102
27ADC0Enables the clock for the ADC0 register interface. 0 = Disable; 1 = Enab le.0
31:28-Reserved. Read value is undefined, only zero should be written.0
The AHBCLKCTRL1 register enables the clocks to individual peripheral blocks.
Table 52. AHB Clock Control register 1 (AHBCLKCTRL1, address 0x4000 00C4) bit description
BitSymbolDescriptionReset value
0MRTEnables the clock for the Multi-Rate Timer. 0 = Disable; 1 = Enable.0
1RITEnables the clock for the repetitive interrupt timer. 0 = Disable; 1 = Enable.0
2SCT0Enables the clock for SCT0. 0 = Disable; 1 = Enable.0
8:3-Reserved. Read value is undefined, only zero should be written.9FIFOEnables the clock for system FIFOs. 0 = Disable; 1 = Enable.0
10UTICKEnables the clock for the Micro-tick Timer. 0 = Disable; 1 = Enable.0
21:11-Reserved. Read value is undefined, only zero should be written.0
22CT32B2Enables the clock for CT32B 2. 0 = Disable; 1 = Enable.0
25:23-Reserved. Read value is undefined, only zero should be written.26CT32B3Enables the clock for CT32B 3. 0 = Disable; 1 = Enable.0
27CT32B4Enables the clock for CT32B 4. 0 = Disable; 1 = Enable.0
31:28-Reserved. Read value is undefined, only zero should be written.-
4.5.24AHB Clock Control Set register 0
Writing a 1 to a bit position in AHBCLKCTRLSET0 sets the corresponding position in
AHBCLKCTRL0. This is a write-only register. For bit assignments, see Table 51
Table 53. Clock control set re gister 0 (AHBCLKCTRLSET0, address 0x4000 00C8) bit description
BitSymbolDescriptionReset value
31:0CLK_SET0Writing ones to this register sets the corresponding bit or bits in the AHBCLKCTRL0
register, if they are implemented.
Bits that do not correspond to defined bits in AHBCLKCTRL0 are reserved and only
zeroes should be written to them.
.
-
4.5.25AHB Clock Control Set register 1
Writing a 1 to a bit position in AHBCLKCTRLSET1 sets the corresponding position in
AHBCLKCTRL1. This is a write-only register. For bit assignments, see Table 52
Table 54. Clock control set re gister 1 (AHBCLKCTRLSET1, address 0x4000 00CC) bit description
BitSymbolDescriptionReset value
31:0CLK_SET1Writing ones to this register sets the corresponding bit or bits in the AHBCLKCTRL1
register, if they are implemented.
Bits that do not correspond to defined bits in AHBCLKCTRL1 are reserved and only
zeroes should be written to them.
.
-
4.5.26AHB Clock Control Clear register 0
Writing a 1 to a bit position in AHBCLKCTRLCLR0 clears the corresponding position in
AHBCLKCTRL0. This is a write-only register. For bit assignments, see Table 51
Table 55. Clock control clear register 0 (AHBCLKCTRLCLR0, address 0x4000 00D0) bit description
BitSymbolDescriptionReset value
31:0CLK_CLR0 Writing ones to this register clears the corresponding bit or bits in the AHBCLKCTRL0
-
register, if they are implemented.
Bits that do not correspond to defined bits in AHBCLKCTRL0 are reserved and only
zeroes should be written to them.
4.5.27AHB Clock Control Clear register 1
Writing a 1 to a bit position in AHBCLKCTRLCLR1 clears the corresponding position in
AHBCLKCTRL1. This is a write-only register. For bit assignments, see Table 52
Table 56. Clock control clear register 1 (AHBCLKCTRLCLR1, address 0x4000 00D4) bit description
BitSymbolDescriptionReset value
31:0CLK_CLR1 Writing ones to this register clears the corresponding bit or bits in the AHBCLKCTRL1
register, if they are implemented.
Bits that do not correspond to defined bits in AHBCLKCTRL1 are reserved and only
zeroes should be written to them.
.
-
4.5.28SYSTICK clock divider register
This register configures the SYSTICK peripheral clock. The SYSTICK timer clock can be
shut down by setting the DIV field to zero.
Table 57.SYSTICK clock divider (SYSTICKCLKDIV, address 0x4000 00E0) bit description
BitSymbolDescriptionReset value
7:0DIVSYSTIC K cloc k divider value.
0: Disable SYSTICK timer clock.
1: Divide by 1.
to
255: Divide by 255.
31:8-Reserved. Read value is undefined, only zero should be written.-
0
4.5.29System clock divider register
This register controls how the main clock is divided to provide the system clock to the
CPU, AHB bus, and memories. The system clock can be shut down completely by setting
the DIV field to zero.
31:8-Reserved. Read value is undefined, only zero should be written. -
4.5.31CLKOUT clock divider register
This register determines the divider value for the clock signal on the CLKOUT pin.
T able 60. CLKOUT clock divider register (CLKOUTDIV, address 0x4000 010C) bit
BitSymbolDescriptionReset value
7:0DIVCLKOUT clock divider value.
31:8-Reserved. Read value is undefined, only zero should be written. -
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
0
0: Disable ADC clock.
1: Divide by 1.
to
255: Divide by 255.
description
0
0: Disable CLKOUT clock divider.
1: Divide by 1.
to
255: Divide by 255.
4.5.32Frequency measure function control register
This register starts the frequency measurement function and stores the result in the
CAPVAL field. The target frequency can be calculated as follows with the frequencies
given in MHz:
= (CAPVAL - 2) x F
F
target
reference
Select the target and reference frequencies using the
Table 61. Frequency measure function control register (FREQMECTRL, address 0x4000 0120) bit descript ion
BitSymbolDescriptionReset value
13:0CAPVALStores the capture result which is used to calculate the frequency of the target clock. This
30:14-Reserved. Read value is undefined, only zero should be written.31PROGSet this bit to one to initiate a frequency measurement cycle. Hardware clears this bit
field is read-only.
when the measurement cycle has completed and there is valid capture data in the
CAPV AL field (bits 13:0).
See Section 4.2.3 “Measure the frequency of a clock signal”, Section 4.6.5 “Frequency
measure function”, Section 8.6.4 “Frequency measure function reference clock select
register”, and Section 8.6.5 “Frequency measure function target clock select register” for
Depending on the system clock frequency, access to the flash memory can be configured
with various access times by writing to the FLASHCFG r egister. It is recommended to use
the set_voltage Power API (see Section 30.4.2
achieve lower power operation. However , flash timing can also be set up by user software
as shown in the table.
Enabling buffering, acceleration, and prefetch will substantially improve performance.
Buffering saves power by allowing previously accessed information to b e reused without a
flash read. Acceleration saves power by reducing CPU stalls. Prefetch typically has a
small power cost due to some flash reads being pe rfo rm e d th at ul tim at ely ar e no t ne ed e d
Remark: Improper setting of this register may result in incorrect operation of the flash
memory. Do not change the flash access time when using the power API in low-power
mode.
Table 62. Flash configuration register (FLASHCFG, main syscon: address 0x4000 0124) bit description
BitSymbolValueDescriptionReset
1:0FETCHCFGInstruction fetch configuration. This field determines how flash accelerator buffers are
3:2DATACFGData read configuration. This field determines how flash accelerator buffers are used
4ACCELAcceleration enable.1
5PREFENPrefetch enable.0
6PREFOVRPrefetch override. This bit only applies when PREFEN = 1 and a buffered instruction
used for instruction fetches.
00Instruction fetches from flash are not buffered. Every fetch request from the CPU
results in a read of the flash memory. This setting may use significantly more power
than when buffering is enabled.
01One buffer is used for all instruction fetches.
10All buffers may be used for instruction fetches.
11Reserved setting, do not use.
for data accesses.
00Data accesses from flash are not buffered. Every data access from the CPU results
in a read of the flash memory.
01One buffer is used for all data accesses.
10All buffers may be used for data accesses.
11Reserved setting, do not use.
0Flash acceleration is disabled. Every flash read (including those fulfilled from a
buffer) takes FLASHTIM + 1 system clocks. This allows more determinism at a cost
of performance.
1Flash acceleration is enabled. Performance is enhanced, depen dent on other
FLASHCFG settings.
0No instruction prefetch is performed.
1If the FETCHCFG field is not 0, the next flash line following the current execution
address is automatically prefetched if it is not already buffered.
is completing for which the next flash line is not already buffered or being prefetched.
0Any previously initiated prefetch will be completed.
1Any previously initiated prefetch will be aborted, and the next flash line following the
current execution address will be prefetched if not already buffered.
Table 62. Flash configuration register (FLASHCFG, main syscon: address 0x4000 0124) bit description
BitSymbolValueDescriptionReset
value
11:7--Reserved15:12FLASHTIMFlash memory access time. The number of system clocks used for flash accesses is
equal to FLASHTIM +1.
0x01 system clock flash access time (for system clock rates up to 12 MHz).
0x12 system clocks flash access time (for system clock rates up to 24 MHz).
0x23 system clocks flash access time (for system clock rates up to 48 MHz).
0x34 system clocks flash access time (for system clock rates up to 72 MHz).
0x45 system clocks flash access time (for system clock rates up to 84 MHz).
0x56 system clocks flash access time (for system clock rates up to 100 MHz).
others “Value” + 1 system clocks flash access time.
31:16--Reserved-
0x0
4.5.34FIFO control register
This register is used to enable the System FIFO to provide DMA requests for individual
peripheral FIFOs. This replaces the specific peripheral DMa request.
Table 63.FIFO control register (FIFOCT RL, address 0x4000 0148) bit description
This register is used to trim the on-chip 12 MHz oscillator. The trim value is factory-preset
and written by the boot code on start-up.
Table 64.IRC control register (IRCCTRL, address 0x4000 0184) bit description
BitSymbolDescriptionReset value
7:0TRIMTrim valueInitially 0x80. Boot code will alter to a device-specific
31:8-Reserved-
4.5.36RTC oscillator control register
This register enables the 32 kHz output of the RTC oscillator. This clock can be used to
create the main clock when the PLL input or output is selected as the clock source to the
main clock.
T able 65. RTC oscillator control register (RTCOSCCTRL, address 0x4000 0190) bit
The PLL provides a wide range of frequencies and can potentially be used for many
on-chip functions. the PLL can be used with or without a spread spectrum clock generator .
See Section 4.6.4 “
4.5.37.1System PLL control register
The SYSPLLCTRL register provides most of the control over basic selections of PLL
modes and operating details.
Table 66. System PLL control register (SYSPLLCTRL, address 0x4000 01B0 bit description
BitSymbolValueDescriptionReset
3:0SELRBandwidth select R value
9:4SELIBandwidth select I value
14:10SELPBandwidth select P value
15BYPASSPLL bypass control1
16BYPASS
CCODIV2
17UPLIMOFFDisable upper frequency limiter.
18BANDSELPLL filter control. Set this bit to one when the spread spectrum controller is disabled
19DIRECTIPLL0 direct input enable0
20DIRECTOPLL0 direct output enable0
31:21-Reserved. Read value is undefined, only zero should be written.-
0Disabled. PLL CCO is used to create the PL L output.
1Enabled. PLL is bypassed, the PLL input clock is routed directly to the PLL output
(default).
Bypass feedback clock divide by 2.0
0Divide by 2. The CCO feedback clock is divided by 2 in addition to the programmed
M divide.
1Bypass. The CCO feedback clock is divided only by the programmed M divide.
For spread spectrum mode: SEL_EXT = 0, BANDSEL = 0, and UPLIMOFF = 1.
0Normal mode.
1Upper frequency limiter disabled.
or at low frequencies.
For spread spectrum mode: SEL_EXT = 0, BANDSEL = 0, and UPLIMOFF = 1.
0SSCG control. The PLL filter uses the parameters derived from the spread spectrum
controller.
1MDEC control. The PLL filter uses the programmable fields SELP, SELR, and SELI
in this register to control the filter constants.
0Disabled. The PLL input divider (N divider) output is used to drive the PLL CCO.
1Enabled. The PLL input divider (N divider) is bypassed. the PLL input clock is used
directly to drive the PLL CCO.
0Disabled. The PLL output divider (P divider) is used to create the PLL output.
1Enabled. The PLL output divider (P divider) is bypassed, the PLL CCO output is
used as the PLL output.
PLL functional description” for additional details of PLL operation.
The read-only PLL0_STAT SYSPLLSTAT register provides the PLL lock status
Remark: The lock status does not reliably indicate the PLL status for the following two
configurations: spread-spectrum mode or fractional enable d or low input clock frequencies
such as 32 kHz. In these cases, refer to the PLL lock times listed in the specific device
data sheet to obtain appropriate wait times for the PLL to lock.
Table 67.System PLL status register (SYSPLLSTAT, address 0x4000 01B4) bit description
BitSymbolDescriptionReset value
0LOCKPLL0 lock indicator0
31:1-Reserved-
4.5.37.3System PLL N-divider register
Remark: The PLL N-divider register does not use the direct binary representation of N
divide value directly. Instead, it uses an encoded version NDEC.
Remark: While the PLL0 output is in use, do not change the NDEC value. Changing the
NDEC value changes the FCCO frequency and can cause the system to fail.
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
• The valid range for N is 1 to 2^8. This value is encoded into a 10-bit NDEC value. The
relationship can be expressed through the following pseudo-code:
N_max=0x00000100, x=0x00000080;
switch (N) {
case 0: x = 0xFFFFFFFF;
case 1: x = 0x00000302;
case 2: x = 0x00000202;
default: for (i = N; i <= N_max; i++)
x = (((x ^ (x>>2) ^ (x>>3) ^ (x>>4)) & 1) << 7) |
((x>>1) & 0x7F); }
NENC[9:0] = x;
Table 68. System PLL N-divider register (SYSPLLNDEC, address 0x4000 01B8) bit description
BitSymbolDescriptionReset value
9:0NDECDecoded N-divider coefficient value0
10NREQNDEC reload request. When a 1 is written to this bit, the NDEC value is loaded into the
31:11 -Reserved. Read value is undefined, only zero should be written.-
0
PLL. Must be cleared by software for any subsequent load, or the PLL can be powered
down and back up via the PDEN_SYS_PLL bit in the PDRUNCFG register if the NDEC
value is changed.
Remark: The PLL P-divider register does not use the direct binary representation of P
divide value directly. Instead, it uses an encoded version PDEC.
Remark: While the PLL0 output is in use, do not change the PDEC value. Changing the
PDEC value changes the PLL output frequency and can cause the system to fail.
• The valid range for P is from 1 to 2^5. This value is encoded into a 7-bit PDEC value.
The relationship can be expressed through the following pseudo-code:
P_max=0x20, x=0x10;
switch (P) {
case 0: x = 0xFFFFFFFF;
case 1: x = 0x00000062;
case 2: x = 0x00000042;
default: for (i = P; i <= P_max; i++)
x = (((x ^ (x>>2)) & 1) << 4) | ((x>>1) & 0xF); }
PDEC[6:0] = x;
Table 69. System PLL P-divider register (SYSPLLPDEC, address 0x4000 01BC) bit description
BitSymbolDescriptionReset value
6:0PDECDecoded P-divider coefficient value0
7PREQPDEC reload request. When a 1 is written to this bit, the PDEC value is loaded into the PLL.
31:8-Reserved. Read value is undefined, only zero should be written.-
0
Must be cleared by software for any subsequent load, or the PLL can be powered down and
back up via the PDEN_SYS_PLL bit in the PDRUNCFG register if the PDEC value is
changed.
4.5.37.5Spread spectrum control with PLL0
The spread spectrum functionality can be used to provide a sprea d spectrum clock, which
can decrease electromagnetic interference (EMI).
The Spread Spectrum Clock Generator can be used in several ways:
• It can encode M-divider values between 1 and 255 to produce the MDEC value used
directly by the PLL, saving the need for executing encoding algorithm code, or
hard-coding predetermined values into an application.
• It can provide a fractional rate feature to the PLL.
• It can be set up to automatically alter the PLL CCO frequency on an ongoing basis to
decrease electromagnetic interference (EMI).
If the spread spectrum mode is enabled, choose N to ensure 2 MHz < Fin/N < 4 MHz.
Spread spectrum mode cannot be used when Fin = 32 kHz.
When the modulation (MR) is set to zero, the PLL becomes a fractional PLL.
4.5.37.5.1System PLL spread spectrum control register 0
Table 70. System PLL spread spectrum control register 0 (SYSPLLSSCTRL0, address 0x4000 01C0) bit description
BitSymbolValueDescriptionReset
16:0MDECDecoded M-divider coefficient value0
17MREQMDEC reload request. When a 1 is written to this bit, the MDEC value is loaded into
18SEL_EXTSelect spread spectrum mode. Selects the source of the feedback divider value. For
31:19-Reserved. Read value is undefined, only zero should be written.-
value
0
the PLL. Must be cleared by software for any subsequent load, or the PLL can be
powered down and back up via the PDEN_SYS_PLL bit in the PDRUNCFG register if
the MDEC value is changed.
0
normal mode, this must be the value from the MDEC field in this register.
For spread spectrum mode: SEL_EXT = 0, BANDSEL = 0, and UPLIMOFF = 1.
0The PLL feedback divider value comes from the spread spectrum controller.
1The PLL feedback divider value comes from the MDEC field in this register.
PLL0 M-divider register: The PLL0 M-divider value (MDEC) can be set directly if the
PLL0 is not used with the spread spectrum clock generator (SSCG). If the SSCG is
enabled via the SEL_EXT bit, then the SSCG sets the MDEC value.
Remark: MDEC does not use the direct binary representations of M directly. Instead, it
uses an encoded version of M. The valid range for M is 1 to 2^15. This value is encoded
into a 17-bit MDEC value.
The relationship between M and MDEC is expressed via the following pseudo-code.
M_max=0x00008000, x=0x00004000;
switch (M) {
case 0: x = 0xFFFFFFFF;
case 1: x = 0x00018003;
case 2: x = 0x00010003;
default: for (i = M; i <= M_max; i++)
x = (((x ^ (x>>1)) & 1) << 14) | ((x>>1) & 0x3FFF); }
MDEC[16:0] = x;
The values for SELP, SELI, and SELR depend on the value for M as expressed by the
following pseudo-code:
if (M < 60) then
SELP = (M>>1) + 1
else
SELP = 31;
if (M > 16384) then
SELI = 1
else if (M > 8192) then
SELI = 2
else if (M > 2048) then
SELI = 4
else if (M >= 501) then
SELI = 8
else if (M >=60) then
SELI = 4*(1024/(M+9))
else
SELI = (M & 0x3C) + 4; /* & denotes bitwise AND */
SELR = 0;
Remark: If the 32 kHz RTC oscillator is used as the reference input to the PLL, then use
fixed values SELI=1, SELP=6, and SELR=0, instead of applying the above rules. These
values reduce the PLL loop bandwidth to combat the effect of reference oscillator jitter on
the PLL output signal.
Remark: The values for SELP, SELI, and SELR are generated by the encoding block
when the spread spectrum clock generator is enabled and need not be programmed
explicitly.
Remark: While the PLL0 output is in use, do not change the MDEC value. Changing the
MDEC value changes the FCCO frequency and can cause the system to fail.
4.5.37.5.2System PLL spread spectrum control register 1
Table 71.System PLL spread spectrum control register 1 (SYSPLLSSCTRL1, address 0x4000 01C4) bit description
BitSymbolValueDescriptionReset
18:0MDM- divider value with fraction.
19MDREQMD reload request. When a 1 is written to this bit, the MD value is loaded into the PLL.
22:20MFProgrammable modulation frequency fm = Fref/Nss with Fref = Fin/N
25:23MRProgrammable frequency modulation depth
value
0
MD[18:11]: integer portion of the feedback divider value.
MD[10:0]: fractional portion of the feedback divider value.
δfmodpk-pk = Fref x k/Fcco = k/MDdec
0 = no spread
0b000 => k = 0 (no spread spectrum)
0b001 => k ≈ 1
0b010 => k ≈ 1.5
0b011 => k ≈ 2
0b100 => k ≈ 3
0b101 => k ≈ 4
0b110 => k ≈ 6
0b1 11 => k ≈ 8
The PDRUNCFG register controls the power to the various analog blocks.
Remark: for safety, this register should not be written. Changing the contents of
PDRUNCFG should be accomplished by writing to PDRUNCFGSET and/or
PDRUNCFGCLR. This prevents inadvertent changes to unintended bits. Reserved bits
must not be changed by user software.
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
Regarding bits 13 through 16, see Section 2.1.1
Table 72. Power Configuration register (PDRUNCFG, address 0x4000 021 0) bit description
BitSymbolDescriptionReset
2:0-.3PDEN_IRC_OSCIRC oscilla tor output. 0 = Powered; 1 = Powered down.0
4PDEN_IRCIRC oscillator. 0 = Powered; 1 = Powered down.0
5PDEN_FLASHFlash memory. 0 = Powered; 1 = Powered down.0
6-Reserved.7PDEN_BOD_RSTBrown-out Dete ct reset. 0 = Powered; 1 = Powered down.0
8PDEN_BOD_INTRBrown-out Detect interrupt. 0 = Powered; 1 = Powered down.1
9-Reserved.10PDEN_ADC0ADC0. 0 = Powered; 1 = Powered down.1
12:11-Reserved.13PDEN_SRAM0AFirst 8 KB of SRAM0. 0 = Powered; 1 = Powered down.0
14PDEN_SRAM0BRemaining portion of SRAM0. 0 = Powered; 1 = Powered down.0
15PDEN_SRAM1SRAM1. 0 = Powered; 1 = Powere d down.0
16PDEN_SRAM2SRAM2 (undedicated 8 KB RAM). 0 = Powered; 1 = Powered down.0
17PDEN_ROMROM. 0 = Powered; 1 = Powered dow n.0
18-Reserved.19PDEN_VDDAVdda to the ADC, must be enabled for the ADC to work. Also see bit 23. 0 = Powered;
20PDEN_WDT_OSCWatchdog oscillator. 0 = Powered; 1 = Powered down.1
21-Reserved.22PDEN_SYS_PLLPLL0. 0 = Powered; 1 = Powered down.1
23PDEN_VREFPVrefp to the ADC, must be enabled for the ADC to work. Also see bit 19. 0 = Powered;
Writing a 1 to a bit position in PDRUNCFGSET sets the corresponding position in
PDRUNCFG. This is a write-only register. For bit assignments, see Table 72
Table 73. Power configuration set register (PDRUNCFGSET, address 0x4000 0214) bit description
BitSymbolDescriptionReset value
31:0PD_SET Writing ones to this register sets the corresponding bit or bits in the PDRUNCFG register, if
-
they are implemented.
Bits that do not correspond to defined bits in PDRUNCFG are reserved and only zeroes
should be written to them.
4.5.40Power configuration clear register
Writing a 1 to a bit position in PDRUNCFGCLR clears the corresponding position in
PDRUNCFG. This is a write-only register. For bit assignments, see Table 72
Table 74. Power configuration clear register (PDRUNCFGCLR, address 0x4000 0218) bit description
BitSymbolDescriptionReset value
31:0PD_CLR Writing ones to this register clears the corresponding bit or bits in the PDRUNCFG register,
if they are implemented.
Bits that do not correspond to defined bits in PDRUNCFG are reserved and only zeroes
The STARTER0 and STARTER1 registers enable an interrupt for wake-up from
deep-sleep and power-down modes.
Some interrupts are typically used in sleep mode only and will not occur during
deep-sleep or power-down modes because relevant clocks are stopped. However, it is
possible to enable those clocks (significantly increasing power consumption in the
reduced power mode), making these wake-ups possible.
The pattern match feature of the pin interrupt requires a clock in order to operate, and will
not wake up the device from reduced power modes beyond Sleep mode.
Whether peripheral interrupts can occur during deep-sleep or power-down modes
depends on the peripheral, its configuration, and system setup.
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
Remark: Also enable the corresponding interrupts in the NVIC. See Table 4 “
enabled.Typically used in sleep mode only since the peripheral clock must be running for it
to function.
27ADC0_SEQBA DC0 sequence B interrupt wake-up. 0 = Wake-up disabled. 1 = Wake-up
enabled.Typically used in sleep mode only since the peripheral clock must be running for it
to function.
28ADC0_THCMP ADC0 threshold and error interrupt wake-up. 0 = Wake-up disabled. 1 = Wake-up
enabled.Typically used in sleep mode only since the peripheral clock must be running for it
to function.
29RTCRTC interrupt alarm and wake-up timer. 0 = Wake-up disabled. 1 = Wake-up enabled.0
30-Reserved. Read value is undefined, only zero should be written.31MAILBOXMailb ox interrupt wake-up. 0 = Wake-up disabled. 1 = Wake-up enabled.At least one CPU
must be running in order for a mailbox interrupt to occur. Present on LPC54102 devices.
…continued
value
0
0
0
0
0
0
0
0
0
0
4.5.42Start enable register 1
The STARTER1 register selects additional interrupts that may wake up the part from
deep-sleep and power-down modes.
Some interrupts are typically used in sleep mode only and will not occur during
deep-sleep or power-down modes because relevant clocks are stopped. However, it is
possible to enable those clocks (significantly increasing power consumption in the
reduced power mode), making these wake-ups possible.
The pattern match feature of the pin interrupt requires a clock in order to operate, and will
not wake up the device from reduced power modes beyond Sleep mode.
Remark: Also enable the corresponding interrupts in the NVIC. See Table 5 “
2PINT5GPIO pin interrupt 5 wake-up. 0 = Wake-up disabled. 1 = Wake-up enabled. Not for pattern
3PINT6GPIO pin interrupt 6 wake-up. 0 = Wake-up disabled. 1 = Wake-up enabled. Not for pattern
4PINT7GPIO pin interrupt 7 wake-up. 0 = Wake-up disabled. 1 = Wake-up enabled. Not for pattern
7:5-Reserved. Read value is undefined, only zero should be written.0
8RITRepetitive Interrupt Timer interrupt wake-up. 0 = Wake-up disabled. 1 = Wake-up enabled.
31:15 -Reserved. Read value is undefined, only zero should be written.-
value
0
match.
0
match.
0
match.
0
match.
0
Typically used in sleep mode only since the peripheral clock must be running for it to function.
4.5.43Start enable set register 0
Writing a 1 to a bit position in STARTERSET0 sets the corresponding position in
STARTER0. This is a write-only register. For bit assignments, see Table 75
Table 77.Start enable set register 0 (STARTERSET0, address 0x4000 0248) bit des cription
BitSymbolDescriptionReset value
31:0START_SET0 Writing ones to this register sets the corresponding bit or bits in the STARTER0
register, if they are implemented.
Bits that do not correspond to defined bits in STARTER0 are reserved and only
zeroes should be written to them.
.
-
4.5.44Start enable set register 1
Writing a 1 to a bit position in STARTERSET1 sets the corresponding position in
STARTER1. This is a write-only register. For bit assignments, see Table 76
Table 78. Start enable set register 1 (STARTERSET1, address 0x4000 024C) bit description
BitSymbolDescriptionReset value
31:0START_SET1 Writing ones to this register sets the corresponding bit or bits in the STARTER1
register, if they are implemented.
Bits that do not correspond to defined bits in STARTER1 are reserved and only
zeroes should be written to them.
.
-
4.5.45Start enable clear register 0
Writing a 1 to a bit position in STARTERCLR0 clears the corresponding position in
STARTER0. This is a write-only register. For bit assignments, see Table 75
These registers control usage aspects of the two CPUs in an LPC54102 device. They are
not used in an LPC54101 device that only provide a single CPU.
4.5.47.1CPU Control register
The CPUCTRL register provides control for the 2 CPUs. Note that the Cortex-M4 is
factory set to be the master. The user can assign Cortex-M0+ to be the master CPU via
this register if needed after it is brought out of reset by Cortex-M4. The master CPU
cannot be reset or have its clock disabled via this register. Only the master CPU can use
the Power APIs to cause the device to enter reduced power modes.
If the clock to the slave CPU is to be disabled at some point in the application for power
savings, that CPU should have entered its own sleep mode prior to that point. This avoids
incomplete operations in the slave CPU.
Table 81. CPU Control register (CPUCTRL, address 0x4000 0300) bit description
BitSymbolValueDescriptionReset
0MASTERCPUIndicates which CPU is considered the master. This is factory set assign the
1--Reserved. Read value is undefined, only zero should be written.2CM4CLKENCortex-M4 clock enable.1
3CM0CLKENCortex-M0+ clock enable.1
4CM4RSTENCortex-M4 reset.0
5CM0RSTENCortex-M0+ reset.0
6POWERCPUIdentifies the own er of reduced power mode control: which CPU can cause the
14:7--Reserved. Read value is undefined, only zero should be written.15--Must be written as a 1.31:16--Must be written as 0xC0C4 for the write to have an effect.-
value
1
Cortex-M4 as the master.
The master CPU cannot have its clock turned off via the related CMnCLKEN bit or
be reset via the related CMxRSTEN in this register.
The slave CPU wakes up briefly following device reset, then goes back to sleep
until activated by the master CPU.
0M0+. Cortex-M0+ is the master CPU.
1M4. Cortex-M4 is the master CPU.
0Disabled. The Cortex-M4 clock is not enabled.
1Enabled. The Cortex-M4 clock is enabled.
0Disabled. The Cortex-M0+ clock is not enabled.
1Enabled. The Cortex-M0+ clock is enabled.
0Disabled. The Cortex-M4 is not being reset.
1Enabled. The Cortex-M4 is being reset.
0Disabled. The Cortex-M0+ is not being reset.
1Enabled. The Cortex-M0+ is being reset.
1
device to enter Deep Sleep, Power-down, and Deep Power-down modes.
0M0+. Cortex-M0+ is the owner of reduced power mode control.
1M4. Cortex-M4 is the owner of reduced power mode control.
CPBOOT can be used in an application that uses both CPUs in order to send the slave
processor (the CPU not selected as the master by the MASTERCPU bit in the CPUCTRL
register) to an appropriate boot address that is different than the master CPU.
T able 82. Coprocessor Boot register (CPBOOT, address 0x4000 0304) bit description
BitSymbolDescriptionReset value
31:0BOOTADDRSlave processor boot address.0
4.5.47.3Coprocessor Stack register
CPST ACK can be used in an application that uses both CPUs in order to set up the stack
for the slave processor (the CPU not selected as the master by the MASTERCPU bit in
the CPUCTRL register) to an appropriat e ad dr e ss that is different than the master CPU.
T able 83. Coprocessor Stack register (CPSTACK, address 0x4000 0308) bit description
BitSymbolDescriptionReset value
31:0STACKADDRSlave processor stack address.0
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
4.5.47.4Coprocessor Status register
CPU_STA T provid es some status for dual CPUs. This register can be read by software at
run time, or with a debugger.
Table 84. Coprocessor Status register (CPSTAT, address 0x4000 030C) bit description
BitSymbolDescriptionReset value
0CM4SLEEPINGWhen 1, the Cortex-M4 CPU is sleeping.0
1CM0SLEEPINGWhen 1, the Cortex-M0+ CPU is sleeping.0
2CM4LOCKUPWhen 1, the Cortex-M4 CPU is in lockup.0
3CM4LOCKUPWhen 1, the Cortex-M0+ CPU is in lockup.0
31:4-Reserved. Read value is undefined, only zero should be written.-
This register contains an ID that reflects the boot ROM and device revisions.
T able 88. Device ID1 register (DEVICE_ID1, address 0x4000 03FC) bit description
BitSymbolDescriptionValue
31:0REVIDRevision.part dependent
T able 89. Device ID1 register values
Part numberPart ID
LPC54101J256 0x0881FECE (device revision ‘B’ and boot code version 17.1)
LPC54101J5120x0881FECE (device revision ‘B’ and boot code version 17.1)
LPC54102J256 0x0881FECE (device revision ‘B’ and boot code version 17.1)
LPC54102J5120x0881FECE (device revision ‘B’ and boot code version 17.1)
LPC54101J2560x08C1FECE (device revision ‘C’ and boot code version 17.1)
LPC54101J5120x08C1FECE (device revision ‘C’ and boot code version 17.1)
LPC54102J256 0x08C1FECE (device revision ‘C’ and boot code version 17.1)
LPC54102J5120x08C1FECE (device revision ‘C’ and boot code version 17.1)
4.5.51Asynchronous peripheral reset control register
The ASYNCPRESETCTRL register allows software to reset specific peripherals attached
to the async APB bridge. Writing a zero to any assigned bit in this register clears the reset
and allows the specified peripheral to operate. Writing a one asserts the reset.
Table 90. Asynchronous peripheral reset control register (ASYNCPRESETCTRL, address 0x4008 0000) bit
description
BitSymbolDescriptionReset value
0-Reserved1USART0USART0 reset control.
2USART1USART1 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.0
3USART2USART2 reset control.0 = Clear reset to this function. 1 = Assert reset to this function.0
4USART3USART3 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.0
5I2C0I2C0 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.
6I2C1I2C1 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.0
7I2C2I2C2 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.0
8-Reserved9SPI0SPI0 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.0
10SPI1SPI1 reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.0
12:11-Reserved13CT32B0Standard counter/timer CT32B0 reset control. 0 = Clea r reset t o this functi on. 1 = Assert
14CT32B1Standard counter/timer CT32B1 reset control. 0 = Clea r reset t o this functi on. 1 = Assert
15FRG0FRG reset control. 0 = Clear reset to this function. 1 = Assert reset to this function.0
31:16-Reserved-
0
0 = Clear reset to this function. 1 = Assert reset to this function.
0
reset to this function.
0
reset to this function.
4.5.52Asynchronous peripheral reset control set register
Writing a 1 to a bit position in ASYNCPRESETCTRLSET sets the corresponding position
in ASYNCPRESETCTRL. This is a write-only register. For bit assignments, see Table 90
Table 91. Asynchronous peripheral rese t control set register (ASYNCPRESETCTRLSET, address 0x4008 0004) bit
description
BitSymbolDescriptionReset value
31:0ARST_SETWriting ones to this register sets the corresponding bit or bits in the
-
ASYNCPRESETCTRL register, if they are implemented.
Bits that do not correspond to defined bits in ASYNCPRESETCTRL are reserved and
only zeroes should be written to them.
4.5.53Asynchronous peripheral reset control clear register
Writing a 1 to a bit position in ASYNCPRESETCTRLCLR clears the corresponding
position in PRESETCTRL0. This is a write-only register. For bit assig nments, see
Table 92. Asynchronous peripheral rese t control clear register (ASYNCPRESETCTRLCLR, address 0x4008 0008)
bit description
BitSymbolDescriptionReset value
31:0ARST_CLRWriting ones to this register clears the corresponding bit or bits in the
-
ASYNCPRESETCTRL register, if they are implemented.
Bits that do not correspond to defined bits in ASYNCPRESETCTRL are reserved and
only zeroes should be written to them.
4.5.54Asynchronous APB clock control register
This register controls how the clock selected for the asynchronous APB peripherals is
divided to provide the clock to the asynchronous peripherals. The clock will be stopped if
the DIV field is set to zero.
Table 93. Asynchronous APB clock control register (ASYNCAPBCLKCTRL, address 0x4008 0010) bit description
BitSymbolDescriptionReset value
0-Reserved. Read value is undefined, only zero should be written.1USART0Controls the clock for USART0. 0 = Disable; 1 = Enable.0
2USART1Controls the clock for USART1. 0 = Disable; 1 = Enable.0
3USART2Controls the clock for USART2. 0 = Disable; 1 = Enable.0
4USART3Controls the clock for USART3. 0 = Disable; 1 = Enable.0
5I2C0Controls the clock for I2C0. 0 = Disable; 1 = Enable.
6I2C1Controls the clock for I2C1. 0 = Disable; 1 = Enable.0
7I2C2Controls the clock for I2C2. 0 = Disable; 1 = Enable.0
8-Reserved. Read value is undefined, only zero should be written.9SPI0Controls the clock for SPI0. 0 = Disable; 1 = Enable.0
10SPI1Controls the clock for SPI1. 0 = Disable; 1 = Enable.0
12:11-Reserved. Read value is undefined, only zero should be written.13CT32B0Controls the clock for CT32B0. 0 = Disable; 1 = Enable.0
14CT32B1Controls the clock for CT32B1. 0 = Disable; 1 = Enable.0
15FRG0Controls the clock for the Fractional Rate Generator used with the USARTs. 0 = Disable;
31:16-Reserved. Read value is undefined, only zero should be written.-
0
1 = Enable.
4.5.55Asynchronous APB clock control set register
Writing a 1 to a bit position in ASYNCAPBCLKCTRLSET sets the corresponding position
in ASYNCAPBCLKCTRL. This is a write-only register. For bit assignments, see Table 90
Table 94. Asynchronous APB clock control set register (ASYNCAPBCLKCTRLSET, address 0x4008 0014) bit
description
BitSymbolDescriptionReset value
31:0ACLK_SETWriting ones to this register sets the correspon ding bit or bits in the
ASYNCAPBCLKCTRL register, if they are implemented.
Bits that do not correspond to defined bits in ASYNCPRESETCTRL are reserved and
only zeroes should be written to them.
.
Page 64
NXP Semiconductors
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
4.5.56Asynchronous APB clock control clear register
Writing a 1 to a bit position in ASYNCAPBCLKCTRLCLR clears the corresponding
position in ASYNCAPBCLKCTRL. This is a write-only register. For bit assignments, see
Table 90
Table 95. Asynchronous APB clock control clear register (ASYNCAPBCLKCTRLCLR, address 0x4008 0018) bit
description
BitSymbolDescriptionReset value
31:0ACLK_CLR Writing ones to this register clears the corresponding bit or bits in the
ASYNCAPBCLKCTRL register, if they are implemented.
Bits that do not correspond to defined bits in ASYNCAPBCLKCTRL are reserved and
only zeroes should be written to them.
.
-
4.5.57Asynchronous clock source select register A
This register selects a potential clock for the asynchronous APB peripherals from among
several clock sources. The clock selected becomes one of the inputs to the asynchronous
clock source select register B (see Table 97
asynchronous APB clock.
), which selects the final clock source for the
Remark: Note that this selection is internally synchronized: the clock being switched from
and the clock being switched to must both be running and have occurred in specific states
before the selection actually changes.
Table 96.Asynchronous clock source select register A (ASYNCAPBCLKSELA, address
0x4008 0020) bit description
BitSymbolValueDescriptionReset value
1:0SELClock source for asynchronous clock source selector A0
This register selects the clock source for the asynchronous APB clock.
Remark: Note that this selection is internally synchronized: the clock being switched from
and the clock being switched to must both be running and have occurred in specific states
before the selection actually changes.
Table 97.Asynchronous clock source select register B (ASYNCAPBCLKSELB, address
BitSymbolValueDescriptionReset value
1:0SELClock source for asynchronous clock source selector B.0
31:2--Reserved-
4.5.59Asynchronous APB clock divider register
This register controls how the asynchronous APB clock is divided before use by
peripherals. The clock can be shut down completely by setting the DIV field to zero.
All USART peripherals share a common clock (see Figure 3), which can be adjusted by a
fractional divider. This register sets the MULT and DIV values for the fractional rate
generator. The output rate is:
USART clock = async bridge clock rate / (1 + MULT / DIV
The async bridge clock rate is the USART clock configured as selected via
ASYNCAPBCLKSELA (Section 4.5.57
divided as defined by the ASYNCCLKDIV register (Section 4.5.59
Remark: In order to use the fractional baud rate generator, 0xFF must first be written to
the DIV value to yield a denominator value of 256. All other values are not supported.
See also Section 21.3.1 “
Configure the USART clock and baud rate” and Section 21.7.1
The BOD control register selects four separate threshold values for sending a BOD
interrupt to the NVIC and for forced reset. Reset and interrupt threshold values listed in
Table 100
Both the BOD interrupt and the BOD reset can wake-up the chip from Sleep , Deep- sleep,
and Power-down modes if enabled. See Chapter 30 “
control API”.
Table 100. BOD control register (BODCTRL, address 0x4002 C044) bit description
BitSymbolValueDescriptionReset value
1:0BODRSTLEVBOD reset level0
2BODRSTENABOD reset enable0
4:3BODINTLEVBOD interrupt level0
5BODINTENABOD interrupt enable0
6BODRSTSTATBOD reset status. When 1, a BOD reset has occurred. Cleared by writing 1
7BODINTSTATBOD in terrupt status. When 1, a BOD interrupt has occurred. Cleared by
31:8--Reserved-
0x0Level 0: 1.5 V
0x1Level 1: 1.85 V
0x2Level 2: 2.0 V
0x3Level 3: 2.3 V
0Disable reset function.
1Enable reset function.
0x0Level 0: 2.05 V
0x1Level 1: 2.45 V
0x2Level 2: 2.75 V
0x3Level 3: 3.05 V
Assertion of the POR or the BOD reset, once the operating voltage attains a usable level,
starts the IRC. After the IRC-start-up time (maximum of 6 s on power-up), the IRC
provides a stable clock output. The reset remains asserted until the external Reset is
released, the oscillator is running, and the flash controller has completed its initialization.
On the assertion of any reset source (ARM software reset, POR, BOD reset, External
reset, and Watchdog reset), the following processes are initiated:
1. The IRC is enabled or starts up if not running.
2. The flash wake-up timer starts. This takes approximately 250 ms or less.
3. The boot code in the ROM starts. The boot code performs the boot tasks and may
When the internal Reset is removed, the processor begins executing at address 0, which
is initially the Reset vector mapped from the boot block. At that point, all of the processor
and peripheral registers have been initialized to predetermined values.
4.6.2Start-up behavior
See Figure 4 for the start-up timing after reset. The IRC is the default clock at Reset and
provides a clean system clock shortly after the supply pins reach operating voltage.
The part includes up to four levels for monitoring the voltage on the VDD pin. If this voltage
falls below one of the selected levels, the BOD asserts an interrupt signal to the NVIC or
issues a reset, depending on the value of the BODRSTENA bit in the BOD control register
(Table 100
The interrupt signal can be enabled for interrupt in the Interrupt Enable Register in the
NVIC (see Table 4
signal by reading a dedicated status register.
If the BOD interrupt is enabled in the STARTER0 register and in the NVIC, the BOD
interrupt can wake up the chip from reduced power modes, not including deep
power-down.
If the BOD reset is enabled, the forced BOD reset can wake-up the chip from reduced
power modes, not including deep power-down.
On the LPC5410x, the BOD is enabled by default after power-up. At this time the BOD is
set to the lowest value (1.5v) with no factory trimming applied. In the BOD block the
interrupt portion is turned off and only the reset portion is on. After POR/BOD resets, the
BootROM takes over and applies the factory BOD trim value so that the trip points
become accurate. See the LPC5410x data sheet for BOD interrupt/reset voltage levels in
the BOD static characteristics.
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
).
) in order to cause a CPU interrupt; if not, software can monitor the
4.6.4PLL functional description
The PLL is typically used to create a frequency that is higher than other on-chip clock
sources, and used to operate the CPU and/or other on-chip functions. It may also be used
to obtain a specific clock that is otherwise not available. For example, a clock with a
frequency of any integer MHz (e.g. the 12 MHz IRC) can be divided down to 1 MHz, then
multiplied up to any other integer MHz (e.g. 13, 14, 15, etc.).
• Input frequency: Limited to on-chip sources, including the 32 kHz RTC clock and 12
• CCO frequency: 75 MHz to 150 MHz.
• Output clock range: 1.2 MHz to 150 MHz. Note that the upper frequency limit of the
• Programmable dividers:
• Lock detector.
• Power-down mode.
• Fractional divider mode.
• Spread Spectrum mode.
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
MHz IRC, or up to 24 MHz from the CLKIN pin.
PLL exceeds the upper frequency limit of this device.
– Pre-divider. Divide by N, where N = 1 to 256
– Feedback-divider. Divide by M or 2 x M (where M = 1 to 32768)
– Post-divid er. Divide by 1 or 2 x P, where P = 1 to 32
4.6.4.2PLL description
A number of sources may be used as an input to the PLL, see Figure 3. The PLL input, in
the range of 32 kHz to 24 MHz, may initially be divided down by a valu e "N", which may be
in the range of 1 to 256. This input division provides a greater number of possibilities in
providing a wide range of output frequencies from the same input frequency.
Following the PLL input divider is the PLL multiplier. The multiplier can multiply the input
divider output through the use of a Current Controlled Oscillator (CCO) by a value "M", in
the range of 1 through 32,768. The resulting freque ncy must be in the range of 75 MHz to
150 MHz. The multiplier works by dividing the CCO output by the value of M, then using a
phase-frequency detector to compare the divided CCO output to the multiplier input. The
error value is filtered and used to adjust the CCO frequency.
There are additional dividers at the PLL output to bring the frequency down to what is
needed for the CPU, USB, and other peripherals. The PLL output dividers are described
in the Clock Dividers section following the PLL description. A block diagram of the PLL is
shown in Figure 5
All of the dividers use an encoded value, not th e bina ry di vide va lue. T he set_ pll API ( see
Section 30.4.1
not accept pre- and post-divider values. See s ec tion Section 4.6.4.3
for information on how to obtain divider values.
4.6.4.2.1Lock detector
The lock detector measures the phase difference between the rising edges of the input
and feedback clocks. Only when this difference is smaller than the so called “lock
criterion” for more than eight consecutive input clock periods, the lock output switches
from low to high. A single too large phase difference immediately resets the counter and
causes the lock signal to drop (if it was high). Requiring eig h t phase me asurements in a
row to be below a certain figure ensures that the lock detector will not indicate lock until
both the phase and frequency of the input and feedback clocks are very well aligned. This
effectively prevents false lock indications, and thus ensures a glitch free lock signal.
) adjusts the value for the main feedback divider (the M divider), but does
The PLL lock indicator is not dependable when Fref is below 100 kHz or above 20 MHz.
In fractional mode and spread spectrum mode, the PLL will generally not lock, software
should use a time interval to insure the PLL will be stable. See Section 4.6.4.5.1
4.6.4.2.2Power-down
To reduce the power consumption when the PLL clock is not needed, a PLL Power-down
mode has been incorporated. This mode is enabled b y settin g th e SYSPLL_PD bit to on e
in the power configuration register PDRUNCFG (Section 4.5.38
internal current reference will be turned off, the oscillator and the phase-frequency
detector will be stopped and the dividers will enter a reset state. While in PLL Power-down
mode, the lock output will be low to indicate that the PLL is not in lock. When the PLL
Power-down mode is terminated by setting the SYSPLL_PD bit to zero, the PLL will
resume its normal operation and will make the lock signal high once it has regained lock
on the input clock.
4.6.4.3Operating modes
The PLL includes several main operating modes, and a power-down mode. These are
summarized in Table 101
Bits in SYSPLLCTRL:SEL_EXT bit in
BYPA SS UPLIMOFF BANDSEL
[1]
and detailed in the following sections.
SYSYPLLSSCTRL0
xxx1
). In this mode, the
UM10850
.
PD bit in
SYSYPLLSSCTRL1
[1] Use 1 if the PLL output is used even though the PLL is not altering the frequency.
4.6.4.3.1Normal modes
Typica l operation of the PLL includ es an optional pre-divide of the PLL input, followe d by a
frequency multiplication, and finally an optional post-divide to produce the PLL output.
Notations used in the frequency equations:
• Fin = the input to the PLL.
• Fout = the output of the PLL.
• Fref = the PLL reference frequency, the input to the phase frequency detector.
• N = optional pre-divider value.
• M = feedback divider value, which represen ts the multiplier for th e PLL . Not e th at an
additional divide-by-2 may optionally be included in the divider path.
• P = optional post-divider value. An additional divide-by-2 is included in the
post-divider path.
A block diagram of the PLL as used in normal modes is shown in Figure 3
In all variations of normal mode, the following requirements must be met:
In the equations, use N = 1 when the pre-divider is not used:
When the extra divide by 2 is in the feedback divider path (BYPASSCCODIV2 = 0):
Fout = Fcco = 2 x M x Fin / N
When the extra divide by 2 is not in the feedback divider path (BYPASSCCODIV2 = 1):
Fout = Fcco = M x Fin / N
Normal mode with post-divide and optional pre-divide
In the equations, use N = 1 when the pre-divider is not used:
When the extra divide by 2 is in the feedback divider path (BYPASSCCODIV2 = 0). Use N
= 1 when the pre-divider is not used:
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
Fout = Fcco / (2 x P) = M x Fin / (N x P)
When the extra divide by 2 is not in the feedback divider path (BYPASSCCODIV2 = 1):
Fout = Fcco / (2 x P) = M x Fin / (N x 2 x P)
4.6.4.3.2Fractional divider mode
The PLL includes an fractional divide mode. The fractional mode uses an integer divide
value and that value plus 1 in a ratio determined by the fr actional part of the divide value in
order to obtain an average rate th at is a fractional multiple of the PLL reference freque ncy.
The SEL_EXT bit in the SYSPLLSSCTRL0 register determines whether the fractional
divider is used (SEL_EXT = 0) or bypassed (SEL_EXT = 1) . In the first case, the MD value
from the SYSPLLSSCTRL1 register is used to generate the feedback divider values. In
the latter case, the MDEC value from the SYSPLLSSCTRL0 register is used directly to
control the feedback divider.
When the fractional divider is active, the spread spectrum controller block generates
divider values M and M+1 in the correct proportion so that the average CCO frequency is
represented by the specified fraction. the average CCO frequency is:
Fcco = 2 * (MD[18:11] + MD[10:0] * 2
The overall effect of the PLL otherwise the same as normal modes. A block diagram of the
PLL as used in fractional mode is shown in Figure 6
The spread spectrum mode allows the PLL to change frequency automatically in a
programmable manner.
A block diagram of the PLL as used in fractional mode is shown in Figure 6
4.6.4.3.4Power-down mode
If the PLL is not used, or if it there are cases where it is turned off in a running application ,
power can be saved by putting the PLL in power-down mode. Before this is done, the
CPU and any peripherals that are not meant to stopped as well must be running from
some other clock source.
4.6.4.4PLL Related registers
The PLL is controlled by registers described elsewhere in this chapter, summarized below.
Table 102. System PLL status register (SYSPLLSTAT, address 0x4000 01B4) bit description
RegisterDescriptionReference
SYSPLLCTRLPLL controlSection 4.5.37.1
SYSPLLSTATPLL statusSection 4.5.37.2
SYSPLLNDECPLL N dividerSection4.5.37.3
Table 102. System PLL status register (SYSPLLSTAT, address 0x4000 01B4) bit description
RegisterDescriptionReference
SYSPLLPDECPLL P dividerSection 4.5.37.4
SYSPLLSSCTRL0PLL spread spectrum control 0Section 4.5.37.5.1
SYSPLLSSCTRL1PLL spread spectrum control 1Section 4.5.37.5.2
4.6.4.5PLL usage
As previously noted, the PLL divider settings used in the PLL registers are not simple
binary values, they are encoded as shown in the PLL register descriptions. The divider
values and their encoding can be found by calculation using the information in this
document. For simple PLL usage with no pre- or post-divide, the set_pll API can be used
(see Section 30.4.1
latter two possibilities are recommended in order to avoid PLL setup issues.
4.6.4.5.1Procedure for determining PLL settings
In general, PLL configuration values may be found as follows:
1. Identify a desired PLL output frequency. This may depend on a specific interface
2. Determine which clock source to use as the PLL input. This can be influenced by
3. Identify PLL settings to obtain the desired output form the selected input. The Fcco
4. There may be several ways to obtain the same PLL output frequency. PLL power
5. Check that the selected settings meet all of the PLL requirements:
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
). Also, a PLL setting calculator can be found on the NXP website. The
frequency needed or be based on expected CPU performance requirements, and
may be limited by system power availability.
power or accuracy required, or by the potential to obtain the desired PLL output
frequency.
frequency must be either the actual desired output frequency, or the desired output
frequency times 2 x P, where P is from 2 to 32. The Fcco frequency must also be a
multiple of the PLL reference frequency, which is either the PLL input, or the PLL input
divided by N, where N is from 2 to 256.
depends on Fcco (a lower frequency uses less power) and the divider used.
Bypassing the input and/or output divider saves power.
– Fin is in the range of 32 kHz to 24 MHz.
– Fcco is in the range of 75 MHz to 150 MHz.
– Fout is in the range of 1.2 MHz to 150 MHz.
– The pre-divider is either bypassed, or N is in the range of 2 to 256.
– The post-divider is either bypassed, or P is in the range of 2 to 32.
– M is in the range of 3 to 32,768.
Also note that PLL startup time becomes longer as Fref drops below 500 kHz. At 500
kHz and above, startup time is up to 500 microseconds. Below 500 kHz, startup time
can be estimated as 200 / Fref, or up to 6.1 milliseconds for Fref = 32 kHz. PLL
accuracy and jitter is better with higher values of Fref.
4.6.4.5.2PLL setup sequence
The following sequence should be followed to initialize and connect the PLL:
1. Make sure that the PLL output is disconnected from any downstream functions. If the
2. Select a PLL input clock source. See Section 4.5.21 “
3. Set up the PLL dividers and mode settings. See Section 4.5.37 “
4. Wait for the PLL output to stabilize. The value of the PLl lock may not be stable when
5. If the PLL will be used to clock the CPU, change the CPU Clock Divider setting for
6. Connect the PLL to whichever downstream function is will be used with. The structure
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
PLL was previously being used to clock the CPU, and the CPU Clock Divider is being
used, it may be set to speed up operation while the PLL is disconnected.
System PLL clock source select
register”.
PLL registers”.
the PLL reference frequency (FREF, the frequency of REFCLK, which is equal to the
PLL input frequency divided by the pre-divider value) is less than 100 kHz or greater
than 20 MHz. In these cases, the PLL may be assumed to be stable after a start-up
time has passed. This time is 500 μs when Fref is 500 kHz or greater and 200 / Fref
seconds when FREF is less than 500 kHz.
operation with the PLL, if needed. This must be done before connecting the PLL.
of the clock dividers may be seen on the right of Figure 3 “
Clock generation”.
4.6.5Frequency measure function
The Frequency Measure circuit is based on two 14-bit counters, one clocked by the
reference clock and one by the target clock. Synchronization between the clocks is
performed at the start and end of each count sequence.
A measurement cycle is initiated by software setting a control/status bit in the
FREQMECTRL register (Table 61
measurement-in-progress bit which will be cleared by hardware when the measurement
operation is completed.
The measurement cycle terminates when the reference counter rolls-over. At that point
the state of the target counter is loaded into a capture field in the FREQMEAS register,
and the measure-in-progress bit is cleared. Software can read this capture value and
apply to it a specific calculation which will return the precise frequency of the target clock
in MHz.
See Section 4.2.3 “
measure function control register”, Section 8.6.4 “Frequency measure function reference
clock select register”, and Section 8.6.5 “Frequency measure function target clock select
register” for more on this function.
4.6.5.1Accuracy
The frequency measurement function can measure the frequency of any on-chip (or
off-chip) clock (referred to as the target clock) to a high degree of accuracy using another
on-chip clock of known frequency as a reference.
Measure the frequency of a clock signal”, Section 4.5.32 “Frequency
). The software can then poll this same
The following constraints apply:
• The frequency of the reference clock must be (somewhat) greater that the frequency
of the target clock.
• The system clock used to access the frequency measure function register must also
be greater than the frequency of the target clock.
The frequency measurement function circuit is able to measure the ta rget frequency with
an error of less than 0.1%, provided the reference frequency is precisely known.
Uncertainty in the reference clock (for example the +/- 1% accuracy of the IRC) will add to
the measurement error of the target clock. In general, though, this additional error is less
than the uncertainty of the reference clock.
There can also be a modest loss of accuracy if the reference frequency exceeds the
target frequency by a very large margin (25x or more). Accuracy is not a simple function o f
the magnitude of the frequency difference, however. Nearly identical frequency
combinations, still with a spread of about 43x, result in errors of less than 0.05%.
If the target and reference clocks are different by more than a factor of approximately
500, then the accuracy decreases to +/- 4%.
This chapter provides an overview of power related information about LPC5 410x device s.
These devices include a variety of adjustable regulators, power switches, an d clock
switches to allow fine tuning power usage to match requirements at dif ferent perfor mance
levels and reduced power modes. All devices include an on-chip API in the boot ROM to
adjust power consumption in reduced power modes, and provide entry to those modes.
See Chapter 30
To turn analog components on or off in active and sleep modes, use the PDRUNCFG
register (seeTable 72
controls which analog peripherals remain powered up (see Section 30.4.3
“Chip_POWER_EnterPowerMode”). There is no register implemented to turn analog
peripherals on or off for deep-sleep mode or power-down mode.
.
). In deep-sleep and power-down modes, the power profile API
5.2 General description
Power to the part is supplied via two power domains. The main power doma in is powered
by VDD and supplies power to the core, peripheral, memories, inputs and outputs via an
on-chip regulator.
A second, always-on power domain is also powered by Vdd, and includes the RTC and
wakeup timer. This domain always has power as long as sufficient voltage is supplied to
Vdd.
Power use is controlled by settings in register within the SYSCON block, regulator
settings controlled via a Power API, and the operating mode of a CPU. The ROM based
power configuration API configures the part for each reduced power mode. The following
modes are supported in order from highest to lowest power consumption:
1. Active mode: The part is in active mode after a Power-On Reset (POR) and wh en it is
fully powered and operational after booting.
2. Sleep mode:
The sleep mode affects the relevant CPU only. The clock to the core is shut off.
Peripherals and memories are active and operational.
3. Deep-sleep and power-down modes:
The Deep-sleep and power-down modes affect the entire system. In both modes, the
clock to all CPUs is shut down and the peripherals receive no internal clocks. All
SRAM and registers maintain their internal states. Entry to these modes can only be
accomplished by the master CPU in an LPC54102 device.
Through the power profiles API, selected peripherals can be left running for safe
operation of the part (WWDT and BOD).
The differences between Deep-sleep mode and Power-down modes are the
following:
a. In Deep-sleep mode, the flash is in st and-by mode to minimize wake-up time, and
b. In Power-down mode, the flash is also powered down to conserve power at the
expense of a somewhat longer wake-up time.
4. Deep power-down mode:
For maximal power savings, the entire system (CPUs and all peripherals) is shut
down except for the PMU and the RTC. On wake-up, the part reboots. Entry to Deep
power-down mode can only be accomplished by the master CPU in an LPC54102
device.
Table 103. Peripheral configuration in reduced power modes
Off; but can create a wake-up
interrupt in synchronous slave mode
or 32 kHz clock mode
Off; but can create a wake-up
interrupt in slave mode
Off; but can create a wake-up
interrupt in slave mode
Off
Off
Off
configurable
5.2.1Wake-up process
The part always wakes up to the active mode. To wake up from the reduced power
modes, you must configure the wake-up source. Each reduced power mode supports its
own wake-up sources and needs to be configured accordingly as shown in Table 104
Table 104. Wake-up sources for reduced power modes
The LPC5410x support a variety of power control features. In Active mode, when the chip
is running, power and clocks to selected peripherals can be optimized for power
consumption. In addition, there are four special modes of processor power reduction with
different peripherals running: Sleep mode, Deep-sleep mode, Power-down mode, and
Deep power-down mode, activated by the power mode config ure API (see Section 30.4.3
“Chip_POWER_EnterPowerMode”).
Remark: The Debug mode is not supported in Sleep, Deep-sleep, Power-down, or Deep
power-down modes.
5.3.2Active mode
In Active mode, the CPU, memories, and peripherals are clocked by the AHB/CPU clock.
The chip is in Active mode after reset and the default power configuration is determined
by the reset values of the PDRUNCFG, AHBCLKCTRL0, and AHBCLKCTRL1 registers.
The power configuration can be changed during run time.
UM10850
Chapter 5: LPC5410x Power Management
5.3.2.1Power configuration in Active mode
Power consumption in Active mode is determined by the following configuration choices:
• The AHBCLKCTRL registers control which memories and peripherals are running
(Section 4.5.22 “
Control register 1”). Generally speaking, in order to save power , functio ns that are not
needed by the application should be turned off. If specific times are known when
certain functions will not be needed, they can be turned off temporarily and turned
back on when they will be needed.
AHB Clock Control register 0” and Section 4.5.23 “AHB Clock
• The power to various analog blocks (RAMs, PLL, oscillators, the BOD circuit, and the
flash block) can be controlled individually through the PDRUNCFG register
(Table 72
needed by the application. If turned off, time will be needed before these blocks can
be used again after being turned on.
). As with clock controls, these blocks should generally be tuned off if not
• The clock source for the system clock can be selected from the IRC (default), the
system oscillator, the 32 kHz oscillator, or the watchdog oscillator (see Figure 3
related registers).
• The system clock frequency can be selected (see Section 4.6.4 “PLL functional
description” and other clocking related sections). You can find optimal settings for
setting the system PLL by using the set_pll routine in the power API (Section 30.4.1
“Chip_POWER_SetPLL”). Generally speaking, everything uses less power at lower
frequencies, so running the CPU and other device features at a frequency sufficient
for the application (plus some margin) will save power. If the PLL is not needed, it
should be turned off to save power. Also, running the PLL at a lower CCO frequency
saves power.
• Several peripherals use individual peripheral clocks with their own clock dividers. The
peripheral clocks can be shut down through the corresponding clock divider registers
if the root clock is still needed for another function.
• The power API provides an easy way to optimize power consumption depending on
5.3.3Sleep mode
In Sleep mode, the system clock to the CPU is stopped and execution of instructions is
suspended until either a reset or an interrupt occurs.
Peripheral functions, if selected to be clocked in the AHBCLKCTRL registers, continue
operation during Sleep mode and may generate interrupts to cause the processor to
resume execution. Sleep mode eliminates dynamic power used by the processor itself,
memory systems and related controllers, and internal buses. The proce ssor state and
registers, peripheral registers, and internal SRAM values are maintained, and the logic
levels of the pins remain static.
As in active mode, the power API provides an easy way to optimize power consumption
depending on CPU load and performance requirements in sleep mode. See
Section 30.4.3 “
Chapter 5: LPC5410x Power Management
CPU load and performance requirements. See Chapter30 “
profiles/Power control API”.
Chip_POWER_EnterPowerMode”.
UM10850
LPC5410x Power
5.3.3.1Power configuration in Sleep mode
Power consumption in Sleep mode is configured by the same settings as in Active mode:
• The clock remains running.
• The system clock frequency remains the same as in Active mode, but the processor is
not clocked.
• Analog and digital peripherals are powered and selected as in Active mode through
the PDRUNCFG, AHBCLKCTRL0, AHBCLKCTRL1 registers.
5.3.3.2Programming Sleep mode
The following steps must be performed to enter Sleep mode:
1. In the NVIC, enable all interrupts that are needed to wake up the part.
2. Call power API:
Remark: The
3. Execute the Wait-For-Interrupt (WFI) instruction.
5.3.3.3Wake-up from Sleep mode
Sleep mode is exited automatically when an interrupt enabled by the NVIC arrives at the
processor or a reset occurs. After wake-up caused by an interrupt, the device returns to its
original power configuration defined by the contents of the PDRUNCFG and the
AHBCLKCTRL registers. If a reset occurs, the microcontroller enters the default
configuration in Active mode.
pPWRD->power_mode_configure(SLEEP, peripheral);
peripheral
parameter is don’t care.
5.3.4Deep-sleep mode
In Deep-sleep mode, the system clock to the processor is disabled as in Sleep mode. All
analog blocks are powered down by default but can be selected to keep running through
the power API if needed as wake-up sources. The main clock, and theref ore all periphera l
clocks, are disabled. The IRC is disabled. The flash is in stand-by mode.
Deep-sleep mode eliminates all power used by analog p eriphera ls an d all dy namic powe r
used by the processor itself, memory systems and related controllers, and internal buses.
The processor state and registers, peripheral registers, and internal SRAM values are
maintained, and the logic levels of the pins remain static.
5.3.4.1Power configuration in Deep-sleep mode
Power consumption in Deep-sleep mode is determined primarily by which analog
wake-up sources remain enabled. Serial peripherals and p in interrupts configured to wake
up the contribute to the power consumption only to the extent that they are clocked by
external sources. All wake-up events (other than reset) must be enab led in the STARTER
registers and in the NVIC. In addition, any related analog block (e.g. the RTC oscillator or
the watchdog oscillator) must be explicitly enabled through the power API function
power_mode_configure() for wake-up. See Table 104
5.3.4.2Programming Deep-sleep mode
The following steps must be performed to enter Deep-sleep mode:
1. Select wake-up sources and enable all selected wake-up events in the STARTER
2. Select the IRC as the main clock and set the AHBCLKDIV register to 1. See Table 45
In Power-down mode, the system clock to the processor is disabled as in Sleep mod e. All
analog blocks are powered down by default but can be selected to ke ep running if needed
for waking up the part. The main clock and all peripheral clocks are disabled exce pt for the
clock to the watchdog timer if the watchdog oscillator is selected. The flash is powered
down, decreasing power consumption compared to Deep-sleep mode.
Power-down mode can eliminate all power used by analog peripherals and all dynamic
power used by the processor itself, memory systems and related controllers, and internal
buses. The processor state and registers, peripheral registers, and internal SRAM values
are maintained, and the logic levels of the pins remain static. Wake-up times are longer
compared to the Deep-sleep mode.
5.3.5.1Power configuration in Power-down mode
Power consumption in power-down mode is determined by which analog wake-up
sources are enabled. Serial peripherals and pin interrupts configured to wake up the part
do not contribute significantly to the power consumption. All wake-up events (other than
reset) must be enabled in the ST AR TER registers and in the NVIC. In addition, any related
analog block (e.g. the RTC oscillator or the watchdog oscillator) must be explicitly enabled
through the power API function power_mode_configure() for wake-up. See Table 104
UM10850
Chapter 5: LPC5410x Power Management
.
5.3.5.2Programming Power-down mode
The following steps must be performed to enter Power-down mode:
1. Select wake-up sources and enable all related wake-up events in the STARTER
registers (Table 75
2. Select the IRC as the main clock and set the AHBCLKDIV register to 1. See Table 45
Table 46
3. Call the power API with the peripheral parameter set to enable the analog wake-up
sources:
• RTC alarm signal or wake-up signal. See Chapter 16. Interrupts must also be enabled
5.3.6Deep power-down mode
In Deep power-down mode, power and clocks are shut off to the entire chip with the
exception of the RTC.
During Deep power-down mode, the contents of the SRAM and registers are not ret ained.
All functional pins are tri-stated in Deep power-down mode.
5.3.6.1Power configuration in Deep power-down mode
Deep power-down mode has no configuration options. All clocks, the core, and all
peripherals are powered down. Only the RTC is powered, as long as power is supplied to
the device.
5.3.6.2Wakeup from Deep power-down mode:
Wakeup from Deep power-down can be accomplished via the reset pin or the RTC.
in the STARTER1 register (Table 76
UM10850
Chapter 5: LPC5410x Power Management
) and in the NVIC.
5.3.6.3Programming Deep power-down mode using the RTC for wake-up:
The following steps must be performed to enter Deep power-down mode when using the
RTC for waking up:
1. Set up the RTC high resolution timer. Write to the RTC VAL register. This starts the
high res timer if enabled. Another option is to use the 1 Hz alarm timer.
• Contains the boot loader with In-System Programming (ISP) facility and the following
APIs:
– In-Application Programming (IAP) of flash memory
– Power profiles for optimizing power consumption and system performance and for
6.2 Pin description
The parts support ISP via USART0. The ISP mode is determined by the state of the
P0_31 pin at boot time:
Table 105. ISP modes
Boot modeP0_31Description
No ISPHIGHISP bypassed. Part attempts to boot from flash.
USART0LOWPart enters ISP via USART0.
controlling low power modes
6.3 General description
The boot loader controls initial operation after reset and also provides the means to
program the flash memory. This could be initial programming of a blank device, erasure
and re-programming of a previously programmed device, or programming of the flash
memory by the application program in a running system.
The boot loader code is executed every time the part is powered on or reset (see
Figure 7
The boot loader version can be read by ISP/IAP calls (see Table 490
Assuming that power supply pins are at their nominal levels when the rising edge on
RESET
decision whether to continue with user code or ISP handler is made. If the boot pins are
sampled LOW and the watchdog overflow flag is set, the external hardware request to
start the ISP command handler is ignored. If there is no request for the ISP command
handler execution, a search is made for a valid user program. If a valid user program is
found then the execution control is transferred to it. If a valid user program is not found,
the auto-baud routine is invoked.
See Chapter 31 “
). The loader can execute the ISP command handler or the user application code .
pin is generated, it may take up to 3 ms before the boot pins are sampled and th e
The IOCON block is included on all LPC5410x parts. Registers for pins that are not
available on a specific package are reserved.
Table 106. Available pins and configuration registers
PackageTotal GPIOs GPIO Port 0GPIO Port 1
64-pin device with RTC oscillator50PIO0_0 to PIO0_31PIO1_0 to PIO1_17
49-pin device with RTC oscillator39PIO0_0 to PIO0_1, PIO0_4 to POI0_31PIO1_0 to PIO1_8
7.2 Features
The following electrical properties are configurable for standard port pins:
• Pull-up/pull-down resistor
• Open-drain mode
• Inverted function
Pins PIO0_23 through PIO0_28 are true open-drain pins that can be configured fo r
different I
2
C-bus speeds.
7.3 Basic configuration
Enable the clock to the IOCON in the AHBCLKCTRL0 register ( Table 51). Once the pins
are configured, the IOCON clock can be disabled in order to conserve power.
The IOCON registers control the functions of device pins. Ea ch GPIO pin has a ded icated
control register to select its function and characteristics. Each pin has a unique set of
functional capabilities. Not all pin characteristics are selectable on all pins. For instance,
pins that have an I
that have an analog alternate function have an analog mode can be selected.Details of
the IOCON registers are in Section 7.4.2
characteristics of pins.
Multiple connections
Since a particular peripheral function may be allowed on more than one pin, it is possible
to configure more than one pin to perform the same function. If a peripheral output
function is configured to appear on more than one pin, it will in fact be routed to those
2
C function can be configured for different I2C-bus modes, while pins
pins. If a peripheral input function is defined as coming from more than one source, the
values will be logically combined, possibly resulting in incorrect peripheral operation.
Therefore care should be taken to avoid this situation.
7.4.2.1Pin function
The FUNC bits in the IOCON registers can be set to GPIO (typically value 000) or to a
special function. For pins set to GPIO, the DIR registers determine whether the pin is
configured as an input or output (see Section 9.5.3
direction is controlled automatically dependi ng on th e fu nc tion . Th e FIO nD IR registers
have no effect for special functions.
7.4.2.2Pin mode
The MODE bits in the IOCON register allow the selection of on-chip pull-up or pull-down
resistors for each pin or select the repeater mode.
The possible on-chip resistor configurations are pull-up ena bled, pull-down enabled, or no
pull-up/pull-down. The default value is pull-up enabled.
The repeater mode enables the pull-up resistor if the pin is high and enables the
pull-down resistor if the pin is low. This causes the pin to retain its last known state if it is
configured as an input and is not driven externally . Such st ate retention is not applicable to
the Deep Power-down mode. Repeater mo de ma y typ ica lly be use d to preve nt a pin fro m
floating (and potentially using significant power if it floats to an indeterminate state) if it is
temporarily not driven.
UM10850
Chapter 7: LPC5410x I/O pin configuration (IOCON)
). For any special function, the pin
7.4.2.3Hysteresis
The input buffer for digital functions has built-in hysteresis. See the appropriate specific
device data sheet for quantitative details.
7.4.2.4Invert pin
This option is included to avoid having to include an external inverter on an input that is
meant to be the opposite polarity of the external signal.
7.4.2.5Analog/digital mode
When not in digital mode (DIGIMODE = 0) a pin is in analog mode, some digital pin
functions are disabled and any analog pin functions are enabled. In digital mode
(DIGIMODE = 1), any analog pin functions are disabled and digital pin functions are
enabled. This protects the analog input from voltages outside the range of the analog
power supply and reference that may sometimes be present on digit al pins, since they are
typically 5V tolerant. All pin types include this control, even if they do not support any
analog functions.
In order to use a pin that has an ADC input option for that purpose, select GPIO (FUNC
field = 0) and disable the digital pin function (DIGIMODE = 0).
In analog mode, the MODE field should be “Inactive” (00); the INVERT, FILTEROFF, and
OD settings have no effect. For an unconnected pi n that h as an analo g fu nction, keep th e
DIGIMODE bit set to 1 (digital mode), and pull-up or pull-down mode selected in the
MODE field.
Some pins include a filter that can be selectively disabled by setting the FILTEROFF bit.
The filter suppresses input pulses smaller than about 10 ns.
7.4.2.7Output slew rate
The SLEW bits of digital outputs that do not need to switch state very quickly should be
set to “standard”. This setting allows multiple outputs to switch simultaneously without
noticeably degrading the power/ground distribu tion of the device, and has only a small
effect on signal transition time. This is particularly important if analog accuracy is
significant to the application. See the relevant specific device data sheet for more details.
7.4.2.8I2C modes
UM10850
Chapter 7: LPC5410x I/O pin configuration (IOCON)
Pins that support I2C with specialized pad electronics (P0[23] through P0[28]) have
additional configuration bits. These have multiple configurations to support I
These are not hard-wired so that the pins can be more easily used for non-I
See Table 113
For non-I
for recommended mode settings.
2
C operation, these pins remain open-drain and can only drive low, regardless of
how I2CSLEW and I2CDRIVE are set. They would typically be used with an external
pull-up resistor if they are used as outputs unless they are used only to sink current.
Leave I2CSLEW = 1, I2CDRIVE = 0, and I2CFILTER = 0 to maximize compatibility with
other GPIO pins.
7.4.2.9Open-Drain Mode
When output is selected, either by selecting a special function in the FUNC field, or by
selecting the GPIO function for a pin having a 1 in the related bit of that port’s DIR register ,
a 1 in the OD bit selects open-drain operation, that is, a 1 disables the high-drive
transistor. This option has no effect on the primary I
pin in this simulated open-drain mode are somewhat different than those of a true open
drain output.
Digital I/O control for port 0 pins PIO0_0 to
PIO0_1
Digital I/O control for port 0 pins PIO4 to
PIO0_22.
Digital I/O control for port 0 pins PIO0_23 to
PIO0_28. These pins support I2C with true
open-drain, drive and filtering for modes up to
Fast-mode Plus.
Digital I/O control for port 0 pins PIO0_29 to
PIO0_31. These pins include an ADC input.
Digital I/O control for port 1 pins PIO0_0 to
PIO0_8. These pins include an ADC input.
Digital I/O control for port 1 pins PIO1_9 to
PIO1_17.
0x0190D7.5.1
PIO0_16/17: 0x0195,
others: 0x0190
0x01A0
0x0190A7.5.3
0x0190A7.5.3
0x0190D7.5.4
[2]
UM10850
[1]
Pin
type
D7.5.1
I7.5.2
Section
[1] Reset Value reflects the data stored in defined bits only. Reserved bits assumed to be 0.
[2] The pins require an external pull-up to provide output functionality.
Input multiplexing is available for all parts. Depending on the package, not all inputs from
external pins may be available.
8.2 Features
• Configures the inputs to the pin interrupt block and pattern match engine.
• Configures the inputs to the DMA triggers.
• Configures the inputs to the frequency measu re function. This function is controlled by
the FREQMECTRL register in the SYSCON block.
8.3 Basic configuration
Once set up, no clocks are needed for the input multiplexer to function. The system clock
is needed only to write to or read from the INPUT MUX registers. Once the input
multiplexer is configured, disable the clock to the INPUT MUX block in the AHBCLKCTRL
register.
8.4 Pin description
The input multiplexer has no dedicated pins. However, all digital pins of ports 0 and 1 can
be selected as inputs to the pin interrupts. Multiplexer inputs from external pins work
independently of any other function assigned to the pin as long as no analog function is
enabled.
Table 123. INPUT MUX pin description
PinsPeripheral Reference
Any existing pin on port 0 or 1Pin interrupts 0 to 7Table 126
PIO0_4, PIO0_20, PIO0_24, PIO1_4F r equency measure block Table 131
8.5 General description
The inputs to the DMA triggers, to the eight pin interrupts, and to the frequency measure
block are multiplexed to multiple input sources. The sources can be external pins,
interrupts, or output signals of other peripherals.
The input multiplexing makes it possible to design event-driven processes without CPU
intervention by connecting peripherals like the ADC.
The DMA can use trigger input multiplexing to sequence DMA transactions without the
use of interrupt service routines.