NXP Semiconductors designed the LPC2458 microcontroller around a 16-bit/32-bit
ARM7TDMI-S CPU core with real-time debug interfaces that include both JTAG and
embedded trace. The LPC2458 has 512 kB of on-chip high-speed flash memory. This
flash memory includes a special 128-bit wide memory interface and accelerator
architecture that enables the CPU to execute sequential instructions from flash memory at
the maximum 72 MHz system clock rate. This feature is available only on the LPC2000
ARM microcontroller family of products. The LPC2458 can execute both 32-bit ARM and
16-bit Thumb instructions. Support for the two instruction sets means engineers can
choose to optimize their application for either performance or code size at the sub-routine
level. When the core executes instructions in Thumb state it can reduce code size by
more than 30 % with only a small loss in performance while executing instructions in ARM
state maximizes core performance.
The LPC2458 microcontroller is ideal for multi-purpose communication applications. It
incorporates a 10/100 Ethernet Media Access Controller (MAC), a USB full-speed
Device/Host/OTG Controller with 4 kB of endpoint RAM, four UARTs, two Controller Area
Network (CAN) channels, an SPI interface, two Synchronous Serial Ports (SSP), three I
interfaces, and an I
interfaces are the following feature components; an on-chip 4 MHz internal precision
oscillator, 98 kB of total RAM consisting of 64 kB of local SRAM, 16 kB SRAM for
Ethernet, 16 kB SRAM for general purpose DMA, 2 kB of battery powered SRAM, and an
External Memory Controller (EMC). These features make this device optimally suited for
communication gateways and protocol converters. Complementing the many serial
communication controllers, versatile clocking capabilities, and memory features are
various 32-bit timers, an improved 10-bit ADC, 10-bit DAC, two PWM units, four external
interrupt pins, and up to 136 fast GPIO lines. The LPC2458 connects 64 of the GPIO pins
to the hardware based Vector Interrupt Controller (VIC) that means these external inputs
can generate edge-triggered interrupts. All of these features make the LPC2458
particularly suitable for industrial control and medical systems.
2. Features and benefits
ARM7TDMI-S processor, running at up to 72 MHz.
512 kB on-chip flash program memory with In-System Programming (ISP) and
In-Application Programming (IAP) capabilities. Flash program memory is on the ARM
local bus for high performance CPU access.
98 kB on-chip SRAM includes:
64 kB of SRAM on the ARM local bus for high performance CPU access.
16 kB SRAM for Ethernet interface. Can also be used as general purpose SRAM.
2
S interface. Supporting this collection of serial communications
2
C
NXP Semiconductors
Single-chip 16-bit/32-bit micro
16 kB SRAM for general purpose DMA use also accessible by the USB.
2 kB SRAM data storage powered from the Real-Time Clock (RTC) power domain.
Dual Advanced High-performance Bus (AHB) system allows simultaneous Ethernet
DMA, USB DMA, and program execution from on-chip flash with no contention.
EMC provides support for asynchronous static memory devices such as RAM, ROM
and flash, as well as dynamic memories such as Single Data Rate SDRAM.
Advanced Vectored Interrupt Controller (VIC), supporting up to 32 vectored interrupts.
General Purpose DMA controller (GPDMA) on AHB that can be used with the SSP,
2
I
S, and SD/MM interface as well as for memory-to-memory transfers.
Serial Interfaces:
Ethernet MAC with MII/RMII interface and associated DMA controller. These
functions reside on an independent AHB.
USB 2.0 full-speed dual port Device/Host/OTG Controller with on-chip PHY and
associated DMA controller.
Four UARTs with fractional baud rate generation, one with modem control I/O, one
with IrDA support, all with FIFO.
CAN controller with two channels.
SPI controller.
Two SSP controllers, with FIFO and multi-protocol capabilities. One is an alternate
for the SPI port, sharing its interrupt. SSPs can be used with the GPDMA controller.
Three I2C-bus interfaces (one with open-drain and two with standard port pins).
I2S (Inter-IC Sound) interface for digital audio input or output. It can be used with
the GPDMA.
Other peripherals:
SD/MMC memory card interface.
136 General purpose I/O pins with configurable pull-up/down resistors.
10-bit ADC with input multiplexing among 8 pins.
10-bit DAC.
Four general purpose timers/counters with 8 capture inputs and 10 compare
outputs. Each timer block has an external count input.
Two PWM/timer blocks with support for three-phase motor control. Each PWM has
an external count inputs.
RTC with separate power domain, clock source can be the RTC oscillator or the
APB clock.
2 kB SRAM powered from the RTC power pin, allowing data to be stored when the
rest of the chip is powered off.
WatchDog Timer (WDT). The WDT can be clocked from the internal RC oscillator,
the RTC oscillator, or the APB clock.
Standard ARM test/debug interface for compatibility with existing tools.
Emulation trace module supports real-time trace.
Single 3.3 V power supply (3.0 V to 3.6 V).
Four reduced power modes: idle, sleep, power-down, and deep power-down.
Four external interrupt inputs configurable as edge/level sensitive. All pins on port 0
and port 2 can be used as edge sensitive interrupt sources.
Processor wake-up from Power-down mode via any interrupt able to operate during
Power-down mode (includes external interrupts, RTC interrupt, USB activity, Ethernet
wake-up interrupt, CAN bus activity, port 0/2 pin interrupt).
Product data sheetRev. 4.2 — 15 October 2020 2 of 81
LPC2458
NXP Semiconductors
Two independent power domains allow fine tuning of power consumption based on
Each peripheral has its own clock divider for further power saving. These dividers help
Brownout detect with separate thresholds for interrupt and forced reset.
On-chip power-on reset.
On-chip crystal oscillator with an operating range of 1 MHz to 25 MHz.
4 MHz internal RC oscillator trimmed to 1 % accuracy that can optionally be used as
On-chip PLL allows CPU operation up to the maximum CPU rate without the need for
Boundary scan for simplified board testing.
Versatile pin function selections allow more possibilities for using on-chip peripheral
3. Applications
LPC2458
Single-chip 16-bit/32-bit micro
needed features.
reduce active power by 20 % to 30 %.
the system clock. When used as the CPU clock, does not allow CAN and USB to run.
a high frequency crystal. May be run from the main oscillator, the internal RC oscillator,
or the RTC oscillator.
functions.
Industrial control
Medical systems
Protocol converter
Communications
Product data sheetRev. 4.2 — 15 October 2020 8 of 81
NXP Semiconductors
Table 4.Pin description …continued
SymbolBallTypeDescription
P0[9]/
I2STX_SDA/
MOSI1/MAT2[3]
P0[10]/TXD2/
SDA2/MAT3[0]
P0[11]/RXD2/
SCL2/MAT3[1]
P0[12]/
USB_PPWR2
/
MISO1/AD0[6]
P0[13]/
USB_UP_LED2/
MOSI1/AD0[7]
P0[14]/
USB_HSTEN2
/
USB_CONNECT2/
SSEL1
P0[15]/TXD1/
SCK0/SCK
P0[16]/RXD1/
SSEL0/SSEL
A13
L10
P12
J4
J5
M5
H13
H14
[1]
I/OP0[9] — General purpose digital input/output pin.
I/OI2STX_SDA — Transmit data. It is driven by the transmitter and read by the
receiver. Corresponds to the signal SD in the I
I/OMOSI1 — Master Out Slave In for SSP1.
OMAT2[3] — Match output for Timer 2, channel 3.
[1]
I/OP0[10] — General purpose digital input/output pin.
OTXD2 — Transmitter output for UART2.
I/OSDA2 — I
OMAT3[0] — Match output for Timer 3, channel 0.
[1]
I/OP0[11] — General purpose digital input/output pin.
IRXD2 — Receiver input for UART2.
I/OSCL2 — I
OMAT3[1] — Match output for Timer 3, channel 1.
[2]
I/OP0[12] — General purpose digital input/output pin.
OUSB_PPWR2
I/OMISO1 — Master In Slave Out for SSP1.
IAD0[6] — A/D converter 0, input 6.
[2]
I/OP0[13] — General purpose digital input/output pin.
OUSB_UP_LED2 — USB port 2 GoodLink LED indicator. It is LOW when device is
configured (non-control endpoints enabled), or when host is enabled and has
detected a device on the bus. It is HIGH when the device is not configured, or
when host is enabled and has not detected a device on the bus, or during global
suspend. It transitions between LOW and HIGH (flashes) when host is enabled
and detects activity on the bus.
I/OMOSI1 — Master Out Slave In for SSP1.
IAD0[7] — A/D converter 0, input 7.
[1]
I/OP0[14] — General purpose digital input/output pin.
OUSB_HSTEN2
OUSB_CONNECT2 — SoftConnect control for USB port 2. Signal used to switch
an external 1.5 k resistor under software control. Used with the SoftConnect
USB feature.
I/OSSEL1 — Slave Select for SSP1.
[1]
I/OP0[15] — General purpose digital input/output pin.
OTXD1 — Transmitter output for UART1.
I/OSCK0 — Serial clock for SSP0.
I/OSCK — Serial clock for SPI.
[1]
I/OP0[16] — General purpose digital input/output pin.
IRXD1 — Receiver input for UART1.
I/OSSEL0 — Slave Select for SSP0.
I/OSSEL — Slave Select for SPI.
Single-chip 16-bit/32-bit micro
2
S-bus specification.
2
C2 data input/output (this is not an open-drain pin).
2
C2 clock input/output (this is not an open-drain pin).
I/OP1[16] — General purpose digital input/output pin.
OENET_MDC — Ethernet MIIM clock.
[1]
I/OP1[17] — General purpose digital input/output pin.
I/OENET_MDIO — Ethernet MI data input and output.
[1]
I/OP1[18] — General purpose digital input/output pin.
OUSB_UP_LED1 — USB port 1 GoodLink LED indicator. It is LOW when device is
configured (non-control endpoints enabled), or when host is enabled and has
detected a device on the bus. It is HIGH when the device is not configured, or
when host is enabled and has not detected a device on the bus, or during global
suspend. It transitions between LOW and HIGH (flashes) when host is enabled
and detects activity on the bus.
Product data sheetRev. 4.2 — 15 October 2020 19 of 81
NXP Semiconductors
LPC2458
Single-chip 16-bit/32-bit micro
Table 4.Pin description …continued
SymbolBallTypeDescription
V
DDA
VREFG2
VBATK1
[1] 5 V tolerant pad providing digital I/O functions with TTL levels and hysteresis.
[2] 5 V tolerant pad providing digital I/O functions (with TTL levels and hysteresis) and analog input. When configured as a ADC input,
digital section of the pad is disabled.
[3] 5 V tolerant pad providing digital I/O with TTL levels and hysteresis and analog output function. When configured as the DAC output,
digital section of the pad is disabled.
[4] Open-drain 5 V tolerant digital I/O pad, compatible with I
functionality. When power is switched off, this pin connected to the I
configuration applies to all functions on this pin.
[5] Pad provides digital I/O and USB functions. It is designed in accordance with the USB specification, revision 2.0 (Full-speed and
Low-speed mode only).
[6] 5 V tolerant pad with 10 ns glitch filter providing digital I/O functions with TTL levels and hysteresis.
[7] Pad provides special analog functionality.
[8] This pin has a built-in pull-up resistor.
[9] This pin has no built-in pull-up and no built-in pull-down resistor.
[10] 5 V tolerant pad with 20 ns glitch filter providing digital I/O function with TTL levels and hysteresis.
[11] When the main oscillator is not used, connect XTAL1 and XTAL2 as follows: XTAL1 can be left floating or can be grounded (grounding
is preferred to reduce susceptibility to noise). XTAL2 should be left floating.
[12] If the RTC is not used, these pins can be left floating.
[13] Pad provides special analog functionality.
[14] Pad provides special analog functionality.
[15] Pad provides special analog functionality.
[16] Pad provides special analog functionality.
[17] Pad provides special analog functionality.
[18] Pad provides special analog functionality.
F2
[18]
[18]
[18]
Ianalog 3.3 V pad supply voltage: This should be nominally the same voltage as
V
but should be isolated to minimize noise and error. This voltage is used
DD(3V3)
to power the ADC and DAC.
IADC reference: This should be nominally the same voltage as V
DD(3V3)
but
should be isolated to minimize noise and error. The level on this pin is used as a
reference for ADC and DAC.
IRTC power supply: 3.3 V on this pin supplies the power to the RTC peripheral.
2
C-bus 400 kHz specification. It requires an external pull-up to provide output
2
C-bus is floating and does not disturb the I2C lines. Open-drain
7. Functional description
7.1 Architectural overview
The LPC2458 microcontroller consists of an ARM7TDMI-S CPU with emulation support,
the ARM7 local bus for closely coupled, high-speed access to the majority of on-chip
memory, the AMBA AHB interfacing to high-speed on-chip peripherals and external
memory, and the AMBA APB for connection to other on-chip peripheral functions. The
microcontroller permanently configures the ARM7TDMI-S processor for little-endian byte
order.
The LPC2458 implements two AHB in order to allow the Ethernet block to operate without
interference caused by other system activity. The primary AHB, referred to as AHB1,
includes the VIC, GPDMA controller, and EMC.
Product data sheetRev. 4.2 — 15 October 2020 20 of 81
NXP Semiconductors
The second AHB, referred to as AHB2, includes only the Ethernet block and an
associated 16 kB SRAM. In addition, a bus bridge is provided that allows the secondary
AHB to be a bus master on AHB1, allowing expansion of Ethernet buffer space into
off-chip memory or unused space in memory residing on AHB1.
In summary, bus masters with access to AHB1 are the ARM7 itself, the GPDMA function,
and the Ethernet block (via the bus bridge from AHB2). Bus masters with access to AHB2
are the ARM7 and the Ethernet block.
AHB peripherals are allocated a 2 MB range of addresses at the very top of the 4 GB
ARM memory space. Each AHB peripheral is allocated a 16 kB address space within the
AHB address space. Lower speed peripheral functions are connected to the APB. The
AHB to APB bridge interfaces the APB to the AHB. APB peripherals are also allocated a
2 MB range of addresses, beginning at the 3.5 GB address point. Each APB peripheral is
allocated a 16 kB address space within the APB address space.
The ARM7TDMI-S processor is a general purpose 32-bit microprocessor, which offers
high performance and very low power consumption. The ARM architecture is based on
Reduced Instruction Set Computer (RISC) principles, and the instruction set and related
decode mechanism are much simpler than those of microprogrammed complex
instruction set computers. This simplicity results in a high instruction throughput and
impressive real-time interrupt response from a small and cost-effective processor core.
LPC2458
Single-chip 16-bit/32-bit micro
Pipeline techniques are employed so that all parts of the processing and memory systems
can operate continuously. Typically, while one instruction is being executed, its successor
is being decoded, and a third instruction is being fetched from memory.
The ARM7TDMI-S processor also employs a unique architectural strategy known as
Thumb, which makes it ideally suited to high-volume applications with memory
restrictions, or applications where code density is an issue.
The key idea behind Thumb is that of a super-reduced instruction set. Essentially, the
ARM7TDMI-S processor has two instruction sets:
• the standard 32-bit ARM set
• a 16-bit Thumb set
The Thumb set’s 16-bit instruction length allows it to approach higher density compared to
standard ARM code while retaining most of the ARM’s performance.
7.2 On-chip flash programming memory
The LPC2458 incorporates 512 kB flash memory system. This memory may be used for
both code and data storage. Programming of the flash memory may be accomplished in
several ways. It may be programmed In System via the serial port (UART0). The
application program may also erase and/or program the flash while the application is
running, allowing a great degree of flexibility for data storage field and firmware upgrades.
The flash memory is 128 bits wide and includes pre-fetching and buffering techniques to
allow it to operate at speeds of 72 MHz.
Product data sheetRev. 4.2 — 15 October 2020 21 of 81
NXP Semiconductors
7.3 On-chip SRAM
The LPC2458 includes a SRAM memory of 64 kB reserved for the ARM processor
exclusive use. This RAM may be used for code and/or data storage and may be accessed
as 8 bits, 16 bits, and 32 bits.
A 16 kB SRAM block serving as a buffer for the Ethernet controller and a 16 kB SRAM
associated with the second AHB can be used both for data and code storage. The 2 kB
RTC SRAM can be used for data storage only. The RTC SRAM is battery powered and
retains the content in the absence of the main power supply.
7.4 Memory map
The LPC2458 memory map incorporates several distinct regions as shown in Tab le 5 and
Figure 3.
In addition, the CPU interrupt vectors may be remapped to allow them to reside in either
flash memory (default), boot ROM, or SRAM (see
Table 5.LPC2458 memory usage and details
Address range General useAddress range details and description
Product data sheetRev. 4.2 — 15 October 2020 22 of 81
NXP Semiconductors
0.0 GB
1.0 GB
ON-CHIP NON-VOLATILE MEMORY
0x0000 0000
RESERVED ADDRESS SPACE
SPECIAL REGISTERS
ON-CHIP STATIC RAM
RESERVED ADDRESS SPACE
0x4000 0000
0x3FFF 8000
0x3FFF FFFF
2.0 GB0x8000 0000
0x7FFF FFFF
BOOT ROM AND BOOT FLASH
(BOOT FLASH REMAPPED FROM ON-CHIP FLASH)
0xDFFF FFFF
0xC000 0000
0xBFFF FFFF
RESERVED ADDRESS SPACE
EXTERNAL STATIC AND DYNAMIC MEMORY
3.75 GB
4.0 GB
3.5 GB
AHB PERIPHERALS
APB PERIPHERALS
0xE000 0000
0xF000 0000
0xFFFF FFFF
002aad657
LPC2458
Single-chip 16-bit/32-bit micro
Fig 3.LPC2458 memory map
7.5 Interrupt controller
The ARM processor core has two interrupt inputs called Interrupt Request (IRQ) and Fast
Interrupt Request (FIQ). The VIC takes 32 interrupt request inputs which can be
programmed as FIQ or vectored IRQ types. The programmable assignment scheme
means that priorities of interrupts from the various peripherals can be dynamically
assigned and adjusted.
FIQs have the highest priority. If more than one request is assigned to FIQ, the VIC ORs
the requests to produce the FIQ signal to the ARM processor. The fastest possible FIQ
latency is achieved when only one request is classified as FIQ, because then the FIQ
Product data sheetRev. 4.2 — 15 October 2020 23 of 81
NXP Semiconductors
service routine can simply start dealing with that device. But if more than one request is
assigned to the FIQ class, the FIQ service routine can read a word from the VIC that
identifies which FIQ source(s) is (are) requesting an interrupt.
Vectored IRQs, which include all interrupt requests that are not classified as FIQs, have a
programmable interrupt priority. When more than one interrupt is assigned the same
priority and occur simultaneously, the one connected to the lowest numbered VIC channel
will be serviced first.
The VIC ORs the requests from all of the vectored IRQs to produce the IRQ signal to the
ARM processor. The IRQ service routine can start by reading a register from the VIC and
jumping to the address supplied by that register.
7.5.1 Interrupt sources
Each peripheral device has one interrupt line connected to the VIC but may have several
interrupt flags. Individual interrupt flags may also represent more than one interrupt
source.
Any pin on port 0 and port 2 (total of 64 pins) regardless of the selected function, can be
programmed to generate an interrupt on a rising edge, a falling edge, or both. Such
interrupt request coming from port 0 and/or port 2 will be combined with the EINT3
interrupt requests.
LPC2458
Single-chip 16-bit/32-bit micro
7.6 Pin connect block
The pin connect block allows selected pins of the microcontroller to have more than one
function. Configuration registers control the multiplexers to allow connection between the
pin and the on chip peripherals.
Peripherals should be connected to the appropriate pins prior to being activated and prior
to any related interrupt(s) being enabled. Activity of any enabled peripheral function that is
not mapped to a related pin should be considered undefined.
7.7 External memory controller
The LPC2458 EMC is an ARM PrimeCell MultiPort Memory Controller peripheral offering
support for asynchronous static memory devices such as RAM, ROM, and flash. In
addition, it can be used as an interface with off-chip memory-mapped devices and
peripherals. The EMC is an Advanced Microcontroller Bus Architecture (AMBA) compliant
peripheral.
7.7.1 Features
• Dynamic memory interface support including single data rate SDRAM.
• Asynchronous static memory device support including RAM, ROM, and flash, with or
without asynchronous page mode.
• Low transaction latency.
• Read and write buffers to reduce latency and to improve performance.
• 8/16 data and 20 address lines wide static memory support.
Product data sheetRev. 4.2 — 15 October 2020 24 of 81
NXP Semiconductors
• Static memory features include:
• Two chip selects for synchronous memory and two chip selects for static memory
• Power-saving modes dynamically control CKE and CLKOUT to SDRAMs.
• Dynamic memory self-refresh mode controlled by software.
• Controller supports 2048 (A0 to A10), 4096 (A0 to A11), and 8192 (A0 to A12) row
• Separate reset domains allow auto-refresh through a chip reset if desired.
Note: Synchronous static memory devices (synchronous burst mode) are not supported.
LPC2458
Single-chip 16-bit/32-bit micro
– Asynchronous page mode read
– Programmable Wait States
– Bus turnaround delay
– Output enable and write enable delays
– Extended wait
devices.
address synchronous memory parts. That is typical 512 MB, 256 MB, and 128 MB
parts, with 4, 8, and 16 data bits per device.
7.8 General purpose DMA controller
The GPDMA is an AMBA AHB compliant peripheral allowing selected LPC2458
peripherals to have DMA support.
The GPDMA enables peripheral-to-memory, memory-to-peripheral,
peripheral-to-peripheral, and memory-to-memory transactions. Each DMA stream
provides unidirectional serial DMA transfers for a single source and destination. For
example, a bidirectional port requires one stream for transmit and one for receive. The
source and destination areas can each be either a memory region or a peripheral, and
can be accessed through the AHB master.
7.8.1 Features
• Two DMA channels. Each channel can support a unidirectional transfer.
• The GPDMA can transfer data between the 16 kB SRAM, external memory, and
peripherals such as the SD/MMC, two SSPs, and the I
• Single DMA and burst DMA request signals. Each peripheral connected to the
GPDMA can assert either a burst DMA request or a single DMA request. The DMA
burst size is set by programming the GPDMA.
• Memory-to-memory, memory-to-peripheral, peripheral-to-memory, and
peripheral-to-peripheral transfers.
• Scatter or gather DMA is supported through the use of linked lists. This means that
the source and destination areas do not have to occupy contiguous areas of memory.
• Hardware DMA channel priority. Each DMA channel has a specific hardware priority.
DMA channel 0 has the highest priority and channel 1 has the lowest priority. If
requests from two channels become active at the same time, the channel with the
highest priority is serviced first.
• AHB slave DMA programming interface. The GPDMA is programmed by writing to the
DMA control registers over the AHB slave interface.