• Updated Table 200 “USBD_API_INIT_PARAM class structure” with:
Parameters:
a. hUsb = Handle to the USB device stack.
Returns:
The call back should return ErrorCode_t type to indicate success or error condition.
• Updated Table 208 “USBD_HW_API class structure”:
Added GetMemSize to the text: This function is called by application layer before calling
pUsbApi->hw->
Added Parameters:
– hUsb = Handle to the USB device stack.
– EPNum = Endpoint number corresponding to the event as per USB specification. ie.
An EP1_IN isrepresented by 0x81 number. For device events set this param to 0x0.
– event = Type of endpoint event. See USBD_EVENT_T for more details.
– enable = 1 - enable event, 0 - disable event.Returns:Returns ErrorCode_t type to
indicate success or error condition.Return values:1. LPC_OK(0) = - On success2.
ERR_USBD_INVALID_REQ(0x00040001) = - Invalid event type.
• Added on-chip local RAM to Section 20.8.8 “RAM used by ISP command handler”,
Section 20.8.9 “RAM used by IAP command handler”
commands”
• Deleted: The boot sector can not be prepared by this command from Section 20.14.1
“Prepare sector(s) for write operation”, Table 384 “IAP Copy RAM to flash command”,
and Table 385 “IAP Erase Sector(s) command”.
5.420161007Modifications:
• Added text after Table 227 “Endpoint commands”: For EP0 transfers, the hardware will
do auto handshake as long as the ACTIVE bit is set in EP0_IN/OUT command list.
Unlike other endpoints, the hardware will not clear the ACTIVE bit after transfer is done.
Thus, the software should manually clear the bit whenever it receives new setup packet
and set it only after it has queued the data for control transfer.
5.320140611Modifications:
• I/O Handler interrupt added in T able 59 “Connection of interrupt sources to the Vectored
Interrupt Controller”.
• NVIC register description added. See Section 6.5.
• Use of IAP mode with power profiles clarified. Use power profiles in default mode when
executing IAP commands. See Section 20.14 “IAP commands” and Section 5.3.
• Section 5.3 added to clarify use of power profiles.
• Watchdog interrupt flag polarity corrected: This flag is cleared by writing a 1 to the
WDINT bit in the MOD register (Section 17.8.1 “Watchdog mode register”).
• Figure 69 “Boot process flowchart” corrected.
• T able 15 “Internal resonant crystal control register (IRCCTRL, address 0x4004 8028) bit
description” added.
• Remark added to Section 3.9.4.3 “Wake-up from Deep-sleep mode” and
Section 3.9.5.3 “Wake-up from Power-down mode”: After wake-up, reprogram the clock
source for the main clocks.
• Pin description tables for RESET/PIO0_0 updated: In deep power-down mode, this pin
must be pulled HIGH externally. The RESET pin can be left unconnected or be used as
a GPIO pin if an external RESET function is not needed. See Chapter 8
“LPC1 1U3x/2x/1x Pin configuration”.
• Pin description notes relating to open-drain I2C-bus pins updated for clarity. Chapter 8
“LPC1 1U3x/2x/1x Pin configuration”.
• Pin description of the WAKEUP pin updated for clarity. Chapter 8 “LPC11U3x/2x/1x Pin
configuration”.
5.120131220Modifications:
• Reset value of the SYSAHBCLKCTRL register corrected. See Table 5.
• Reserved function added to IOCON pin configuration registers PIO0_8 and PIO0_9.
See Table 69 and Table 70.
• Changed title to “LPC11U3x/2x/1x User manual”.
520131120Modifications:
• Table 121 “GPIO pins available” corrected.
• Table 343 “ISP entry pins for different boot loader versions” added.
• Bit description of the SLEEPDEEP bit corrected in Table 53 “Power control register
(PCON, address 0x4003 8000) bit description”.
• Part LPC11U37HFBD64/401 added.
• API pointer structure updated in Figure 73, Figure 10, and Figure 19.
• Power Profiles API pointer definitions corrected. See Section 5.4.
Chapter 1: LPC11U3x/2x/1x Introductory information
Rev. 5.5 — 21 December 2016User manual
The LPC11U3x/2x/1x are an ARM Cortex-M0 based, low-cost 32-bit MCU family,
designed for 8/16-bit microcontroller applications, of fering performance, low power , simple
instruction set and memory5 addressing together with reduced code size compared to
existing 8/16-bit architectures.
The LPC11U3x/2x/1x operate at CPU frequencies of up to 50 MHz. Equipped with a
highly flexible and configurable full-speed USB 2.0 device controller, the LPC1 1U3x/2x/1x
bring unparalleled design flexibility and seamless integration to today's demanding
connectivity solutions.
1.2 Features
The peripheral complement of the LPC11U3x/2x/1x includes up to 32 kB of flash memory,
up to 8 kB of SRAM data memory, one Fast-mode Plus I
RS-485/EIA-485 USART with support for synchronous mode and smart card interface,
two SSP interfaces, four general purpose counter/timers, a 10-bit ADC, and up to 54
general purpose I/O pins.
The I/O Handler is a software library-supported hardware engine that can be used to add
performance, connectivity and flexibility to system designs. It is available on the
LPC11U37HFBD64/401. The I/O Handler can emulate serial interfaces such as UART,
I2C, and I2S with no or very low additional CPU load and can off-load the CPU by
performing processing-intensive functions like DMA transfers in hardware. Software
libraries for multiple I/O handler applications are available on http://www.LPCware.com
See Section 25.2 “References”
parts.
for additional documentation related to the LPC11Uxx
2
C-bus interface, one
.
• System:
– ARM Cortex-M0 processor, running at frequencies of up to 50 MHz.
– ARM Cortex -M 0 bu ilt- in Ne ste d Vectored Interrupt Controller (NVIC).
– Non Maskable Interrupt (NMI) input selectable from several input sources.
– System tick timer.
• Memory:
– Up to 32 kB on-chip flash program memory.
– LPC11U3x only: Up to 128 kB on-chip flash program memory with sector (4 kB)
and page erase (256 byte) access.
– In-System Programming (ISP) and In-Application Programming (IAP) via on-chip
bootloader software.
– Total SRAM
LPC1 1U1x: up to 6 kB (4 kB main SRAM and 2 kB USB SRAM).
LPC11U2x: up to 10 kB (8 kB main SRAM and 2 kB USB SRAM).
• I/O Handler for hardware emulation of serial interfaces, DMA, and other functionality;
• Serial interfaces:
• Clock generation:
UM10462
Chapter 1: LPC1 1U3x/2x/1x Introductory information
LPC11U3x: up to 12 kB (8 kB main SRAM0, 2 kB SRAM1, 2 kB USB SRAM).
– 16 kB boot ROM.
– LPC11U2x/3x only: Up to 4 kB on-chip EEPROM data memory; byte erasable and
byte programmable; on-chip API supp ort.
– Power profiles.
– 32-bit integer division routines.
– LPC11U2x/3x only: ROM-based USB drivers. Flash updates via USB supported.
Supports Human-Interface Device (HID) class, Mass S torage Device Class (MSC),
and Communication Device Class (CDC).
– LPC11U2x/3x only: IAP EEPROM drivers.
– Standard JTAG test interface for BSDL.
– Serial Wire Debug.
– Up to 54 General Purpose I/O (GPIO) pins with configurable pull-up/pull-down
resistors, repeater mode, and open-drain mode.
– Up to eight GPIO pins can be selected as edge and level sensitive interrupt
sources.
– Two GPIO grouped interrupt modules enables an interrupt based on a
programmable pattern of input states of a group of GPIO pins.
– High-current source output driver (20 mA) on one pin (P0_7).
– High-current sink driver (20 mA) on true open-drain pins (P0_4 and P0_5).
– Four general purpose counter/timers with a total of 8 capture inputs and 13 match
outputs.
– Programmable windowed WatchDog Timer (WDT) with a dedicated, internal
low-power WatchDog Oscillator (WDO).
– 10-bit ADC with input multiplexing among eight pins.
supported through software libraries. (LPC11U37HFBD64/401 only.)
– USB 2.0 full-speed device controller.
– USART with fractional baud rate generation, internal FIFO, a full modem control
handshake interface, and support for RS-485/9-bit mode and synchron ous mode.
USART supports an asynchronous smart card interface (ISO 7816-3).
– Two SSP interfaces with FIFO and multi-protocol capabilities.
2
C-bus interface supporting the full I2C-bus specification and Fast-mode Plus with
– I
a data rate of up to 1 Mbit/s with multiple address recognition and monitor mode.
– Crystal Oscillator with an operating range of 1 MHz to 25 MHz (system oscillator).
• Available as LQFP64, LQFP48, TFBGA48 packages, and as HVQFN33 in two
• Pin-compatible to the ARM Cortex-M3 based LPC134x series.
UM10462
Chapter 1: LPC1 1U3x/2x/1x Introductory information
– 12 MHz Internal high-frequency RC oscillator (IRC) that can optionally be used as
a system clock.
– Internal low-power, low-frequency WatchDog Oscillator (WDO) with programmable
frequency output.
– PLL allows CPU operation up to the maximum CPU rate with the system oscillator
or the IRC as clock sources.
– A second, dedicated PLL is provided for USB.
– Clock output function with divider that can reflect the crystal oscillator, the main
clock, the IRC, or the watchdog oscillator.
– Four reduced power modes: Sleep, Deep-sleep, Power-down, and Deep
power-down.
– Power profiles residing in boot ROM allow optimized performance and minimized
power consumption for any given application through one simple function call.
– Processor wake-up from Deep-sleep and Power-down modes via reset, select able
GPIO pins, watchdog interrupt, BOD interrupt, or USB port activity.
– Processor wake-up from Deep power-down mode using one special function pin.
– Integrated PMU (Power Management Unit) to minimize power consumption dur ing
Sleep, Deep-sleep, Power-down, and Deep power-down modes.
– Power-On Reset (POR).
– Brownout detect with four separate thresholds for interrupt and forced reset.
package sizes: 5 x 5 x 0.85 mm and 7 x 7 x 0.85 mm.
1.3 Ordering information
Table 1.Ordering information
Type numberPackage
LPC11U12FHN33/201HVQFN33 plastic thermal enhanced very thin quad flat package; no leads; 33
The LPC11U3x/2x/1x incorporates several distinct memory regions, shown in the
following figures. Figure 4
user program viewpoint following reset.
The AHB peripheral area is 2 MB in size and is divided to allow for up to 128 peripherals.
The APB peripheral area is 512 kB in size and is divided to allow for up to 32 peripherals.
Each peripheral of either type is allocated 16 kB of space. This allows simplifying the
address decoding for each peripheral.
UM10462
Chapter 2: LPC11U3x/2x/1x Memory mapping
shows the overall map of the entire address space from the
The system control block is identical for all LPC11U3x/2x/1x parts.
The following register bit is available on LPC11U3x/501 and LPC11U37H only and is
reserved otherwise: SYSAHBCLKCTRL register bit RAM1 (bit 26) (Table 24Remark: For part LPC11U37H, enable the SRAM1 clock in the SYSAHBCLKCTRL
(Table 24
The DEVICE_ID register contains the device id numbers for the LPC11U1x and
LPC11U2x parts. For LPC11U3x parts, see the ISP/IAP Read Part Id command
(Table 376
3.2 Introduction
) register for running the I/O Handler software library code.
).
).
The system configuration block controls oscillators, some aspects of the power
management, and the clock generation of the LP C11U3x/2x/1x. Also included in this block
is a register for remapping flash, SRAM, and ROM memory areas.
3.3 Pin description
Table 4 shows pins that are assoc iated with system control block functions .
Table 4.Pin summary
Pin namePin
CLKOUTOClockout pin
PIO0 and PIO1 pinsIEight pins can be selected as external interrupt
3.4 Clocking and power control
See Figure 7 for an overview of the LPC11U3x/2x/1x Clock Generation Unit (CGU).
The LPC11U3x/2x/1x include three independent oscillators. These are the system
oscillator, the Internal RC oscillator (IRC), and the W atchdog oscillator . Each oscillator can
be used for more than one purpose as required in a particular application.
direction
Pin description
pins from all available GPIO pins (see Table 40
).
Following reset, the LPC11U3x/2x/1x will operate from the Internal RC oscillator until
switched by software. This allows systems to operate without an external crystal and the
bootloader code to operate at a known frequency.
The SYSAHBCLKCTRL register gates the system clock to the various peripherals and
memories. USART and SSP have individual clock dividers to derive peripheral clocks
from the main clock.
In addition to the system control block registers described in Table 5, the flash access
timing register, which can be re-configured as part the system setup, is described in
Table 6
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
. This register is not part of the system configuration block.
All address offsets not shown in Table 5
and Table 6 are reserved and should not be
written.
Table 5.Register overview: system control block (base address 0x4004 8000)
NameAccess OffsetDescriptionReset valueReset value
The system memory remap register selects whether the exception ve ctors are read from
boot ROM, flash, or SRAM. By default, the flash memory is mapped to address 0x0000
0000. When the MAP bits in the SYSM E MREMAP register are set to 0x0 or 0x1, the boot
ROM or RAM respectively are mapped to the bottom 512 bytes of the memory map
(addresses 0x0000 0000 to 0x0000 0200).
Table 7.System memory remap register (SYSMEMREMAP, address 0x4004 8000) bit
BitSymbolValueDescriptionReset
1:0MAPSystem memory remap. Value 0x3 is reserved.0x2
31:2--Reserved-
3.5.2 Peripheral reset control register
This register allows software to reset specific peripherals. A 0 in an assigned bit in this
register resets the specified peripheral. A 1 negates the reset and allows peripheral
operation.
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
description
value
0x0Boot Loader Mode. Interrupt vectors are re-mapped to Boot
ROM.
0x1User RAM Mode. Interrupt vectors are re-mapped to Static
RAM.
0x2User Flash Mode. Interrupt vectors are not re-mapped and
reside in Flash.
Remark: Before accessing the SSP and I2C peripherals, write a 1 to this register to
ensure that the reset signals to the SSP and I2C are de-asserted.
Table 8.Peripheral reset control register (PRESETCTRL, address 0x4004 8004) bit
description
BitSymbolValueDescriptionReset
0SSP0_RST_NSSP0 reset control0
0Resets the SSP0 peripheral.
1SSP0 reset de-asserted.
1I2C_RST_NI2C reset control0
0Resets the I2C peripheral.
1I2C reset de-asserted.
This register connects and enables the system PLL and co nfigures the PLL m ultiplier and
divider values. The PLL accepts an input frequency from 10 MHz to 25 MHz from various
clock sources. The input frequency is multiplied to a higher frequency and then divided
down to provide the actual clock used by the CPU, peripherals, and memories. The PLL
can produce a clock up to the maximum allowed for the CPU.
Table 9.Syste m PLL control register (SYSPLLCTRL, address 0x4004 8008) bit description
BitSymbolValueDescriptionReset
4:0MSELFeedback divider value. The division value M is the
6:5PSELPost divider ratio P. The division ratio is 2 P.0
31:7--Reserved. Do not write ones to reserved bits.-
3.5.4 System PLL status register
This register is a Read-only register and supplies the PLL lock status (see
Section 3.10.1
Table 10.System PLL status register (SYSPLLSTAT, address 0x4004 800C) bit description
BitSymbolValueDescriptionReset
0LOCKPLL lock status0
31:1--Reserved-
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
value
0
programmed MSEL value + 1.
00000: Division ratio M = 1
to
11111: Division ratio M = 32
0x0P = 1
0x1P = 2
0x2P = 4
0x3P = 8
).
value
0PLL not locked
1PLL locked
3.5.5 USB PLL control register
The USB PLL is identical to the system PLL and is used to provide a dedicated clock to
the USB block if available (see Section 3.1
This register connects and enables the USB PLL and configures the PLL multiplier and
divider values. The PLL accepts an input frequency from 10 MHz to 25 MHz from various
clock sources. The input frequency is multiplied up to a high frequency, then divided down
to provide the actual clock 48 MHz clock used by the USB subsystem.
Remark: The USB PLL must be connected to the system oscillator for correct USB
operation (see Table 19
This register configures the watchdog oscillator. The oscillator consists of an analog and a
digital part. The analog part contains the oscillator function and generates an analog clock
(Fclkana). With the digital part, the analog output clock (Fclkana) can be divided to the
required output clock frequency wdt_osc_clk. The analog output freque ncy (Fclkana) can
be adjusted with the FREQSEL bits between 600 kHz and 4.6 MHz. With the digital part
Fclkana will be divided (divider ratios = 2, 4,...,64) to wdt_osc_clk using the DIVSEL bits.
The output clock frequency of the watchdog oscillator can be calculated as
wdt_osc_clk = Fclkana/(2 (1 + DIVSEL)) = 9.4 kHz to 2.3 MHz (nominal values).
Remark: Any setting of the FREQSEL bits will yield a Fclkana value within 40% of the
listed frequency value. The watchdog oscillator is the clock source with the lowest power
consumption. If accurate timing is required, use the IRC or system oscillator.
Remark: The frequency of the watchdog oscillator is undefined after reset. The watchdog
oscillator frequency must be programmed by writing to the WDTOSCCTRL register before
using the watchdog oscillator.
Table 14.Watchdog oscillator control register (WDTOSCCTRL, address 0x4004 8024) bit
BitSymbolValueDescriptionReset
4:0DIVSELSelect divider for Fclkana.
8:5FREQSELSelect watchdog oscillator analog output frequency
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 15.Internal resonant crystal control register (IRCCTRL, address 0x4004 8028) bit
BitSymbolDescriptionReset value
7:0TRIMTrim value0x80 then flash will
31:8-Reserved0x00
3.5.10 System reset status register
If another reset signal - for example the external RESET pin - remains asserted after the
POR signal is negated, then its bit is set to detected. Write a one to clear the reset.
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
description
reprogram
The reset value given in Table 16
Table 16.System reset status register (SYSRSTSTAT, address 0x4004 8030) bit description
BitSymbolValueDescriptionReset
0PORPOR reset status1
0No POR detected
1POR detected. Writing a one clears this reset.
1EXTRSTExternal reset status1
0No reset event detected.
1Reset detected. Writing a one clears this reset.
2WDTStatus of the Watchdog reset0
0No WDT reset detected
1WDT reset detected. Writing a one clears this reset.
3BODStatus of the Brown-out detect reset0
0No BOD reset detected
1BOD reset detected. Writing a one clears this reset.
4SYSRSTStatus of the software system reset0
0No System reset detected
1System reset detected. Writing a one clears this reset.
31:5--Reserved-
applies to the POR reset.
value
3.5.11 System PLL clock source select register
This register selects the clock source for the system PLL. The SYSPLLCLKUEN register
(see Section 3.5.12
This register updates the clock source of the system PLL with the new input clock after the
SYSPLLCLKSEL register has been written to. In order for the update to take effect, first
write a zero to the SYSPLLUEN register and then write a one to SYSPLLUEN.
This register selects the clock source for the dedicated USB PLL. The USBPLLCLKUEN
register (see Section 3.5.14
effect.
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
0x4004 8044) bit description
0No change
1Update clock source
) must be toggled from LOW to HIGH for the update to take
Remark: When switching clock sources, both clocks must be running before the clock
source is updated in the USBPLLCLKUEN register. For USB operation, the clock source
must be switched from IRC to system oscillator with both the IRC and the system
oscillator running. After the switch, the IRC can be turned off.
T able 19. USB PLL clock source select register (USBPLLCLKSEL, address 0x4004 8048) bit
description
BitSymbolValueDescriptionReset
1:0SELUSB PLL clock source0x00
0x0IRC. The USB PLL clock source must be switched to system
oscillator for correct full-speed USB operation. The IRC is
suitable for low-speed USB operation.
0x1System oscillator
0x2Reserved
0x3Reserved
31:2--Reserved0x00
3.5.14 USB PLL clock source update enable register
This register updates the clock source of the USB PLL with the new input clock after the
USBPLLCLKSEL register has been written to. In order for the update to take effect at the
USB PLL input, first write a zero to the USBPLLUEN register and then write a one to
USBPLLUEN.
value
Remark: The system oscillator must be selected in the USBPLLCLKSEL register in order
to use the USB PLL, and this register must be toggled to update the USB PLL clock with
the system oscillator.
Remark: When switching clock sources, both clocks must be running before the clock
source is updated.
T able 20. USB PLL clock source update enable register (USBPLLCLKUEN, address 0x4004
BitSymbolValueDescriptionReset value
0ENAEnable USB PLL clock source update0x0
31:1--Reserved0x00
3.5.15 Main clock source select register
This register selects the main system clock, which can be the system PLL (sys_pllclkout),
or the watchdog oscillator, or the IRC oscillator. The main system clock clocks the core,
the peripherals, and the memories.
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
804C) bit description
0No change
1Update clock source
Bit 0 of the MAINCLKUEN register (see Section 3.5.16
the update to take effect.
This register updates the clock source of the main clock with the new input clock after the
MAINCLKSEL register has been written to. In order for the update to take effect, first write
a zero to bit 0 of this register, then write a one.
This register controls how the main clock is divided to provide the system clock to the
core, memories, and the peripherals. The system clock can be shut down completely by
setting the DIV field to zero.
Table 23.System clock divider register (SYSAHBCLKDIV, address 0x4004 8078) bit
BitSymbolDescriptionReset
7:0DIVSystem AHB clock divider values
31:8-Reserved-
3.5.18 System clock control register
The SYSAHBCLKCTRL register enables the clocks to individual system and peripheral
blocks. The system clock (bit 0) provides the clock for the AHB, the APB br idge , th e ARM
Cortex-M0, the Syscon block, and the PMU. This clock cannot be disabled.
Table 24.System clock control register (SYSAHBCLKCTRL, address 0x4004 8080) bit
BitSymbolValue DescriptionReset
0SYSEnables the clock for the AHB, the APB bridge, the
1ROMEnables clock for ROM.1
2RAM0Enables clock for Main SRAM0.1
3FLASHREGEnables clock for flash register interface.1
4FLASHARRAYEnables clock for flash array access.1
5I2CEnables clock for I2C.1
6GPIOEnables clock for GPIO port registers.0
7CT16B0Enables clock for 16-bit counter/timer 0.0
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
description
value
0x1
0: System clock disabled.
1: Divide by 1.
to
255: Divide by 255.
description
value
1
Cortex-M0 FCLK and HCLK, SysCon, and the PMU.
This bit is read only and always reads as 1.
0Reserved
1Enable
This register selects the clock source for the USB usb_clk. The clock source can be either
the USB PLL output or the main clock, and the clock can be further divided by the
USBCLKDIV register (see Table 30
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
value
0x00
0: Disable SSP1_PCLK.
1: Divide by 1.
to
255: Divide by 255.
) to obtain a 48 MHz clock.
The USBCLKUEN register (see Section 3.5.23
) must be toggled from LOW to HIGH for
the update to take effect.
Remark: When switching clock sources, both clocks must be running before the clock
source is updated. The default clock source for the USB controller is the USB PLL output.
For switching the clock source to the main clock, ensure that the system PLL and the USB
PLL are running to make both clock sources available for switching. The main clock must
be set to 48 MHz and configured with the main PLL and the system oscillator. After the
switch, the USB PLL can be turned off.
1:0SELUSB clock source. Values 0x2 and 0x3 are reserved.0x00
0x0USB PLL out
0x1Main clock
31:2--Reserved0x00
3.5.23 USB clock source update enable register
This register updates the clock source of the USB with the new input clock after the
USBCLKSEL register has been written to. In order for the update to take effect, first write
a zero to the USBCLKUEN register and then write a one to USBCLKUEN.
value
Remark: When switching clock sources, both clocks must be running before the clock
This register updates the clock source of the CLKOUT pin with the new clock after the
CLKOUTSEL register has been written to. In order for the update to t ake effect at the input
of the CLKOUT pin, first write a zero to bit 0 of this register, then write a one.
This register determines the divider value for the signal on the CLKOUT pin.
Table 33.CLKOUT clock divider registers (CLKOUTDIV, address 0x4004 80E8) bit
BitSymbolDescriptionReset
7:0DIVCLKOUT clock divider values
31:8-Reserved-
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
80E4) bit description
0No change
1Update clock source
description
value
0
0: Disable CLKOUT clock divider.
1: Divide by 1.
to
255: Divide by 255.
3.5.28 POR captured PIO status register 0
The PIOPORCAP0 register captures the state of GPIO port 0 at power-on-r eset. Each bit
represents the reset state of one GPIO pin. This register is a read- on ly status register.
Table 34.POR captured PIO status register 0 (PIOPORCAP0, address 0x4004 8100) bit
description
BitSymbolDescriptionReset value
23:0PIOSTATState of PIO0_23 through PIO0_0 at power-on resetImplementation
31:24 -Reserved.-
3.5.29 POR captured PIO status register 1
The PIOPORCAP1 register captures the state of GPIO port 1 at power-on-r eset. Each bit
represents the reset state of one GPIO pin. This register is a read- on ly status register.
Table 35.POR captured PIO status register 1 (PIOPORCAP1, address 0x4004 8104) bit
description
BitSymbolDescriptionReset value
31:0PIOSTATState of PIO1_31 through PIO1_0 at power-on resetImplementation
3.5.30 BOD control register
dependent
dependent
The BOD control register selects up to four separate threshold values for sending a BOD
interrupt to the NVIC and for forced reset. Reset and interrupt threshold values listed in
Both the BOD interrupt and the BOD reset, depending on the value of bit BODRSTENA in
this register, can wake-up the chip from Sl eep, Deep-sleep, and Power -down modes. See
Section 3.9
Table 36.BOD control register (BODCTRL, address 0x4004 8150) bit description
BitSymbolValue DescriptionReset
1:0BODRSTLEVBOD reset level0
3:2BODINTVALBOD interrupt level0
4BODRSTENABOD reset enable0
31:5 --Reserved0x00
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
.
value
0x0Level 0: The reset assertion threshold voltage is 1.46 V; the
reset de-assertion threshold voltage is 1.63 V.
0x1Level 1: The reset assertion threshold voltage is 2.06 V; the
reset de-assertion threshold voltage is 2.15 V.
0x2Level 2: The reset assertion threshold voltage is 2.35 V; the
reset de-assertion threshold voltage is 2.43 V.
0x3Level 3: The reset assertion threshold voltage is 2.63 V; the
reset de-assertion threshold voltage is 2.71 V.
0x0Level 0: Reserved.
0x1Level 1:The interrupt assertion threshold voltage is 2.22 V;
the interrupt de-assertion threshold voltage is 2.35 V.
0x2Level 2: The interrupt assertion threshold voltage is 2.52 V;
the interrupt de-assertion threshold voltage is 2.66 V.
0x3Level 3: The interrupt assertion threshold voltage is 2.80 V;
the interrupt de-assertion threshold voltage is 2.90 V.
0Disable reset function.
1Enable reset function.
3.5.31 System tick counter calibration register
This register determines the value of the SYST_CALIB register (see Table 349).
The IRQLA TENCY r egister is an eight-b it register which specifies the minimum number of
cycles (0-255) permitted for the system to respond to an interrupt request. The intent of
this register is to allow the user to select a trade-off between interrupt response time and
determinism.
Setting this parameter to a very low value (e.g. zero) will guarantee the best possible
interrupt performance but will also introduce a significant degree of uncertainty and jitter.
Requiring the system to always take a larger number of cycles (whethe r it need s it o r not)
will reduce the amount of uncertainty but may not necessarily eliminate it.
Theoretically, the ARM Cortex-M0 core should always be able to service an interrupt
request within 15 cycles. System factors extern al to the cp u, ho we ve r, bus latencies,
peripheral response times, etc. can increase the time required to complete a previous
instruction before an interrupt can be serviced. Therefore, accurately specifying a
minimum number of cycles that will ensure determinism will depend on the application.
The default setting for this register is 0x010.
Table 38.IRQ latency register (IRQLATENCY, address 0x4004 8170) bit description
BitSymbolDescriptionReset
7:0LATENCY8-bit latency value0x010
31:8-Reserved-
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
value
3.5.33 NMI source selection register
The NMI source selection register selects a peripheral interrupts as source for the NMI
interrupt of the ARM Cortex-M0 core. For a list of all peripheral interrupts and their IRQ
numbers see Table 59
Remark: When you want to change the interr upt source for the NMI, you must first disable
the NMI source by setting bit 31 in this register to 0. Then change the source by updating
the IRQN bits and re-enable the NMI source by setting bit 31 to 1.
4:0IRQNThe IRQ number of the interrupt that acts as the Non-Maskable Interrupt
30:5-Reserved31NMIEN Write a 1 to this bit to enable the Non-Maskable Interrupt (NMI) source
Note: If the NMISRC register is used to select an inte rrupt as the source o f Non-Maskable
interrupts, and the selected interrupt is enabled, on e interr upt re quest can r esult in bo th a
Non-Maskable and a normal interrupt. This can be avoided by disabling the normal
interrupt in the NVIC, as described in Section 24.5.2
. For a description of the NMI functionality, see Section 24.3.3.2.
(NMI) if bit 31 is 1. See Table 59
IRQ numbers.
selected by bits 4:0.
value
0
for the list of interrupt sources and their
0
.
3.5.34 Pin interrupt select registers
Each of these 8 registers selects one GPIO pin from all GPIO pins on both ports as the
source of a pin interrupt. To select a pin for any of the eight pin interrupts, write the pin
number as 0 to 23 for pins PIO0_0 to PIO0_23 and 24 to 55 for pins PIO1_0 to PIO1_31
to the INTPIN bits. For example, setting INTPIN to 0x5 in PINTSEL0 selects pin PIO0_5
for pin interrupt 0. Setting INTPIN in PINTSEL7 to 0x32 (pin 50) selects pin PIO1_26 for
pin interrupt 7.
Each of the 8 pin interrupts must be enabled in the NVIC using inte rrupt slots # 0 to 7 (see
Table 59
To enable each pin interrupt and configure its edge or level sensitivity, use the GPIO pin
interrupt registers (see Section 9.5.1
Table 40.Pin interrupt select registers (PINTSEL0 to 7, address 0x4004 8178 to 0x4004
BitSymbolDescriptionReset
5:0INTPINPin number select for pin interrupt. (PIO0_0 to PIO0_23 correspond
31:6-Reserved-
3.5.35 USB clock control register
This register controls the use of the USB need_clock signal and the polarity of the
need_clock signal for triggering the USB wake-up interrupt. For details of how to use the
USB need_clock signal for waking up the part from Deep-sleep or Power-down modes,
see Section 11.7.6
Table 41.USB clock control register (USBCLKCTRL, address 0x4004 8198) bit description
BitSymbolValueDescriptionReset
0AP_CLKUSB need_clock signal control0
1POL_CLKUSB need_clock polarity for triggering the USB wake-up
31:2 --Reserved0x00
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
).
).
8194) bit description
value
0
to numbers 0 to 23 and PIO1_0 to PIO1_31 correspond to numbers
24 to 55).
.
value
0Under hardware control.
1Forced HIGH.
0
interrupt
0Falling edge of the USB need_clock triggers the USB
wake-up (default).
1Rising edge of the USB need_clock triggers the USB
wake-up.
3.5.36 USB clock status register
This register is read-only and returns the status of th e USB need_clock signal. Fo r det ails
of how to use the USB need_clock signal for waking up the part from Deep-sleep or
Power-down modes, see Section 11.7.6
Table 42.USB clock status register (USBCLKST, address 0x4004 819C) bit description
The STARTERP0 register enables the individual GPIO pins selected through the Pin
interrupt select registers (see Table 40
enabled in the NVIC (interrupts 0 to 8 in Table 59
This register selects which interrupts will wake the LPC11U3x/2x/1x from deep-sleep and
power-down modes. Interrupts selected by a on e in these registers must be enabled in the
NVIC (Table 59
power-down mode.
The STARTERP1 register enables the WWDT interrupt, the BOD interrupt, the USB
wake-up interrupt and the two GPIO group interrupts for wake-up.
18:14-Reserved19USB_WAKEUPUSB need_clock signal wake-up0
20GPIOINT0GPIO GROUP0 interrupt wake-up0
21GPIOINT1GPIO GROUP1 interrupt wake-up0
31:22Reserved.-
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
description
value
0Disabled
1Enabled
0Disabled
1Enabled
0Disabled
1Enabled
0Disabled
1Enabled
0Disabled
1Enabled
3.5.39 Deep-sleep mode configuration register
The bits in this register (BOD_PD and WDTOSC_OD) can be programmed to control
aspects of Deep-sleep and Power-down modes. The bits are loaded into corresponding
bits of the PDRUNCFG register when Deep-sleep mode or Power-down mode is entered.
Remark: Hardware forces the analog blocks to be powered down in Deep-sleep and
Power-down modes according to the power configura tion described in Section 3.9.4.1
Section 3.9.5.1
can be configured to remain running through this register. The WDTOSC_PD value
written to the PDSLEEPCFG register is overwritten if the LOCK bit in the WWDT MOD
register (see Table 337
Table 45.Deep-sleep configuration register (PDSLEEPCFG, address 0x4004 82 30) bit
BitSymbolValue DescriptionReset
2:0Reserved.111
3BOD_PDBOD power-down control for Deep-sleep and Power-down
5:4Reserved.11
.An exception are the exception of BOD and watchdog oscillator, which
11-Reserved. Always write this bit as 1. 1
12-Reserved. Always write this bit as 0. 0
15:13 -Reserved. Always write these bits as 111.111
31:16 --Reserved-
3.5.41 Power configuration register
The PDRUNCFG register controls the power to the various analog blocks. This register
can be written to at any time while the chip is running, and a write will take effect
immediately with the exception of the power-down signal to the IRC.
description
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
…continued
value
0USB transceiver powered
1USB transceiver powered down
To avoid glitches when powering down the IRC, the IRC clock is automatically switched off
at a clean point. Therefore, for the IRC a delay is possible before the power-down state
takes effect.
Table 47.Power configuration register (PDRUNCFG, address 0x4004 8238) bit
Table 47.Power configuration register (PDRUNCFG, address 0x4004 8238) bit
BitSymbolValueDescriptionReset
6WDTOSC_PDWatchdog oscillator power-down 1
7SYSPLL_PDSystem PLL power-down1
8USBPLL_PDUSB PLL power-down1
9-0Reserved. Always write this bit as 0.0
10USBPAD_PDUSB transceiver power-down configuration 1
11-Reserved. Always write this bit as 1. 1
12-Reserved. Always write this bit as 0. 0
15:13 -Reserved. Always write these bits as 111.111
31:16 --Reserved-
description
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
…continued
value
0Powered
1Powered down
0Powered
1Powered down
0Powered
1Powered down
0USB transceiver powered
1USB transceiver powered down (suspend mode)
3.5.42 Device ID register
This device ID register is a read-only register and contains the part ID for each
LPC11U3x/2x/1x part. This register is also read by the ISP/IAP commands (see
Table 376
Table 48.Device ID register (DEVICE_ID, address 0x4004 83F4) bit description
BitSymbolDescription Reset value
31:0DEVICEIDDevice ID numbers for LPC11U3x/2x/1x parts
Depending on the system clock frequency, access to the flash memory can be configured
with various access times by writing to the FLASHCFG register at address 0x4003 C010.
This register is part of the flash configuration block (see Figure 4
Remark: Improper setting of this register may result in incorrect operation of the
LPC11U3x/2x/1x.
Table 49.Flash configuration register (FLASHCFG, address 0x4003 C010) bit description
BitSymbolValue DescriptionReset
1:0FLASHTIMFlash memory access time. FLASHTIM +1 is equal to the
31:2 --Reserved. User software must not change the value of
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
).
value
0x2
number of system clocks used for flash access.
0x01 system clock flash access time (for system clock
frequencies of up to 20 MHz).
0x12 system clocks flash access time (for system clock
frequencies of up to 40 MHz).
0x2 3 system clocks flash access time (for system clock
frequencies of up to 50 MHz).
0x3Reserved.
-
these bits. Bits 31:2 must be written back exactly as read.
3.6 Reset
Reset has the following sources on the LPC11U3x/2x/1x: the RESET pin, Watchdog
Reset, Power-On Reset (POR), and Brown Out Detect (BOD). In addition, there is an
ARM software reset.
The RESET
pin is a Schmitt trigger input pin. Assertion of chip Reset by any source, once
the operating voltage attains a usable level, starts the IRC causing reset to remain
asserted until the external Reset is de-asserted, 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 st arts up. After the IRC-start-up time (maximum of 6 s on power-up), the
IRC provides a stable clock output.
2. The flash is powe red up. This takes approximat ely 100 s. Then the flash initialization
sequence is started, which takes about 250 cycles.
3. The boot code in the ROM starts. The boot code performs the boot tasks and may
jump to the flash.
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.
See Figure 8 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 volt age reaches the thresh old value
of 1.8 V.
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
Fig 8.Start-up timing
3.8 Brown-out detection
The LPC11U3x/2x/1x 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 assert s an interrupt sign al to
the NVIC or issues a reset, depending on the value of the BODRSTENA bit in the BOD
control register (Table 36
The interrupt signal can be enabled for interrupt in the Interrupt Enable Register in the
NVIC (see Table 436
signal by reading a dedicated status register.
If the BOD interrupt is enabled in the STARTERP1 register (see Table 44
NVIC, the BOD interrupt can wake up the chip from Deep-sleep and power-do wn mode .
If the BOD reset is enabled, the forced BOD re set can wake up the chip from Deep-sleep
or Power-down mode.
) in order to cause a CPU interrupt; if not, software can monitor the
) and in the
NXP Semiconductors
3.9 Power management
The LPC11U3x/2x/1x 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.
Table 50.Peripheral configuration in reduced power modes
PLLsoftware configurableoffoffoff
SysOscsoftware configurableoffoffoff
WDosc/WWDTsoftware configurable s oftware
ADCsoftware configurableoffoffoff
Digital peripherals software configurableoffoffoff
USBsoftware configurable offoffoff
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
mode
[1]
configurable
configurable
Power-down
mode
[1]
[1]
off
software
configurable
software
configurable
Deep power-down
mode
off
off
off
off
[1] If bit 5, the clock source lock bit, in the WWDT MOD register is set and the IRC is selected as the WWDT
clock source, the IRC and the IRC output are forced on during this mode (Table342
consumption and may cause the part not to enter Power-down mode correctly. For details see Section 17.7
Remark: The Debug mode is not supported in Sleep, Deep-sleep, Power-down, or Deep
power-down modes.
3.9.1 Reduced power modes and WWDT lock features
The WWDT clock select lock feature influences the power consumption in any of the
power modes because locking the WWDT clock source forces the selected WWDT clock
source to be on independently of the Deep-sleep and Power-down mode softwa re
configuration through the PDSLEEPCFG register. For details see Section 17.7
If the part uses Deep-sleep mode with the WWDT running, the watchdog oscillator is the
preferred clock source as it minimizes power consumption. If the clock source is not
locked, the watchdog oscillator must be powered by using the PDSLEEPCFG register.
Alternatively, the IRC may be selected and locked in WWDT MOD register, which forces
the IRC on during Deep-sleep mode.
If the part uses Power-down mode with the WWDT running, the watchdog oscillator must
be selected as the clock source. If the clock source is not locked, the watchdog oscillator
must be powered by using the PDSLEEPCFG register. Do not lock the clock source with
the IRC selected.
In Active mode, the ARM Cortex-M0 core and memories are clocked by the system clock,
and peripherals are clocked by the system clock or a dedicated peripheral clock.
The chip is in Active mode after reset and the default power configuration is determined
by the reset values of the PDRUNCFG and SYSAHBCLKCTRL registers. The power
configuration can be changed during run time.
3.9.2.1 Power configuration in Active mode
Power consumption in Active mode is determined by the following configuration choices:
• The SYSAHBCLKCTRL register controls which memories and peripherals are
• The power to various analog blocks (PLL, oscillators, the ADC, the BOD circuit, and
• The clock source for the system clock can be selected from the IRC (default), the
• The system clock frequency can be selected by the SYSPLLCTRL (Table 9) and the
• Selected peripherals (USART, SSP0/1, USB, CLKOUT) use individual peripheral
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
running (Table 24
the flash block) can be controlled at any time individually through the PDRUNCFG
register (Table 47
system oscillator, or the watchdog oscillator (see Figure 7
SYSAHBCLKDIV register (Table 23
clocks with their own clock dividers. The peripheral clocks can be shut down through
the corresponding clock divider registers (Table 25
).
).
and related registers).
).
to Table 33).
3.9.3 Sleep mode
In Sleep mode, the system clock to the ARM Cortex-M0 core is stopped, and e xecution of
instructions is suspended until either a reset or an interrupt occurs.
Peripheral functions, if selected to be clocked in the SYSAHBCLKCTRL r egister, 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.
3.9.3.1 Power 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 selected as in Active mode.
3.9.3.2 Programming Sleep mode
The following steps must be performed to enter Sleep mode:
1. The PD bit s in the PCON register must be set to the default value 0x0.
2. The SLEEPDEEP bit in the ARM Cortex-M0 SCR register must be set to zero.
3. Use the ARM Cortex-M0 Wait-For-Interrupt (WFI) instruction.
3.9.3.3 Wake-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 due to an in terr up t, the micr ocon trolle r retu rns
to its original power configuration defined by the contents of the PDRUNCFG and the
SYSAHBCLKDIV registers. If a reset occurs, the microcontroller enters the default
configuration in Active mode.
3.9.4 Deep-sleep mode
In Deep-sleep mode, the system clock to the processor is disabled as in Sleep mode. All
analog blocks are powered down, except for the BOD circuit and the watchdog oscillator,
which must be selected or deselected during Deep-sleep mode in the PDSLEEPCFG
register. T he main clock, and therefore all peripheral clocks, are disabled except for the
clock to the watchdog timer if the watchdog oscillator is selected. The IRC is running, but
its output is disabled. The flash is in stand-by mode.
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
Remark: If the LOCK bit is set in the WWDT MOD register (Table 337
selected as a clock source for the WWDT, the IRC continues to clock the WWDT in
Deep-sleep mode.
Deep-sleep mode eliminates all power used by analog p eriphera ls an d all dy namic 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.
3.9.4.1 Power configuration in Deep-sleep mode
Power consumption in Deep-sleep mode is determined by the Deep-sleep power
configuration setting in the PDSLEEPCFG (Table 45
• The watchdog oscillator can be left running in Deep-sleep mode if required for the
WWDT.
• If the IRC is locked as the WWDT clock source (see Section 17.7), the IRC continues
to run and clock the WWDT in Deep-sleep mode independently of the settin g in the
PDSLEEPCFG register.
• The BOD circuit can be left running in Deep-slee p mode if r equir ed by th e application .
3.9.4.2 Programming Deep-sleep mode
The following steps must be performed to enter Deep-sleep mode:
) and the IRC is
) register:
1. The PD bits in the PCON register must be set to 0x1 (Table 54
2. Select the power configuration in Deep-sleep mode in the PDSLEEPCFG (Table 45
register.
3. Determine if the WWDT clock source must be locked to override the power
configuration in case the IRC is selected as clock for the WWDT (see Section 17.7
4. If the main clock is not the IRC, power up the IRC in the PDRUNCFG register and
switch the clock source to IRC in the MAINCLKSEL register (Table 21
that the system clock is shut down glitch-free.
5. Select the power configuration after wake-up in the PDAWAKECFG (Table 46)
6. If any of the available wake-up interrupts are needed for wake-up, enable the
7. Write one to the SLEEPDEEP bit in the ARM Cortex-M0 SCR register.
8. Use the ARM WFI instruction.
3.9.4.3 Wake-up from Deep-sleep mode
The microcontroller can wake up from Deep-sleep mode in the following ways:
• Signal on one of the eight pin interrupts selected in Table 40. Each pin interrupt must
• BOD signal, if the BOD is enabled in the PDSLEEPCFG register:
• WWDT signal, if the watchdog oscillator is enabled in the PDSLEEPCFG register:
• USB wake-up signal using the interrupt wake-up register 1 (Table 44). For details, see
• GPIO group interrupt signal (see Table 44).
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
register.
interrupts in the interrupt wake-up registers (Table 43
also be enabled in the STARTERP0 register (Table 43
– BOD interrupt using the deep-sleep interrupt wake-up register 1 (Table 44
BOD interrupt must be enabled in the NVIC. The BOD interrupt must be selected in
the BODCTRL register.
– Reset from the BOD circuit. In this case, the BOD circuit must be enabled in the
PDSLEEPCFG register, and the BOD reset must be enabled in the BODCTRL
register (Table 36
– WWDT interrupt using the interrupt wake-up register 1 (Table 44
interrupt must be enabled in the NVIC. The WWDT interrupt must be set in the
WWDT MOD register.
– Reset from the watchdog timer. The WWDT reset must be set in the WWDT MOD
register. In this case, the watchdog oscillator must be running in Deep-sleep mode
(see PDSLEEPCFG register), and the WDT must be enabled in the
SYSAHBCLKCTRL register.
Section 11.7.6
).
.
, Table 44) and in the NVIC.
) and in the NVIC.
). The
). The WWDT
Remark: If the watchdog oscillator is running in Deep-sleep mode, its frequency
determines the wake-up time.
Remark: If the application in active mode uses a main clock different from the IRC,
reprogram the clock source for the main clock in the MAINCLKSEL register after waking
up.
3.9.5 Power-down mode
In Power-down mode, the system clock to the processor is disabled as in Sleep mode. All
analog blocks are powered down, except for the BOD circuit and the watchdog oscillator,
which must be selected or deselected during Power-down mode in the PDSLEEPCFG
register. The main clock and therefore all peripheral clocks are disabled except for the
clock to the watchdog timer if the watchdog oscillator is selected. The IRC itself and the
flash are powered down, decreasing power consumption compared to Deep-sleep mode.
Remark: Do not set the LOCK bit in th e WWDT MOD register (Table 337) when the IRC is
selected as a clock source for the WWDT. This prevents the part from entering the
Power-down mode correctly.
Power-down mode eliminates 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.
3.9.5.1 Power configuration in Power-down mode
Power consumption in Power-down mode can be configured by the power configuration
setting in the PDSLEEPCFG (Table 45
(see Section 3 .9.4.1
• The watchdog oscillator can be left running in Deep-sleep mode if required for the
• The BOD circuit can be left running in Deep-slee p mode if r equir ed by th e application .
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
) register in the same way as for Deep-sleep mo de
):
WWDT.
3.9.5.2 Programming Power-down mode
The following steps must be performed to enter Power-down mode:
1. The PD bits in the PCON register must be set to 0x2 (Table 54
2. Select the power configuration in Power-down mode in the PDSLEEPCFG (Table 45
register.
3. If the lock bit 5 in the WWDT MOD register is set (Table 337
as the WWDT clock source, reset the part to clear the lock bit and then select the
watchdog oscillator as the WWDT clock source.
4. If the main clock is not the IRC, power up the IRC in the PDRUNCFG register and
switch the clock source to IRC in the MAINCLKSEL register (Table 21
that the system clock is shut down glitch-free.
5. Select the power configuration after wake-up in the PDAWAKECFG (Table 46
register.
6. If any of the available wake-up interrupts are used for wake-up, enable the interrupts
in the interrupt wake-up registers (Table 43
7. Write one to the SLEEPDEEP bit in the ARM Cortex-M0 SCR register.
8. Use the ARM WFI instruction.
3.9.5.3 Wake-up from Power-down mode
The microcontroller can wake up from Power-down mode in the same way as from
Deep-sleep mode:
).
)
) and the IRC is selected
). This ensures
)
, Table 44) and in the NVIC.
• Signal on one of the eight pin interrupts selected in Table 40. Each pin interrupt must
also be enabled in the STARTERP0 register (Table 43
) and in the NVIC.
• BOD signal, if the BOD is enabled in the PDSLEEPCFG register:
– BOD interrupt using the interrupt wake-up register 1 (Table 44
must be enabled in the NVIC. The BOD interrupt must be selected in the
BODCTRL register.
• WWDT signal, if the watchdog oscillator is enabled in the PDSLEEPCFG register:
• USB wake-up signal interrupt wake-up register 1 (Table 44). For details, see
• GPIO group interrupt signal (see Table 44).
Remark: If the watchdog oscillator is running in Power-down mode, its frequency
determines the wake-up time.
Remark: If the application in active mode uses a main clock different from the IRC,
reprogram the clock source for the main clock in the MAINCLKSEL register after waking
up.
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
– Reset from the BOD circuit. In this case, the BOD reset must be enabled in the
BODCTRL register (Table 36
– WWDT interrupt using the interrupt wake-up register 1 (Table 44
interrupt must be enabled in the NVIC. The WWDT interrupt must be set in the
WWDT MOD register.
– Reset from the watchdog timer.The WWDT reset must be set in the WWDT MOD
register.
Section 11.7.6
.
).
). The WWDT
3.9.6 Deep power-down mode
In Deep power-down mode, power and clocks are shut off to the entire chip with the
exception of the WAKEUP pin. The Deep power-down mode is controlled by the PMU
(see Chapter 4
During Deep power-down mode, the con tents of the SRAM and registers are not re tained
except for a small amount of data which can be stored in the general purpose registers of
the PMU block.
All functional pins are tri-stated in Deep power-down mode except for the WAKEUP pin.
Remark: Setting bit 3 in the PCON register ( Section 4.3.1
Deep-power down mode.
3.9.6.1 Power 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 WAKEUP pin is powered.
3.9.6.2 Programming Deep power-down mode
The following steps must be performed to enter Deep power-down mode:
1. Pull the WAKEUP pin externally HIGH.
2. Ensure that bit 3 in the PCON register (Table 54
3. Write 0x3 to the PD bits in the PCON register (see Table 54
4. Store data to be retained in the general purpose registers (Section 4.3.2
5. Write one to the SLEEPDEEP bit in the ARM Cortex-M0 SCR register.
Pulling the WAKEUP pin LOW wakes up the LPC11U3x/2x/1x from Deep power-down,
and the chip goes through the entire reset process (Section 3.6
1. On the WAKEUP pin, transition from HIGH to LOW.
2. Once the chip has booted, read the deep power-down flag in the PCON register
3. Clear the deep power-down flag in the PCON register (Table 54
4. (Optional) Read the stored data in the general purpose registers (Section 4.3.2
5. Set up the PMU for the next Deep power-down cycle.
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
).
– The PMU will turn on the on-chip voltage regulator. When the core voltage reaches
the power-on-reset (POR) trip point, a system reset will be triggered and the chip
re-boots.
– All registers except the GPREG0 to GPREG4 will be in their reset state.
(Table 54
power-down and was not a cold reset.
) to verify that the reset was caused by a wake-up event from Deep
).
).
3.10 System PLL/USB PLL functional description
Remark: The RESET
The LPC11U3x/2x/1x uses the system PLL to create the clocks for the core and
peripherals. An identical PLL is available for the USB.
(1) System PLL only.
Fig 9.System PLL block diagram
pin has no functionality in Deep power-down mode.
The block diagram of this PLL is shown in Figure 9. The input frequency range is 10 MHz
to 25 MHz. The input clock is fed directly to the Phase-Freq ue n cy Det ec to r (PF D). This
block compares the phase and frequency of its inputs, and generates a control signal
when phase and/ or frequency do not match. The loop filter filters these control signals
and drives the current controlled oscillator (CCO), which generates the main clock and
optionally two additional phases. The CCO frequency range is 156 MHz to
320 MHz.These clocks are either divided by 2P by the programmable post divider to
create the output clocks, or are sent directly to the outputs. The main output clock is then
divided by M by the programmable feedback divider to generate the feedback clock. The
output signal of the phase-frequency detector is also monitored by the lock detector, to
signal when the PLL has locked on to the input clock.
3.10.1 Lock 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.
3.10.2 Power-down control
UM10462
Chapter 3: LPC11U3x/2x/1x System control block
To reduce the power consumption when the PLL clock is not needed, a 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-down configuration register (Table 47
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 Power-down mode, the lock
output will be low to indicate that the PLL is not in lock. When the 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.
3.10.3 Divider ratio programming
Post divider
The division ratio of the post divider is controlled by the PSEL bits. The division ratio is two
times the value of P selected by PSEL bits as shown in Table 9
guarantees an output clock with a 50% duty cycle.
Feedback divider
The feedback divider’s division ratio is controlled by the MSEL bits. The division ratio
between the PLL ’s outp ut clock and the input clock is the decim al value on MSEL bits pl us
one, as specified in Table 9
Changing the divider values
Changing the divider ratio while the PLL is running is not recommended. As there is no
way to synchronize the change of the MSEL and PSEL values with the dividers, the risk
exists that the counter will read in an undefined value, which could lead to unwanted
spikes or drops in the frequency of the output clock. The recommended way of changing
between divider settings is to power down the PLL, ad just the divider settings and then let
the PLL start up again.
The PLL frequency equations use the following parameters (also see Figure 7):
Table 51.PLL frequency parameters
ParameterSystem PLL
FCLKINFrequency of sys_pllclkin (input clock to the system PLL) from the
FCCOFrequency of the Current Controlled Oscillator (CCO); 156 to 320 MHz.
FCLKOUTFrequency of sys_pllclkout
PSystem PLL post divider ratio; PSEL bits in SYSPLLCTRL (see
MSystem PLL feedback divider register; MSEL bits in SYSPLLCTRL (see
3.10.4.1 Normal mode
In this mode the post divider is enabled, giving a 50 % duty cycle clock with the following
frequency relations:
Chapter 3: LPC11U3x/2x/1x System control block
SYSPLLCLKSEL multiplexer (see Section 3.5.11
Section 3.5.3
Section 3.5.3
).
).
UM10462
).
To select the appropriate values for M and P, it is recommended to follow these steps:
1. Specify the input clock frequency Fclkin.
/ F
2. Calculate M to obtain the desired output frequency Fclkout with M = F
3. Find a value so that FCCO = 2 P F
clkout
.
clkout
clkin
.
4. Verify that all frequencies and divider values conform to the limits specified in Table 9
and Table 11
Table 52
shows how to configure the PLL for a 12 MHz crystal oscillator using the
SYSPLLCTRL register (Table 9
system clock divider SYSAHBCLKDIV is set to one (see Table 23
In this mode, the 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
Power-down mode, the lock output will be low, to indicate that the PLL is not in lock. When
the Power-down mode is terminated by SYSPLL_PD bit to zero in the Power-down
configuration register (Table 47
), the PLL will resume its normal operation and will make
the lock signal high once it has regained lock on the input clock.
UM10462
Chapter 4: LPC11U3x/2x/1x Power Management Unit (PMU)
Rev. 5.5 — 21 December 2016User manual
4.1 How to read this chapter
The PMU is identical on all LPC11U3x/2x/1x parts. Also refer to Chapter 5 for power
control.
4.2 Introduction
The PMU controls the Deep power-down mode. Four gene ral purpose register in the PMU
can be used to retain data during Deep power-down mode.
The power control register selects whether one of the ARM Cortex-M0 controlled
power-down modes (Sleep mode or Deep-sleep/Power-down mode) or the Deep
power-down mode is entered and provides the flags for Sleep or Deep-sleep /Power-down
modes and Deep power-down modes respectively. See Section 3.9
enter the power-down modes.
Table 54.Power control register (PCON, address 0x4003 8000) bit description
BitSymbolValueDescriptionReset
2:0PMPower mode000
0x0Default. The part is in active or sleep mode.
0x1ARM WFI will enter Deep-sleep mode.
0x2ARM WFI will enter Power-down mode.
0x3ARM WFI will enter Deep-power down mode (ARM
Cortex-M0 core powered-down).
3NODPDA 1 in this bit prevents entry to Deep power-down mode
when 0x3 is written to the PM field above, the
SLEEPDEEP bit is set, and a WFI is executed
This bit is cleared only by power-on reset, so writing a one
to this bit locks the part in a mode in which Deep
power-down mode is blocked.
Chapter 4: LPC11U3x/2x/1x Power Management Unit (PMU)
Table 54.Power control register (PCON, address 0x4003 8000) bit description
BitSymbolValueDescriptionReset
7:4--Reserved. Do not write ones to this bit.0
8SLEEPFLAGSleep mode flag0
0Read: No power-down mode entered. LPC11U3x/2x/1x is
in Active mode.
Write: No effect.
1Read: Sleep/Deep-sleep or Power-down mode entered.
Write: Writing a 1 clears the SLEEPFLAG bit to 0.
10:9--Reserved. Do not write ones to this bit.0
11DPDFLAGDeep power-down flag0
0Read: Deep power-down mode not entered.
Write: No effect.
1Read: Deep power-down mode entered.
Write: Clear the Deep power-down flag.
31:12 --Reserved. Do not write ones to this bit.0
4.3.2 General purpose registers 0 to 3
The general purpose registers retain data through the Deep power-down mode when
power is still applied to the V
Only a “cold” boot when all power has been completely removed from the chip will reset
the general purpose registers.
T able 55. General purpose registers 0 to 3 (GPREG[0:3], address 0x4003 8004 (GPREG0) to
0x4003 8010 (GPREG3)) bit description
BitSymbolDescriptionReset
31:0GPDATAData retained during Deep power-down mode.0x0
pin but the chip has entered Deep power-down mode.
DD
…continued
value
0
value
4.3.3 General purpose register 4
The general purpose register 4 retains data through the Deep power-down mode when
power is still applied to the V
Only a “cold” boot, when all power has been completely removed from the chip, will reset
the general purpose registers.
Remark: If there is a possibility that the external voltage applied on pin V
2.2 V during Deep power-down, the hysteresis of the WAKEUP input pin has to be
disabled in this register before entering Deep power-down mode in order for the chip to
wake up.
Table 56.General purpose register 4 (GPREG4, address 0x4003 8014) bit
The power profiles are available for all LPC11U3x/2x/1x.
5.2 Features
• Includes ROM-based application services
• Power Management services
• Clocking services
5.3 Basic configuration
Specific power profile settings are required in the following situations:
• When using the USB, configure the power profiles in Default mode.
• When using IAP commands, configure the power profiles in Default mode.
Disable all interrupts before making calls to the power profile API. You can re-enable the
interrupts after the power profile API calls have completed.
5.4 General description
The power consumption in Active and Sleep modes can be optimized for the application
through simple calls to the power profile. The power configuration routine configures the
LPC11U3x/2x/1x for one of the following power modes:
• Default mode corresponding to power configuration after reset.
• CPU performance mode corresponding to optimized processing capability.
• Efficiency mode corresponding to optimi zed balance of current consumption and CPU
performance.
• Low-current mode corresponding to lowest power consumption.
In addition, the power profile includes routines to select the optimal PLL settings for a
given system clock and PLL input clock.
The API calls to the ROM are performed by executing functions which are pointed by a
pointer within the ROM Driver Table. Figure 10
Power Profiles API.
This routine sets up the system PLL according to the calling arguments. If the expected
clock can be obtained by simply dividing the system PLL input, set_pll bypasses the PLL
to lower system power consumption.
UM10462
Chapter 5: LPC11U3x/2x/1x Power profiles
Remark: Before this routine is invoked, the PLL clock source (IRC/system oscillator) must
be selected (Table 17
PLL (Table 19
) and the system/AHB clock divider must be set to 1 (Table 21).
), the main clock source must be set to the input clock to the system
set_pll attempts to find a PLL setup that matches the calling parameters. Once a
combination of a feedback divider value (SYSPLLCTRL, M), a post divider ratio
(SYSPLLCTRL, P) and the system/AHB clock divider (SYSAHBCLKDIV) is found, set_pll
applies the selected values and switches the main clock source selection to the system
PLL clock out (if necessary).
The routine returns a result code that indicates if the system PLL was successfully set
(PLL_CMD_SUCCESS) or not (in which case the result code identifies what went wrong).
The current system frequency value is also returned. The application should use this
information to adjust other clocks in the device (the SSP, UART, and WDT clocks, and/or
clockout).
Table 57.set_pll routine
Routineset_pll
InputParam0: system PLL input frequency (in kHz)
Param1: expected system clock (in kHz)
Param2: mode (CPU_FREQ_EQU, CPU_FREQ_LTE, CPU_FREQ_GTE,
For a simplified clock configuration scheme see Figure 11. For more details see Figure 7.
5.6.1.1 Param0: system PLL input frequency and Param1: expected system clock
set_pll looks for a setup in which the system PLL clock does not exceed 50 MHz. It easily
finds a solution when the ratio between the expected system clock and the system PLL
input frequency is an integer value, but it can also find solutions in other cases.
The system PLL input frequency (Param0) must be between 10000 to 25000 kHz (10
MHz to 25 MHz) inclusive. The expected system clock (Param1) must be between 1 and
50000 kHz inclusive. If either of these requirements is not met, set_pll returns
PLL_INV ALID_FREQ an d returns Param0 as Result1 since the PLL setting is unchanged.
UM10462
Chapter 5: LPC11U3x/2x/1x Power profiles
5.6.1.2 Param2: mode
The first priority of set_pll is to find a setup that generates the system clock at exactly the
rate specified in Param1. If it is unlikely that an exact match can be found, input parameter
mode (Param2) should be used to specify if the actual system clock can be less than or
equal, greater than or equal or approximately the value specified as the expected system
clock (Param1).
A call specifying CPU_FREQ_EQU will only succeed if the PLL can output exactly the
frequency requested in Param1.
CPU_FREQ_LTE can be used if the requested frequency should not be exceeded (such
as overall current consumption and/or power budget reasons).
CPU_FREQ_GTE helps applications that need a minimum level of CPU processing
capabilities.
CPU_FREQ_APPROX results in a system clock that is as close as possible to the
requested value (it may be greater than or less than the requested value).
If an illegal mode is specified, set_pll returns PLL_INVALID_MODE. If the expected
system clock is out of the range supported by this routine, set_pll returns
PLL_FREQ_NOT_FOUND. In these cases the current PLL setting is not changed and
Param0 is returned as Result1.
5.6.1.3 Param3: system PLL lock time-out
It should take no more than 100 s for the system PLL to lock if a valid configuration is
selected. If Param3 is zero, set_pll will wait indefinitely for the PLL to lock. A non-zero
value indicates how many times the code will check for a successful PLL lock event
before it returns PLL_NOT_LOCKED. In this case the PLL settings are unchanged and
Param0 is returned as Result1.
Remark: The time it takes the PLL to lock depends on the selected PLL input clock
source (IRC/system oscillator) and its characteristics. The selected source can
experience more or less jitter depending on the operating conditions such as power
supply and/or ambient temperature. This is why it is suggested that when a good known
clock source is used and a PLL_NOT_LOCKED response is received, the set_pll routine
should be invoked several times before declaring the selected PLL clock source invalid.
Hint: setting Param3 equal to the system PLL frequency [Hz] divided by 10000 will
provide more than enough PLL lock-polling cycles.
5.6.1.4 Code examples
The following examples illustrate some of the features of set_pll discussed above.
5.6.1.4.1 Invalid frequency (device maximum clock rate exceeded)
The above code specifies a 12 MHz PLL input clock and a system clock of exactly
60 MHz. The application was ready to infinitely wait for the PLL to lock. But the expected
system clock of 60 MHz exceeds the maximum of 50 MHz. Therefore set_pll returns
PLL_INVALID_FREQ in result[0] and 12000 in result[1] without changing the PLL
settings.
5.6.1.4.2 Invalid frequency selection (system clock divider restrictions)
The above code specifies a 12 MHz PLL input clock, a system clock of no more than
40 kHz and no time-out while waiting for the PLL to lock. Since the maximum divider value
for the system clock is 255 and running at 40 kHz would need a divide by value of 300,
set_pll returns PLL_INVALID_FREQ in result[0] and 12 00 0 in result[1] without changing
the PLL settings.
The above code specifies a 12 MHz PLL input clock and a system clock of exactly
25 MHz. The application was ready to infinitely wait for the PLL to lock. Since there is no
valid PLL setup within earlier mentioned restrictions, set_pll returns
PLL_FREQ_NOT_FOUND in result[0] and 12000 in result[1] without changing the PLL
settings.
The above code specifies a 12 MHz PLL input clock, a system clock of no more than
25 MHz and no locking time-out. set_pll returns PLL_CMD_SUCCESS in result[0] and
24000 in result[1]. The new system clock is 24 MHz.
5.6.1.4.5 System clock greater than or equal to the expected value
The above code specifies a 12 MHz PLL input clock, a system clock of at least 25 MHz
and no locking time-out. set_pll returns PLL_CMD_SUCCESS in result[0] and 36000 in
result[1]. The new system clock is 36 MHz.
UM10462
Chapter 5: LPC11U3x/2x/1x Power profiles
5.6.1.4.6 System clock approximately equal to the expected value
The above code specifies a 12 MHz PLL input clock, a system clock of approximately
16.5 MHz and no locking time-out. set_pll returns PLL_CMD_SUCCESS in result[0] and
16000 in result[1]. The new system clock is 16 MHz.
5.7 Power routine
5.7.1 set_power
This routine configures the device’s internal power control settings according to the calling
arguments. The goal is to reduce acti ve power consumption while maint aining the feature
of interest to the application close to its optimum.
Remark: The set_power routine was de signed for systems employing the configuration of
SYSAHBCLKDIV = 1 (System clock divider register, see Table 23
this routine in an application with the system clock divider not equal to 1 might not improve
microcontroller’s performance as much as in setups when the main clock and the system
clock are running at the same rate.
and Figure 11). Using
set_power returns a result code that reports whether the power setting was successfully
changed or not.
For a simplified clock configuration scheme see Figure 11. For more details see Figure 7.
5.7.1.1 Param0: main clock
The main clock is the clock rate the microcontroller uses to source the system’s and the
peripherals’ clock. It is configured by either a successful execution of the clocking routine
call or a similar code provided by the user. This operand must be an integer between 1 to
50 MHz inclusive. If a value out of this range is supplied, set_power returns
PWR_INVALID_FREQ and does not change the power control system.
5.7.1.2 Param1: mode
The input parameter mode (Param1) specifies one of four available power settings. If an
illegal selection is provided, set_power returns PWR_INVALID_MODE and does not
change the power control system.
PWR_DEFAULT keeps the device in a baseline power setting similar to its reset state.
PWR_CPU_PERFORMANCE configures the microcontroller so that it can provide more
processing capability to the application. CPU performance is 30% better than the default
option.
UM10462
Chapter 5: LPC11U3x/2x/1x Power profiles
PWR_EFFICIENCY setting was designed to find a balance between active current and
the CPU’s ability to execute code and process data. In this mode the device outperforms
the default mode both in terms of providing higher CPU performance and lowering active
current.
PWR_LOW_CURRENT is intended for those solutions that focus on lowering power
consumption rather than CPU performance.
5.7.1.3 Param2: system clock
The system clock is the clock rate at which the microcontroller core is running when
set_power is called. This parameter is an integer between from 1 and 50 MHz inclusive.
5.7.1.4 Code examples
The following examples illustrate some of the set_power features discussed above.
5.7.1.4.1 Invalid frequency (device maximum clock rate exceeded)
The above setup would be used in a system running at the main and system clock of
60 MHz, with a need for maximum CPU processing power. Since the specified 60 MHz
clock is above the 50 MHz maximum, set_power returns PWR_INVALID_FREQ in
result[0] without changing anything in the existing power setup.
The above code specifies that an application is running at the main and system clock of
24 MHz with em p ha sis on efficiency. set_power returns PWR_CMD_SUCCESS in
result[0] after configuring the microcontroller’s internal power control features.
The NVIC is identical for all LPC11U3x/2x/1 x parts. See Section 24.5.2 for details.
Interrupt 31 (I/O Handler interrupt) is available on part LPC11U37HFBD64/401 only.
6.2 Introduction
The Nested Vectored Interrupt Controller (NVIC) is an integral part of the Cortex-M0. The
tight coupling to the CPU allows for low interrupt latency and efficient processing of late
arriving interrupts.
6.3 Features
• Nested Vectored Interrupt Controller that is an integral part of the ARM Cortex-M0
Table 59 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. There is no significance or priority about what
line is connected where, except for certain standards from ARM.
See Section 24.5.2
Table 59.Connection of interrupt sources to the Vectored Interrupt Controller
IPR5R/W0x414Interrupt Priority Registers 5. This register allows assigning a priority
IPR6R/W0x418Interrupt Priority Registers 6. This register allows assigning a priority
IPR7R/W0x41CInterrupt Priority Registers 7. This register allows assigning a priority
DescriptionReset
to each interrupt. This register contains the 2-bit priority fields for
interrupts 12 to 15.
to each interrupt. This register contains the 2-bit priority fields for
interrupts 24 to 27.
to each interrupt. This register contains the 2-bit priority fields for
interrupts 28 to 31.
6.5.1 Interrupt Set Enable Register 0 register
The ISER0 register allows to enable peripheral interrupts or to read the enabled state of
those interrupts. Disable interrupts through the ICER0 (Section 6.5.2
The bit description is as follows for all bits in this register:
UM10462
Reference
value
0Table 71
0Table 72
0Table 73
).
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.
Table 61.Interrupt Set Enable Register 0 register (ISER0, address 0xE000 E100) bit
The ICER0 register allows disabling the peripheral interrupts, or for reading the enabled
state of those interrupts. Enable interrupts through the ISER0 registers (Section 6.5.1
description
UM10462
Chapter 6: LPC11U3x/2x/1x NVIC
…continued
).
The bit description is as follows for all bits in this register:
Write — Writing 0 has no effect, wr iting 1 disables the interrupt.
Read — 0 indicates that the interrupt is disabled, 1 indicates that the interrupt is enabled.
The ISPR0 register allows setting the pending state of the per iph er al int er ru pts, or for
reading the pending state of those interrupt s. Clear the pending state of interrupts thr ough
the ICPR0 registers (Section 6.5.4
The bit description is as follows for all bits in this register:
).
…continued
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.
Table 63.Interrupt set pending register 0 register (ISPR0, address 0xE000 E200) bit
The ICPR0 register allows clearing the pending state of the peripheral interrupts, or for
reading the pending state of those interrupts. Set the pend in g state of inter ru p ts through
the ISPR0 register (Section 6.5.3
The bit description is as follows for all bits in this register:
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.
Table 64.Interrupt clear pending register 0 register (ICPR0, addres s 0xE000 E280) bit
The IABR0 register is a read-only register that allows reading the active state of the
peripheral interrupts. Use this register to determine which peripherals are asserting an
interrupt to the NVIC and may also be pending if there ar e en a ble d.
The bit description is as follows for all bits in this register:
Write — n/a.
Read — 0 indicates that the interrupt is not active, 1 indicates that the interrupt is active.
Table 65.Interrupt Active Bit Register 0 (IABR0, address 0xE000 E300) bit description
BitSymbolFunctionReset va lu e
0IAB_PININT0Interrupt active state.0
1IAB_PININT1Interrupt active state.0
2IAB_PININT2Interrupt active state.0
3IAB_PININT3Interrupt active state.0
4IAB_PININT4Interrupt active state.0
5IAB_PININT5Interrupt active state.0
6IAB_PININT6Interrupt active state.0
7IAB_PININT7Interrupt active state.0
Table 65.Interrupt Active Bit Register 0 (IABR0, address 0xE000 E300) bit description
BitSymbolFunctionReset va lu e
8IAB_GINT0Interrupt active state.0
9IAB_GINT1Interrupt active state.0
10-Reserved.0
1 1-Reserved.0
12-Reserved.0
13-Reserved.0
14IAB_SSP1Interrupt active state.0
15IAB_I2C0Interrupt active state.0
16IAB_CT16B0Interrupt active state.0
17IAB_CT16B1Interrupt active state.0
18IAB_CT32B0Interrupt active state.0
19IAB_CT32B1Interrupt active state.0
20IAB_SSP0Interrupt active state.0
21IAB_USART0Interrupt active state.0
22IAB_USB_IRQInterrupt active state.0
23IAB_USB_FIQInterrupt active state.0
24IAB_ADCInterrupt active state.0
25IAB_WWDTInterrupt active state.0
26IAB_BODInterrupt active state.0
27IAB_FLASHInterrupt active state.0
28-Reserved.0
29-Reserved.0
30IAB_USB_WAKEKUP Interrupt active state.0
31IAP_IOHInterrupt active state.0
6.5.6 Interrupt Priority Register 0
The IPR0 register controls the priority of four peripheral interrupts. Each interrupt can
have one of 4 priorities, where 0 is the highest priority.
T able 66. Interrupt Priority Register 0 (IPR0, address 0xE000 E400) bit description
The IOCON register map depends on the packa ge type (see Table 74). Registers for pins
which are not pinned out are reserved.
Pin functions IOH_n are available only on part LPC11U37H for use with the I/O Handler.
Table 74.IOCON registers available
PackagePort 0Port 1
HVQFN33PIO0_0 to PIO0_23PIO1_15; PIO1_19
LQFP48PIO0_0 to PIO0_23PIO1_13 to PIO1_16; PIO1_19 to PIO1_29; PIO1_31
TFBGA48PIO0_0 to PIO0_23PIO1_5; PIO1_13 to PIO1_16; PIO1_19 to PIO1_29
LQFP64PIO0_0 to PIO0_23PIO1_0 to PIO1_29
7.2 Introduction
The I/O configuration registers control the el ectrical characteristics of the pads. The
following features are programmable:
• Pin function
• Internal pull-up/pull-down resistor or bus keeper function (repeater mode)
• Open-drain mode for standard I/O pins
• Hysteresis
• Input inverter
• Glitch filter on selected pins
• Analog input or digital mode for pads hosting the ADC inputs
2
• I
C mode for pads hosting the I2C-bus function
7.3 General description
The IOCON registers control the function (GPIO or peripheral function) and the electrical
characteristics of the port pins (see Figure 13
The 10 ns glitch filter is available on selected pins only.
Fig 13. Standard I/O pin configuration
7.3.1 Pin function
The FUNC bits in the IOCON registers can be set to GPIO (FUNC = 000) or to a
peripheral function. If the pins are GPIO pins, the DIR registers determine whether the pin
is configured as an input or output (see Section 9.5.3.3
pin direction is controlled automatically depending on the pin’s functionality. The DIR
registers have no effect for peripheral functions.
7.3.2 Pin mode
The MODE bits in the IOCON register allow the selection of on-chip pull-up or pull-down
). For any peripheral function, the
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 at a logic HIGH and enables
the pull-down resistor if the pin is at a logic LOW. This causes the pin to retain its last
known state if it is configured as an input and is not driven externa lly. The state retention is
NXP Semiconductors
not applicable to the Deep power-down mode. Repeater mode may typically be used to
prevent a pin from floating (and potentially using significant power if it floats to an
indeterminate state) if it is temporarily not driven.
7.3.3 Hysteresis
The input buffer for digital functions can be configured with hysteres is or as pl a in bu ffer
through the IOCON registers.
UM10462
Chapter 7: LPC11U3x/2x/1x I/O configuration
If the external pad supply voltage V
can be enabled or disabled. If V
to use the pin in input mode.
7.3.4 Input inverter
If the input inverter is enabled, a HIGH pin level is inverted to 0 and a LOW pin level is
inverted to 1.
7.3.5 Input glitch filter
Selected pins (pins PIO0_22, PIO0_23, and PIO0_11 to PIO0_16) provide the option of
turning on or off a 10 ns input glitch filter. The glit ch filte r is turne d on by de fault. The
RESET
pin has a 20 ns glitch filter (not configurable).
7.3.6 Open-drain mode
A pseudo open-drain mode can be supported for all digital pins. Note that except for the
2
I
C-bus pins, this is not a true open-drain mode.
7.3.7 Analog mode
In analog mode, the digital receiver is disconnecte d to obtain an accu rate input volt age for
analog-to-digital conversions. This mode can be selected in those IOCON registers that
control pins with an analog function. If analog mode is selected, hysteresis, pin mode,
inverter, glitch filter, and open-drain settings have no effect.
is between 2.5 V and 3.6 V, the hysteresis buffer
DD
is below 2.5 V, the hysteresis buffer must be disabled
DD
For pins without analog functions, the analog mode setting has no effect.
7.3.8 I2C mode
If the I2C function is selected by the FUNC bits of registers PIO0_4 (Table 80) and PIO0_5
(Table 81
• Standard mode/Fast-mode I
• Fast-mode Plus I
), then the I2C-bus pins can be configured for different I2C-modes:
2
according to the I
high-current sinks. An open-drain output according to the I
configured separately.
2
C-bus specification can be configured separately.
2
C with 50 ns input glitch filter. In this mode, the pins function as
C with 50 ns input glitch filter. An open-drain output
2
C-bus specification can be
• Standard functionality without input filter.
2
Remark: Either Standard mode/Fast-mode I
selected if the pin is used as GPIO pin.
See Figure 14 for the reset pad configuration. RESET functionality is not available in
Deep power-down mode. Use the WAKEUP pin to reset the chip and wake up from Deep
power-down mode. An external pull-up resistor is required on this pin for the Deep
power-down mode. The reset pin includes a fixed 20 ns glitch filter.
UM10462
Chapter 7: LPC11U3x/2x/1x I/O configuration
Fig 14. Reset pad configuration
7.3.10 WAKEUP pin (pin PIO0_16)
The WAKEUP pin is combined with pin PIO0_16 and includes a 20 ns fixed glitch filter.
This pin must be pulled HIGH externally to enter Deep power-down mode and pulled LOW
to exit Deep power-down mode. A LOW-going pulse as short as 50 ns wakes up the part.