32-Bit ARM Cortex-M0+ Microcontroller
32-Bit ARM Cortex-M0+ Microcontroller
1. General description
The NXP LPC8N04 is an IC optimized for an entry level Cortex-M0+ MCU with built-in
NFC interface. LPC8N04 supports an effective system solution with a minimal number of
external components for NFC related applications.
The embedded ARM Cortex-M0+ offers flexibility to the users of this IC to implement their
own dedicated solution. The LPC8N04 contains multiple features, including multiple
power-down modes and a selectable CPU frequency of up to 8 MHz, for ultra-low power
consumption.
Users can program this LPC8N04 with the industry-wide standard solutions for ARM
Cortex-M0+ processors.
CAUTION
This device is sensitive to ElectroStatic Discharge (ESD). Observe precautions for handling
electrostatic sensitive devices.
Such precautions are described in the ANSI/ESD S20.20, IEC/ST 61340-5, JESD625-A or
equivalent standards.
CAUTION
Semiconductors are light sensitive. Exposure to light sources can cause the IC to
malfunction. The IC must be protected against light. The protection must be applied to all
sides of the IC.
NXP Semiconductors LPC8N04
32-bit ARM Cortex-M0+ microcontroller
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
3. Applications
Configurable LED strip/christmas tree LEDs via NFC
Smart toy/interactive robot data logger
Buttonless/contactless control panel
Contactless diagnostic
NFC e-locker
Smart manufacturing
NFC OTA
4. Ordering information
Table 1. Ordering information
Type number Package
Name Description Version
LPC8N04FHI24 HVQFN24 plastic thermal enhanced very thin quad flat package; no leads; SOT616-3
24 terminals; body 4 4 0.85 mm
5. Marking
aaa-014382
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
6. Block diagram
The internal block diagram of the LPC8N04 is shown in Figure 2. It consists of a Power
Management Unit (PMU), clocks, timers, a digital computation and control cluster (ARM
Cortex-M0+ and memories) and AHB-APB slave modules.
PADS
32 kHz FRO 8 MHz FRO POR
LDO (1.2 V)
EXTERNAL INTERNAL
POWER POWER
WAKE-UP CLOCK SWITCH SWITCHES
LDO (1.6 V)
TIMER SHOP
POWER 8 kB SRAM
PADS
DIGITAL
SWITCH 32 kB FLASH
MATRIX I2C-BUS SPI TIMERS WATCHDOG SYSCONFIG GPIO
4 kB EEPROM
MFIO
(DIGITAL) EEPROM FLASH
PMU ARM M0+
CONTROL CONTROL
IOCONFIG
AHB-APB BRIDGE
I2C-BUS TEMPERATURE
SENSOR
NFC/RFID
HIGH
DRIVE
aaa-015348
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
7. Pinning information
7.1 Pinning
24 (reserved)
23 (reserved)
22 (reserved)
21 (reserved)
terminal 1
20 LA
19 LB
index area
PIO0_0/WAKEUP 1 18 (reserved)
PIO0_1/CLKOUT 2 17 (reserved)
PIO0_2/SSEL 3 16 PIO0_11/CT32B_M1/SWDIO
PIO0_6/SCLK 4 15 PIO0_10/CT32B_M0/SWCLK
PIO0_8/MISO 5 25 VSS 14 PIO0_3/CT16B_M0
PIO0_9/MOSI 6 13 PIO0_7/CT16B_M1
(reserved) 10
PIO0_4/SCL 11
PIO0_5/SDA 12
7
8
9
VDDBAT
VSS
RESETN
aaa-015349
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
[1] The GPIO port is a 12-bit I/O port with individual direction and function controls for each bit. The operation
of port 0 pads depends on the function selected through the IOCONFIG register block.
[2] If external wake-up is enabled on this pad, it must be pulled HIGH before entering deep power-down mode
and pulled LOW for a minimum of 100 s to exit deep power-down mode.
[3] A LOW on this pad resets the device. This reset causes I/O ports and peripherals to take on their default
states, and processor execution to begin at address 0. It has weak pull-up to VDDBAT.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
8. Functional description
• System options
– Nested Vectored Interrupt Controller (NVIC)
– Fast (single-cycle) multiplier
– System tick timer
– Support for wake-up interrupt controller
– Vector table remapping register
– Reset of all registers
• Debug options
– Serial Wire Debug (SWD) with two watchpoint comparators and four breakpoint
comparators
– Halting debug is supported
The only AHB peripheral device on the LPC8N04 is the GPIO module. The APB
peripheral area is 512 kB in size. Each peripheral is allocated 16 kB of space.
All peripheral register addresses are 32-bit word aligned. Byte and half-word addressing is
not possible. All reading and writing are done per full word.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
0xFFFF FFFF
(reserved)
0xE020 0000
0xE01F FFFF 0x501F FFFF
8 kB SRAM (reserved)
0x4001 4000 32-bit timer
0x1000 0000
0x0FFF FFFF (reserved)
(reserved) 0x4000 C000 16-bit timer
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
The SFRO runs at 8 MHz. The system clock is derived from it and can be set to 8 MHz,
4 MHz, 2 MHz, 1 MHz, 500 kHz, 250 kHz, 125 kHz or 62.5 kHz (Note: some features are
not available when using the lower clock speeds). The TFRO runs at 32.768 kHz and is
the clock source for the timer unit. The TFRO cannot be disabled.
Following reset, the LPC8N04 starts operating at the default 500 kHz system clock
frequency to minimize dynamic current consumption during the boot cycle.
The SYSAHBCLKCTRL register gates the system clock to the various peripherals and
memories. The temperature sensor receives a fixed clock frequency, irrespective of the
system clock divider settings, while the digital part uses the system clock (AHB clock 0).
SYSCLKDIV[2:0]
SYSAHBCLKCTRL
SYSCLKTRIM
fixed-frequency taps analog peripheral clocks
SSPCLKDIV
WATCHDOG CLOCK
WDT_PCLK
DIVIDER
0
WDTCLKDIV
WDTSEL
PMU/always-on-domain
TIMER FRO
(32 kHz)
wake-up timer
0
TMRCLKTRIM
aaa-015352
TMRUEN
8.3.2 Reset
Reset has three sources on the LPC8N04: the RESETN pin, watchdog reset and a
software reset.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
The LPC8N04 has a small automatic source selector that monitors the power inputs
(VBAT and VNFC, see Figure 6) as well as pin RESETN. The PSWBAT switch is kept
open until a trigger is given on pin RESETN or via the NFC field. If the trigger is given, the
always-on domain, VDD_ALON, itself is powered via the PSWBAT or the PSWNFC
switch: via VBAT, if VBAT > 1.72 V, or VNFC. Priority is given to VBAT when both VBAT
and VNFC are present.
The automatic source selector unit in the PMU decides on the powering of the internal
domains based on the power source.
• If a voltage > 1.72 V is detected on VBAT and not VNFC, VBAT powers the internal
domains after a trigger on pin RESETN or via NFC.
• If a voltage 1.72 V is detected on VBAT, and a higher voltage is detected on VNFC,
the internal domains are powered from VNFC.
• If a voltage > 1.72 V is detected at both VBAT and VNFC, the internal domains are
powered from VBAT.
• Switch over between power sources is possible. If initially both VBAT and VNFC are
available, the system is powered from VBAT. If VBAT then becomes unavailable
(because it is switched off externally, or by a PSWBAT/PSWNFC power switch
override), the internal domains are immediately powered from VNFC. Switch over is
supported in both directions.
• The user can force the selection of the VBAT input by disabling the automatic power
switch, which disables the automatic source selector voltage comparator.
When on NFC power only (passive operation), connecting one or more 100 nF external
capacitors in parallel to a GPIO pad, and setting that pad as an output driven to logic 1, is
advised. Preferably a high-drive pin should be chosen and several pins can be connected
in parallel.
PSWNFC and PSWBAT are the power switches. PSWNFC connects power to the
VDD_ALON power net when an RF field is present. PSWBAT connects power from the
battery when a positive edge is detected on RESETN. If no RF power is available, the
PMU can open this PSWBAT switch, effectively switching off the device. After connecting
VDDBAT to a power source, the PSWBAT switch is open until a rising edge is detected on
RESETN or RF power is applied.
Each component of the LPC8N04 resides in one of several internal power domains, as
indicated in Figure 6. The domains are VBAT, VNFC, VDD_ALON, VDD1V2 and
VDD1V6. The domains VDD_ALON, VDD1V2 and VDD1V6 are powered, or not,
depending on the mode of the LPC8N04. There are five modes: active, sleep, deep sleep,
deep power-down and battery off.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
The VDD_ALON domain contains BrownOut Detection (BOD). When enabled, if the
VDD_ALON voltage drops below 1.8 V it raises a BOD interrupt.
The PMU controls the active, sleep, deep sleep and deep power-down modes, and thus
the power flow to the different internal components.
The PMU has two LDOs powering the internal VDD1V2 and VDD1V6 voltage domains.
LDO1V2 converts voltages in the range 1.72 V to 3.6 V into 1.22 V. LDO1V6 converts
voltages in the range 1.72 V to 3.6 V into 1.6 V. Each LDO can be enabled separately. A
1.2 nF buffer capacitor is included at the input of the LDOs when powered via VNFC.
The trigger detector (not shown in Figure 6) and power gate have a leakage of less than
50 nA to allow for long shelf life before activation.
LA
NFC core
PSWNFC
VNFC < 1.85 V 1.6 V
LB LDO1V6
PSWBAT
VBAT 1.72 V to 3.6 V
VDDBAT ANALOG
PERIPHERALS,
FLASH MEMORY
1.72 V to 3.6 V EEPROM MEMORY
AUTOMATIC SOURCE SELECTOR UNIT
VDD_ALON
ALWAYS-ON DOMAIN
75 kΩ
32 kHz FRO
RESETN
RTC
1.2 V
LDO1V2 DIGITAL CORE
PMU BOD PERIPHERALS
PIO0_0
GPREGx
WAKEUP
pin mode override if PCON.WAKEUP set, SFRO
when entering Deep power-down mode
aaa-019962
The PMU states and settings of the LDOs are summarized in Table 4, and the state
transitions are shown in Figure 7.
Table 5 and Table 6 summarize the events that can influence wake-up from deep
power-down or deep sleep modes (DEEPPDN or DEEPSLEEP to ACTIVE state
transition).
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
BATTERY-OFF
ACTIVE
SLEEP OR DEEP
DEEP-SLEEP POWER-DOWN
aaa-019373
The power-up sequence is shown in Figure 8. Applying battery power when the PSWBAT
switch is closed, or NFC power becomes available, provides the always-on part with a
Power-On Reset (POR) signal. The TFRO is initiated which starts a state machine in the
PMU. In the first state, the LDO1V2 powering the digital domain is started. In the second
state, the LDO1V6 powering the analog domain is started which starts the flash memory.
Enabling the LDO1V2, and the SFRO stabilizing, triggers the system_por. The system is
now considered to be ‘on’. The system can boot when the flash memory is fully
operational.
The total start-up time from trigger to active mode/boot is about 2.5 ms.
If there is no battery power, but there is RF power, the same procedure is followed except
that PSWNFC connects power to the LDOs.
Remark: When running without a battery, energy harvesting is limited to 2 MHz system
clock.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
VDD_ALON
off
POR always-on
domain
power
flash and
start TFRO enable 1.2 V LDO SFRO starts running digital
power
analog
enable 1.6 V LDO SFRO stable (64 μs)
for analog domain
and flash memory on
system_por
aaa-016479
8.4.1.1 Applying power to the PCB/system with battery for the first time
To support long shelf life without draining the battery, the LPC8N04 is not connected to an
external supply pin until RESET pin is asserted and de-asserted or the NFC field is
present. Once the RESET or the NFC field is applied, the LPC8N04 is powered.
The power to the different APB analog slaves is controlled through a power-down
configuration register.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
The power control register selects whether an ARM Cortex-M0+ controlled power-down
mode (sleep mode or deep sleep mode) or the deep power-down mode is entered. It also
provides the flags for sleep or deep-sleep modes and deep power-down mode
respectively. In addition, it contains the overrides for the power source selection.
8.5.1 Features
• NVIC that is a part of the ARM Cortex-M0+
• Tightly coupled interrupt controller provides low interrupt latency
• Controls system exceptions and peripheral interrupts
• Four programmable interrupt priority levels with hardware priority level masking
• Software interrupt generation
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
[1] Interrupt 0 to 10 correspond to PIO0_0 to PIO0_10; interrupt 11 corresponds to RFID/NFC external access;
interrupt 12 corresponds to the RTC on/off timer.
• Pin function
• Internal pull-up/pull-down resistor or bus keeper function
• Low-pass filter
• I2C-bus mode for pads hosting the I2C-bus function
The IOCON registers control the function (GPIO or peripheral function), the input mode,
and the hysteresis of all PIO0_m pins. In addition, the I2C-bus pins can be configured for
different I2C-bus modes.
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 GPIO0DIR registers determine whether
the pin is configured as an input or output. For any peripheral function, the pin direction is
controlled automatically depending on the functionality of the pin. The GPIO0DIR
registers have no effect on peripheral functions.
• Standard mode/fast mode I2C-bus with input glitch filter (including an open-drain
output according to the I2C-bus specification)
• Standard open-drain I/O functionality without input filter
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
CDRIVE
ESD
CURRENT
ILO[7:0] SINK
IHI[7:0]
pull-up enable
configured
as input repeater mode
enable
pull-up enable
data input
aaa-015353
• GPIO registers are on the ARM Cortex-M0+ I/O bus for fastest possible single-cycle
I/O timing
• An entire port value can be written in one instruction
• Mask, set, and clear operations are supported for the entire port
All GPIO port pins are fixed-pin functions that are enabled or disabled on the pins by the
switch matrix. Therefore each GPIO port pin is assigned to one specific pin and cannot be
moved to another pin.
8.7.1 Features
• Bit level port registers allow a single instruction to set and clear any number of bits in
one write operation
• Direction control of individual bits
• After reset, all I/Os default to GPIO inputs without pull-up or pull-down resistors. The
I2C-bus true open-drain pins PIO0_4 and PIO0_5 and the SWD pins PIO0_10 and
PIO0_11 are exceptions
• Pull-up/pull-down configuration, repeater, and open-drain modes can be programmed
through the IOCON block for each GPIO pin
• Direction (input/output) can be set and cleared individually
• Pin direction bits can be toggled
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
8.8.1 Features
Standard I2C-bus compliant interfaces may be configured as master, slave, or
master/slave.
1. Data transfer from a master transmitter to a slave receiver. The first byte transmitted
by the master is the slave address. Next follows a number of data bytes. The slave
returns an acknowledge bit after each received byte.
2. Data transfer from a slave transmitter to a master receiver. The master transmits the
first byte (the slave address). The slave then returns an acknowledge bit. The slave
then transmits the data bytes to the master. The master returns an acknowledge bit
after all received bytes other than the last byte. At the end of the last received byte, a
not-acknowledge is returned. The master device generates all of the serial clock
pulses and the START and STOP conditions. A transfer is ended with a STOP
condition or with a repeated START condition. As a repeated START condition is also
the beginning of the next serial transfer, the I2C-bus is not released.
The I2C-bus interface is byte oriented and has four operating modes: master transmitter
mode, master receiver mode, slave transmitter mode and slave receiver mode.
The I2C-bus interface is completely I2C-bus compliant, supporting the ability to power off
the LPC8N04 independent of other devices on the same I2C-bus.
The I2C-bus interface requires a minimum 2 MHz system clock to operate in normal
mode, and 8 MHz for fast mode.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
The I2C-bus pins must be configured through the PIO0_4 and PIO0_5 registers for
standard mode or fast mode. The I2C-bus pins are open-drain outputs and fully
compatible with the I2C-bus specification.
8.9.1 Features
• Compatible with Motorola SPI, 4-wire Texas Instruments Synchronous Serial Interface
(SSI), and National Semiconductor Microwire buses
• Synchronous serial communication
• Supports master or slave operation
• Eight-frame FIFOs for both transmit and receive
• 4-bit to 16-bit frame
Serial clock — SCK/CLK/SK is a clock signal used to synchronize the transfer of data.
The master drives the clock signal and the slave receives it. When SPI/SSP interface is
used, the clock is programmable to be active HIGH or active LOW, otherwise it is always
active HIGH. SCK only switches during a data transfer. At any other time, the SPI/SSP
interface either stays in its inactive state or is not driven (remains in high-impedance
state).
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
Frame sync/slave select — When the SPI/SSP interface is a bus master, it drives this
signal to an active state before the start of serial data. It then releases it to an inactive
state after the data has been sent. The active state can be HIGH or LOW depending upon
the selected bus and mode. When the SPI/SSP interface is a bus slave, this signal
qualifies the presence of data from the master according to the protocol in use.
When there is only one master and slave, the master signals, frame sync or slave select,
can be connected directly to the corresponding slave input. When there are multiple
slaves, further qualification of frame sync/slave select inputs is normally necessary to
prevent more than one slave from responding to a transfer.
Master Input Slave Output (MISO) — The MISO signal transfers serial data from the
slave to the master. When the SPI/SSP is a slave, it outputs serial data on this signal.
When the SPI/SSP is a master, it clocks in serial data from this signal. It does not drive
this signal and leaves it in a high-impedance state when the SPI/SSP is a slave and not
selected by FS/SSEL.
Master Output Slave Input (MOSI) — The MOSI signal transfers serial data from the
master to the slave. When the SPI/SSP is a master, it outputs serial data on this signal.
When the SPI/SSP is a slave, it clocks in serial data from this signal.
8.10.1 Features
• ISO/IEC14443A part 1 to part 3 compatible
• MIFARE (Ultralight) EV1 compatible
• NFC Forum Type 2 compatible
• Easy interfacing with standard user memory space READ/WRITE commands
• Passive operation possible
APB
LA EEPROM
RFID SUBSYSTEM
LB ANALOG
INTERFACE
EEPROM
INTERFACE SRAM
RFID
ANALOG
SUBSYSTEM RFID APB
CMDIN
MAIN INTERFACE
CONTROLLER DATAOUT
aaa-015354
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
The CMDIN, DATAOUT, Status Register (SR) and SRAM are mapped in the user
memory space of the RFID core. The RFID READ and WRITE commands allow wireless
communication to this shared memory.
Messages can be in raw mode (user proprietary protocol) or formatted according to NFC
forum type 2 NDEF messaging and ISO/IEC 11073.
8.11.1 Features
One 16-bit timer with a programmable 16-bit prescaler.
• Timer operation
• Four 16-bit match registers that allow:
– Continuous operation with optional interrupt generation on match
– Stop timer on match with optional interrupt generation
– Reset timer on match with optional interrupt generation
• Up to two CT16B external outputs corresponding to the match registers with the
following capabilities:
– Set LOW on match
– Set HIGH on match
– Toggle on match
– Do nothing on match
• Up to two match registers can be configured as Pulse Width Modulation (PWM)
allowing the use of up to two match outputs as single edge controlled PWM outputs
Each timer also includes one capture input to trap the timer value when an input signal
transitions, optionally generating an interrupt.
In PWM mode, four match registers can be used to provide a single-edge controlled PWM
output on the match output pins. The use of the match registers that are not pinned out to
control the PWM cycle length is recommended.
8.12.1 Features
One 32-bit timer with a programmable 32-bit prescaler.
• Timer operation
• Four 32-bit match registers that allow:
– Continuous operation with optional interrupt generation on match
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
Each timer also includes one capture input to trap the timer value when an input signal
transitions, optionally generating an interrupt.
In PWM mode, four match registers can be used to provide a single-edge controlled PWM
output on the match output pins. Use of the match registers that are not pinned out to
control the PWM cycle length is recommended.
When enabled, if the user program fails to feed (or reload) the WDT within a
predetermined amount of time, the WDT generates a system reset.
8.13.1 Features
• If not periodically reloaded, it internally resets the microcontroller
• Debug mode
• Enabled by software but requires a hardware reset or a WDT reset/interrupt to be
disabled
• If enabled, incorrect/incomplete feed sequence causes reset/interrupt
• Flag to indicate WDT reset
• Programmable 24-bit timer with internal prescaler
• Selectable time period from (TWDCLK 256 4) to (TWDCLK 224 4) in multiples
of TWDCLK 4
• The WDT clock (WDCLK) source is a 2 MHz clock derived from the SFRO, or the
external clock as set by the SYSCLKCTRL register
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
8.14.1 Features
• Simple 24-bit timer
• Uses dedicated exception vector
• Clocked internally by the system clock or the system clock divided by two
Refer to the Cortex-M0+ Devices - Generic User Guide (Ref. 2) for details.
8.15.1 Features
The Real-Time Clock (RTC) block two counters:
The countdown timer runs on a low speed clock and runs in an always-on power domain.
The delay, as well as a clock tuning prescaler, can be configured via the APB bus. The
RTC countdown timer generates both the deep power-down wake-up signal and the RTC
interrupt signal (wake-up interrupt 12). The deep power-down wake-up signal is always
generated, while the interrupt can be masked according to the settings in the RTCIMSC
register.
1. The RTC core module, implementing the RTC timers themselves. This module runs in
the always-on VDD_ALON domain.
2. The AMBA APB slave interface. This module allows configuration of the RTC core via
an APB bus. This module runs in the switched power domain.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
8.16.1 Features
The temperature sensor block measures the chip temperature, and outputs a raw value or
a calibrated value in Kelvin.
The flash is organized in 32 sectors of 1 kB. Each sector consists of 16 rows of 16 32-bit
words.
1. Vbe is the base-emitter voltage of a bipolar transistor. Basically, the temperature sensor measures the voltage drop over a diode
formed by the base-emitter junction of a bipolar transistor. It compares the Vbe at different current levels (from which follows the
Vbe).
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
Protection — At exit from reset, all sectors are protected against accidental modification.
To allow modification, a sector must be unprotected. It can then be protected again after
that the modification is performed.
Locking — Each flash sector has a lock bit. Lock bits can be set but cannot be cleared.
Locked sectors cannot be erased and reprogrammed.
Previous write operations have transferred the data to be programmed into the memory
page buffer. The page buffer tracks which words were written to (offset within the page
only). Words not written to, retain their previous content.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
9. Limiting values
Table 10. Limiting values
In accordance with the Absolute Maximum Rating System (IEC 60134).
Symbol Parameter Conditions Min Max Unit
VDD supply voltage 0.5 +3.6 V
VI input voltage normal PIO pads (VDD = 0.6 V) 0.5 +3.6 V
high-source PIO pads 0.5 +5.5 V
LA/LB pads 0.5 +5.5 V
IDD supply current per supply pin - 100 mA
ISS ground supply current per supply pin - 100 mA
Ilu latch-up current I/O; 0.5VDD < VI < +1.5VDD; - 100 mA
Tj < 125 C
Tstg storage temperature 40 +125 C
Tj junction temperature - 125 C
Ptot total power dissipation - 1 W
VESD electrostatic discharge voltage human body model; all pins 2000 +2000 V
charged device model; all pins 500 +500 V
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
aaa-022790
1000
(6)
IDD
(μA)
800
600
(5)
400
(4)
(3)
(2)
200 (1)
0
1.5 2 2.5 3 3.5 4
VDD (V)
Plot of IDD / VDD when ARM running a while-1 loop in normal mode, no NFC field present.
(1) System clock = 250 kHz
(2) System clock = 500 kHz
(3) System clock = 1 MHz
(4) System clock = 2 MHz
(5) System clock = 4 MHz
(6) System clock = 8 MHz
Fig 11. Active current consumption
Note: The absolute accuracy is valid for the factory calibration of the temperature sensor.
The sensor can be user-calibrated to reach higher accuracy.
[1] Tamb = 22 C, f = 13.56 MHz, RMS voltage between LA and LB = 1.5 V.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
11.2 I2C-bus
Table 16. I2C-bus dynamic characteristics
See UM10204 - I2C-bus specification and user manual (Ref. 3) for details.
Tamb = 40 C to +85 C[1]; see the timing diagram in Figure 12.
Symbol Parameter Conditions Min Typ Max Unit
fSCL SCL clock frequency standard mode 0 - 100 kHz
fast mode 0 - 400 kHz
tf fall time of both SDA and SCL standard mode [2][3][4] - - 300 ns
signals fast mode [2][3][4] 20 + 0.1 Cb - 300 ns
tLOW LOW period of the SCL clock standard mode 4.7 - - s
fast mode 1.3 - - s
tHIGH HIGH period of the SCL clock standard mode 4.0 - - s
fast mode 0.6 - - s
tHD;DAT data hold time standard mode [2][5][6] 0 - - s
fast mode [2][5][6] 0 - - s
tSU;DAT data set-up time standard mode [7][8] 250 - - ns
fast mode [7][8] 100 - - ns
[1] Parameters are valid over operating temperature range unless otherwise specified.
[2] A device must internally provide a hold time of at least 300 ns for the SDA signal (regarding the VIH(min) of the SCL signal). The hold time
is to bridge the undefined region of the falling edge of SCL.
[3] Cb = total capacitance of one bus line in pF.
[4] The maximum tf for the SDA and SCL bus lines is specified at 300 ns. The maximum fall time for the SDA output stage tf is specified at
250 ns. It allows series protection resistors to be connected between the SDA and the SCL pins and the SDA/SCL bus lines without
exceeding the maximum specified tf.
[5] tHD;DAT is the data hold time that is measured from the falling edge of SCL; applies to data in transmission and the acknowledge.
[6] The maximum tHD;DAT could be 3.45 s and 0.9 s for standard mode and fast mode. However, it must be less than the maximum of
tVD;DAT or tVD;ACK by a transition time (see Ref. 3). Only meet this maximum if the device does not stretch the LOW period (tLOW) of the
SCL signal. If the clock stretches the SCL, the data must be valid by the set-up time before it releases the clock.
[7] tSU;DAT is the data set-up time that is measured against the rising edge of SCL; applies to data in transmission and the acknowledge.
[8] A fast mode I2C-bus device can be used in a standard-mode I2C-bus system but it must meet the requirement tSU;DAT = 250 ns. This
requirement is automatically the case if the device does not stretch the LOW period of the SCL signal. If it does, it must output the next
data bit to the SDA line tr(max) + tSU;DAT = 1000 + 250 = 1250 ns before the SCL line is released. This procedure is in accordance with the
standard-mode I2C-bus specification. Also, the acknowledge timing must meet this set-up time.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
tf tSU;DAT
70 % 70 %
SDA
30 % 30 %
tHD;DAT tVD;DAT
tf
tHIGH
70 % 70 % 70 % 70 %
SCL 30 % 30 %
30 % 30 %
tLOW
S 1 / fSCL
002aaf425
S = START condition
Fig 12. I2C-bus pins clock timing
[1] tcy(clk) = (SSPCLKDIV (1 + SCR) CPSDVSR) / fmain. The clock cycle time derived from the SPI bit rate tcy(clk) is a function of:
a) the main clock frequency fmain
b) the SPI peripheral clock divider (SSPCLKDIV)
c) the SPI SCR parameter (specified in the SSP0CR0 register)
d) the SPI CPSDVSR parameter (specified in the SPI clock prescale register)
[2] Tamb = 40 C to +105C.
[3] tcy(clk) = 12 Tcy(PCLK).
[4] Tamb = 25 C for normal voltage supply: VDD = 3.3 V.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
tcy(clk)
SCK (CPOL = 0)
SCK (CPOL = 1)
tv(Q) th(Q)
tv(Q) th(Q)
aaa-024226
tcy(clk)
SCK (CPOL = 0)
SCK (CPOL = 1)
tSU;DAT tHD;DAT
tSU;DAT tHD;DAT
aaa-024227
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
HVQFN24: plastic thermal enhanced very thin quad flat package; no leads;
24 terminals; body 4 x 4 x 0.85 mm SOT616-3
D B A
terminal 1
index area
A
A1
E c
detail X
e1 C
1/2 e
y1 C y
e b v C A B
7 12 w C
L
13
6
e
Eh e2
1/2 e
1
18
terminal 1
index area
24 19
Dh X
0 2.5 5 mm
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
13. Abbreviations
Table 18. Abbreviations
Acronym Description
ADC Analog-to-Digital Converter
AHB Advanced High-performance Bus
AMBA Advanced Microcontroller Bus Architecture
APB Advanced Peripheral Bus
API Application Programming Interface
ARM Advanced RISC Machine
BOD BrownOut Detection
CGU Clock Generator Unit
EEPROM Electrically Erasable Programmable Read-Only Memory
GPIO General Purpose Input Output
I2C Inter-Integrated Circuit
LDO Low DropOut
MISO Master Input Slave Output
MOSI Master Output Slave Input
NDEF NFC Data Exchange Format
NFC Near Field Communication
NVIC Nested Vectored Interrupt Controller
PMU Power Management Unit
POR Power-On Reset
PWM Pulse Width Modulation
RFID Radio Frequency Identification
RISC Reduced Instruction Set Computer
RTC Real-Time Clock
SFRO System Free-Running Oscillator
SI Slave Input
SO Slave Output
SPI Serial Peripheral Interface
SR Status Register
SSI Synchronous Serial Interface
SSP Synchronous Serial Port
SWD Serial Wire Debug
TFRO Timer Free-Running Oscillator
WDT WatchDog Timer
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
14. References
[1] DDI0484C_cortex_m0p_r0p1_trm — Cortex-M0+ Devices - Technical Reference
Manual
[2] DUI0662B_cortex_m0p_r0p1_dgug — Cortex-M0+ Devices - Generic User Guide
[3] UM10204 — I2C-bus specification and user manual
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
[1] Please consult the most recently issued document before initiating or completing a design.
[2] The term ‘short data sheet’ is explained in section “Definitions”.
[3] The product status of device(s) described in this document may have changed since this document was published and may differ in case of multiple devices. The latest product status
information is available on the Internet at URL http://www.nxp.com.
16.2 Definitions Suitability for use — NXP Semiconductors products are not designed,
authorized or warranted to be suitable for use in life support, life-critical or
safety-critical systems or equipment, nor in applications where failure or
Draft — The document is a draft version only. The content is still under
malfunction of an NXP Semiconductors product can reasonably be expected
internal review and subject to formal approval, which may result in
to result in personal injury, death or severe property or environmental
modifications or additions. NXP Semiconductors does not give any
damage. NXP Semiconductors and its suppliers accept no liability for
representations or warranties as to the accuracy or completeness of
inclusion and/or use of NXP Semiconductors products in such equipment or
information included herein and shall have no liability for the consequences of
applications and therefore such inclusion and/or use is at the customer’s own
use of such information.
risk.
Short data sheet — A short data sheet is an extract from a full data sheet
Applications — Applications that are described herein for any of these
with the same product type number(s) and title. A short data sheet is intended
products are for illustrative purposes only. NXP Semiconductors makes no
for quick reference only and should not be relied upon to contain detailed and
representation or warranty that such applications will be suitable for the
full information. For detailed and full information see the relevant full data
specified use without further testing or modification.
sheet, which is available on request via the local NXP Semiconductors sales
office. In case of any inconsistency or conflict with the short data sheet, the Customers are responsible for the design and operation of their applications
full data sheet shall prevail. and products using NXP Semiconductors products, and NXP Semiconductors
accepts no liability for any assistance with applications or customer product
Product specification — The information and data provided in a Product design. It is customer’s sole responsibility to determine whether the NXP
data sheet shall define the specification of the product as agreed between Semiconductors product is suitable and fit for the customer’s applications and
NXP Semiconductors and its customer, unless NXP Semiconductors and products planned, as well as for the planned application and use of
customer have explicitly agreed otherwise in writing. In no event however, customer’s third party customer(s). Customers should provide appropriate
shall an agreement be valid in which the NXP Semiconductors product is design and operating safeguards to minimize the risks associated with their
deemed to offer functions and qualities beyond those described in the applications and products.
Product data sheet.
NXP Semiconductors does not accept any liability related to any default,
damage, costs or problem which is based on any weakness or default in the
16.3 Disclaimers customer’s applications or products, or the application or use by customer’s
third party customer(s). Customer is responsible for doing all necessary
testing for the customer’s applications and products using NXP
Limited warranty and liability — Information in this document is believed to
Semiconductors products in order to avoid a default of the applications and
be accurate and reliable. However, NXP Semiconductors does not give any
the products or of the application or use by customer’s third party
representations or warranties, expressed or implied, as to the accuracy or
customer(s). NXP does not accept any liability in this respect.
completeness of such information and shall have no liability for the
consequences of use of such information. NXP Semiconductors takes no Limiting values — Stress above one or more limiting values (as defined in
responsibility for the content in this document if provided by an information the Absolute Maximum Ratings System of IEC 60134) will cause permanent
source outside of NXP Semiconductors. damage to the device. Limiting values are stress ratings only and (proper)
operation of the device at these or any other conditions above those given in
In no event shall NXP Semiconductors be liable for any indirect, incidental,
the Recommended operating conditions section (if present) or the
punitive, special or consequential damages (including - without limitation - lost
Characteristics sections of this document is not warranted. Constant or
profits, lost savings, business interruption, costs related to the removal or
repeated exposure to limiting values will permanently and irreversibly affect
replacement of any products or rework charges) whether or not such
the quality and reliability of the device.
damages are based on tort (including negligence), warranty, breach of
contract or any other legal theory. Terms and conditions of commercial sale — NXP Semiconductors
Notwithstanding any damages that customer might incur for any reason products are sold subject to the general terms and conditions of commercial
whatsoever, NXP Semiconductors’ aggregate and cumulative liability towards sale, as published at http://www.nxp.com/profile/terms, unless otherwise
customer for the products described herein shall be limited in accordance agreed in a valid written individual agreement. In case an individual
with the Terms and conditions of commercial sale of NXP Semiconductors. agreement is concluded only the terms and conditions of the respective
agreement shall apply. NXP Semiconductors hereby expressly objects to
Right to make changes — NXP Semiconductors reserves the right to make applying the customer’s general terms and conditions with regard to the
changes to information published in this document, including without purchase of NXP Semiconductors products by customer.
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior No offer to sell or license — Nothing in this document may be interpreted or
to the publication hereof. construed as an offer to sell products that is open for acceptance or the grant,
conveyance or implication of any license under any copyrights, patents or
other industrial or intellectual property rights.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
18. Tables
Table 1. Ordering information . . . . . . . . . . . . . . . . . . . . .3
Table 2. Marking codes . . . . . . . . . . . . . . . . . . . . . . . . . .3
Table 3. Pad allocation table of the HVQFN24 package .5
Table 4. Pad description of the HVQFN24 package. . . . .6
Table 5. IC power states. . . . . . . . . . . . . . . . . . . . . . . . .12
Table 6. State transition events for DEEPSLEEP to
ACTIVE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Table 7. State transition events for DEEPPDN to ACTIVE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Table 8. Connection of interrupt source to the NVIC . . .14
Table 9. I2C-bus pin description . . . . . . . . . . . . . . . . . . .18
Table 10. SPI pin description . . . . . . . . . . . . . . . . . . . . . .18
Table 11. Limiting values . . . . . . . . . . . . . . . . . . . . . . . . .25
Table 12. Static characteristics . . . . . . . . . . . . . . . . . . . . .26
Table 13. Temperature sensor characteristics . . . . . . . . .27
Table 14. Antenna input characteristics . . . . . . . . . . . . . .27
Table 15. EEPROM characteristics . . . . . . . . . . . . . . . . .27
Table 16. I/O dynamic characteristics . . . . . . . . . . . . . . .28
Table 17. I2C-bus dynamic characteristics . . . . . . . . . . .28
Table 18. Dynamic characteristics of SPI pins in SPI mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Table 19. Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . .32
Table 20. Revision history . . . . . . . . . . . . . . . . . . . . . . . .33
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
19. Figures
Fig 1. LPC8N04 block diagram . . . . . . . . . . . . . . . . . . . .4
Fig 2. Pad configuration HVQFN24 . . . . . . . . . . . . . . . . .5
Fig 3. LPC8N04 memory map . . . . . . . . . . . . . . . . . . . . .8
Fig 4. LPC8N04 clock generator block diagram . . . . . . .9
Fig 5. LPC8N04 power architecture. . . . . . . . . . . . . . . . 11
Fig 6. PMU state transition diagram. . . . . . . . . . . . . . . .12
Fig 7. LPC8N04 power-up sequence. . . . . . . . . . . . . . .13
Fig 8. Pin configuration with current source mode. . . . .16
Fig 9. Block diagram of the RFID/NFC interface . . . . . .19
Fig 10. Active current consumption . . . . . . . . . . . . . . . . .27
Fig 11. I2C-bus pins clock timing . . . . . . . . . . . . . . . . . . .29
Fig 12. SPI master timing in SPI mode . . . . . . . . . . . . . .30
Fig 13. SPI slave timing in SPI mode . . . . . . . . . . . . . . .30
Fig 14. HVQFN24 package outline . . . . . . . . . . . . . . . . .31
LPC8N04 All information provided in this document is subject to legal disclaimers. © NXP Semiconductors N.V. 2018. All rights reserved.
20. Contents
1 General description . . . . . . . . . . . . . . . . . . . . . . 1 8.13 WatchDog Timer (WDT). . . . . . . . . . . . . . . . . 21
2 Features and benefits . . . . . . . . . . . . . . . . . . . . 2 8.13.1 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 8.13.2 General description . . . . . . . . . . . . . . . . . . . . 22
8.14 System tick timer . . . . . . . . . . . . . . . . . . . . . . 22
4 Ordering information . . . . . . . . . . . . . . . . . . . . . 3
8.14.1 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5 Marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 8.14.2 General description . . . . . . . . . . . . . . . . . . . . 22
6 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 4 8.15 Real-Time Clock (RTC) timer. . . . . . . . . . . . . 22
7 Pinning information . . . . . . . . . . . . . . . . . . . . . . 5 8.15.1 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.1 Pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 8.15.2 General description . . . . . . . . . . . . . . . . . . . . 22
7.1.1 HVQFN24 package. . . . . . . . . . . . . . . . . . . . . . 5 8.16 Temperature sensor . . . . . . . . . . . . . . . . . . . . 23
8 Functional description . . . . . . . . . . . . . . . . . . . 7 8.16.1 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
8.16.2 General description . . . . . . . . . . . . . . . . . . . . 23
8.1 ARM Cortex-M0+ core . . . . . . . . . . . . . . . . . . . 7
8.17 Serial Wire Debug (SWD) . . . . . . . . . . . . . . . 23
8.2 Memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . 7
8.18 On-chip flash memory . . . . . . . . . . . . . . . . . . 23
8.3 System configuration . . . . . . . . . . . . . . . . . . . . 8
8.18.1 Reading from flash. . . . . . . . . . . . . . . . . . . . . 23
8.3.1 Clock generation. . . . . . . . . . . . . . . . . . . . . . . . 8
8.18.2 Writing to flash . . . . . . . . . . . . . . . . . . . . . . . . 23
8.3.2 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.18.3 Erasing/programming flash . . . . . . . . . . . . . . 24
8.4 Power management . . . . . . . . . . . . . . . . . . . . 10
8.19 On-chip SRAM . . . . . . . . . . . . . . . . . . . . . . . . 24
8.4.1 System power architecture . . . . . . . . . . . . . . . 10
8.20 On-chip EEPROM . . . . . . . . . . . . . . . . . . . . . 24
8.4.1.1 Applying power to the PCB/system with battery for
8.20.1 Reading from EEPROM. . . . . . . . . . . . . . . . . 24
the first time . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8.20.2 Writing to EEPROM . . . . . . . . . . . . . . . . . . . . 24
8.4.2 Power Management Unit (PMU). . . . . . . . . . . 13
8.5 Nested Vectored Interrupt Controller (NVIC) . 14 9 Limiting values . . . . . . . . . . . . . . . . . . . . . . . . 25
8.5.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 10 Static characteristics . . . . . . . . . . . . . . . . . . . 26
8.5.2 Interrupt sources. . . . . . . . . . . . . . . . . . . . . . . 14 11 Dynamic characteristics. . . . . . . . . . . . . . . . . 28
8.6 I/O configuration . . . . . . . . . . . . . . . . . . . . . . . 15 11.1 I/O pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.6.1 PIO0 pin mode . . . . . . . . . . . . . . . . . . . . . . . . 15 11.2 I2C-bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.6.2 PIO0 I2C-bus mode . . . . . . . . . . . . . . . . . . . . 15 11.3 SPI interfaces. . . . . . . . . . . . . . . . . . . . . . . . . 29
8.6.3 PIO0 current source mode . . . . . . . . . . . . . . . 15 12 Package outline. . . . . . . . . . . . . . . . . . . . . . . . 31
8.7 Fast general-purpose parallel I/O . . . . . . . . . . 16
13 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.7.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.8 I2C-bus controller . . . . . . . . . . . . . . . . . . . . . . 17 14 References. . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.8.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 15 Revision history . . . . . . . . . . . . . . . . . . . . . . . 34
8.8.2 General description . . . . . . . . . . . . . . . . . . . . 17 16 Legal information . . . . . . . . . . . . . . . . . . . . . . 35
8.8.3 I2C-bus pin description . . . . . . . . . . . . . . . . . . 18 16.1 Data sheet status . . . . . . . . . . . . . . . . . . . . . . 35
8.9 SPI controller . . . . . . . . . . . . . . . . . . . . . . . . . 18 16.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.9.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 16.3 Disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.9.2 General description . . . . . . . . . . . . . . . . . . . . 18 16.4 Licenses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.9.3 Pin description . . . . . . . . . . . . . . . . . . . . . . . . 18 16.5 Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Pin detailed descriptions. . . . . . . . . . . . . . . . . .18 17 Contact information . . . . . . . . . . . . . . . . . . . . 36
8.10 RFID/NFC communication unit . . . . . . . . . . . . 19
18 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.10.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.10.2 General description . . . . . . . . . . . . . . . . . . . . 19 19 Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.11 16-bit timer . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 20 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.11.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8.11.2 General description . . . . . . . . . . . . . . . . . . . . 20
8.12 32-bit timer . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8.12.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8.12.2 General description . . . . . . . . . . . . . . . . . . . . 21
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in section ‘Legal information’.