Do you have a question about the LPC84x and is the answer not in the manual?
Questions and answers
Summary of Contents for NXP Semiconductors LPC84x
Page 1
UM11029 LPC84x User manual Rev. 1.0 — 16 June 2017 User manual Document information Info Content LPC84x, LPC84x UM, LPC84x user manual Keywords LPC84x User manual Abstract...
1.1 Introduction The LPC84x are an ARM Cortex-M0+ based, low-cost 32-bit MCU family operating at CPU frequencies of up to 30 MHz. The LPC84x support up to 64 KB of flash memory and 16 KB of SRAM. The peripheral complement of the LPC84x includes a CRC engine, four I...
Rev. 1.0 — 16 June 2017 User manual 2.1 How to read this chapter The memory mapping is identical for all LPC84x parts. Different LPC84x parts support different flash and SRAM memory sizes. 2.2 General description The LPC84x incorporates several distinct memory regions.
User manual 5.1 How to read this chapter All LPC84x devices include ROM-based services for programming and reading the flash memory in addition to other functions. In-System Programming works on an unprogrammed or previously programmed device using one from a selection of hardware interfaces.
Chapter 5: LPC84x ISP and IAP 5.3.3 Flash content protection mechanism The LPC84x is equipped with the Error Correction Code (ECC) capable Flash memory. The purpose of an error correction module is twofold. Firstly, it decodes data words read from the memory into output data words. Secondly, it encodes data words to be written to the memory.
5.3.6.2 ISP entry configuration and detection The LPC84x UART/I2C/SPI ISP mode allows programming and reprogramming of the internal FLASH via a set of commands on the UART, I2C slave, or SPI slave buses. Two bits of the FAIM flash are used for ISP mode selection.
If FAIM content is invalid, the default ISP selection is USART/I2C/SPI or auto detection mode. In auto detection mode, the LPC84x enables all three interfaces on the fixed GPIO port and pins, and selects the first one that has either a successful auto baud detection on USART or a valid probe message response on I2C or SPI.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.4 USART ISP communication protocol All USART ISP commands should be sent as single ASCII strings. Strings should be terminated with Carriage Return (CR) and/or Line Feed (LF) control characters. Extra <CR>...
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.5 USART ISP commands The following commands are accepted by the ISP command handler. Detailed status codes are supported for each command. The command handler sends the return code INVALID_COMMAND when an undefined command is received. Commands and return codes are in ASCII format.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP Table 16. ISP commands allowed for different CRP levels ISP command CRP1 CRP2 CRP3 (no entry in ISP mode allowed) Erase sector(s) yes; sector 0 can only be erased when all yes;...
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.5.3 Echo Table 19. USART ISP Echo command Command Input Setting: ON = 1 | OFF = 0 Return Code CMD_SUCCESS | PARAM_ERROR Description The default setting for echo command is ON. When ON the ISP command handler sends the received serial data back to the host.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.5.6 Prepare sectors for write operation This command makes flash write/erase operation a two-step process. Table 22. USART ISP Prepare sectors for write operation command Command Input Start Sector Number End Sector Number: Should be greater than or equal to start sector number.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP Table 23. USART ISP Copy command Command Input Flash Address(DST): Destination flash address where data bytes are to be written. The destination address should be a 64 byte boundary. RAM Address(SRC): Source RAM address from where data bytes are to be read.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.5.12 Read Part Identification number Table 28. USART ISP Read Part Identification command Command Input None. Return Code CMD_SUCCESS followed by part identification number (see Table 29). Description This command is used to read the part identification number.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.5.15 ReadUID Table 32. USART ReadUID command Command Input None Return Code CMD_SUCCESS followed by four 32-bit words of a unique serial number in ASCII format. The word sent at the lowest address is sent first.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP Table 34. USART ISP Read flash signature command Command Input Start address: Start of flash address. Default = 0. Must be 0 when CRP1 is enabled. End address: End of flash address.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP Table 36. ISP/IAP Error codes Return Error code Description Code ADDR_NOT_MAPPED Address is not mapped in the memory map. Count value is taken into consideration where applicable. CMD_LOCKED Command is locked.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.6 IAP commands For in application programming the IAP routine should be called with a word pointer in register r0 pointing to memory (RAM) containing command code and parameters. The result of the IAP command is returned in the result table pointed to by register r1. The user can reuse the command table for result by passing the same pointer in registers r0 and r1.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP The flash memory is not accessible during a write or erase operation. IAP commands, which results in a flash write/erase operation, use 32 bytes of space in the top portion of the on-chip RAM for execution.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.6.1 Prepare sector(s) for write operation This command makes flash write/erase operation a two step process. Table 38. IAP Prepare sector(s) for write operation command Command Prepare sector(s) for write operation...
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.6.6 Read Boot code version number Table 43. IAP Read Boot Code version number command Command Read boot code version number Input Command code: 55 (decimal) Parameters: None Status code CMD_SUCCESS Result Result0: 2 bytes of boot code version number.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.6.9 ReadUID Table 46. IAP ReadUID command Command Compare Input Command code: 58 (decimal) Status code CMD_SUCCESS Result Result0: The first 32-bit word (at the lowest address). Result1: The second 32-bit word.
Once the host interface sends the first probe command via I2C or SPI interface, and it is accepted by the LPC84x, then the interface is detected, the ISP pin switches to an output high as ISP_IRQ.
Typical host system and LPC84x transaction 5.7.3 I2C ISP mode transaction protocol The LPC84x will respond to a host system on I2C addresses 0x18, 0x1C, 0x30, and 0x38. The host system’s I2C master clock rate can be as high as 1MHz. The LPC84x may extend the I2C clock to delay the I2C master if it needs more time to perform an operation.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.7.5 I2C/SPI operations allowed for CRP systems If CRP is enabled (CRP1, CRP2, or CRP3) then the I2C/SPI commands may be limited in functionality. See Table 51 for limitations of I2C/SPI ISP commands when CRP is enabled.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.8 I2C/SPI ISP mode commands, data, and responses All of the supported commands, associated structures and data formats for those commands, and responses are explained in this section Table 52. I2C/SPI ISP command summary...
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP 5.8.2 SH_CMD_RESET (0xA2) command This command can be used to reset the LPC84x. This command has no response. Table 55. Command packet Field Offset Size (bytes) Value Description command 0xA2 'Reset' command identifier 5.8.3 SH_CMD_BOOT (0xA3) command...
‘Re-invoke ISP’ IAP command will be active for the optional probe command. The host system should repeatedly send the probe command to the LCP84x via one of the supported interfaces until the LPC84x asserts the ISP1_IRQ pin LOW. Table 60.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP Table 63. Command packet Field Offset Size (bytes) Value Description command 0xA6 ‘Write block’ command identifier crcCheck 0 – Do CRC check for this packet 1 - Ignore CRC field for this packet blockNum Flash block number in which the appended data to be programmed.
The write sub-block command is used for queuing data for a full flash block write. It is used when the host system cannot send the entire data block to the LPC84x in a single I2C transfer using the ‘Write block’ command. When using this command, multiple sub-blocks are sent to the LPC84x in sequential order for the block.
The read sub-block command is used for reading partial data from a full flash block write. It is used when the host system cannot receive the entire data block to the LPC84x in a single I2C transfer using the ‘Read block’ command.
UM11029 NXP Semiconductors Chapter 5: LPC84x ISP and IAP Table 87. Command packet Field Offset Size (bytes) Value Description command 0xAE ‘Bulk erase’ command identifier reserved startSec Starting sector number to erase endsec End sector number to erase Table 88.
Chapter 6: LPC84x Flash signature generator Rev. 1.0 — 16 June 2017 User manual 6.1 How to read this chapter The flash signature generator is identical on all LPC84x parts. 6.2 Features • Controls flash access time. Provides registers for flash signature generation.
(NVIC) Rev. 1.0 — 16 June 2017 User manual 7.1 How to read this chapter The NVIC is identical on all LPC84x parts. 7.2 Features Nested Vectored Interrupt Controller that is an integral part of the ARM Cortex-M0+. • Tightly coupled interrupt controller provides low interrupt latency.
UM11029 NXP Semiconductors Chapter 7: LPC84x Nested Vectored Interrupt Controller (NVIC) Table 108. Connection of interrupt sources to the NVIC Interrupt Name Description Flags number PININT0_IRQ Pin interrupt 0 or pattern PSTAT - pin interrupt status match engine slice 0...
UM11029 NXP Semiconductors Chapter 7: LPC84x Nested Vectored Interrupt Controller (NVIC) 7.4.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 7.4.2).
UM11029 NXP Semiconductors Chapter 7: LPC84x Nested Vectored Interrupt Controller (NVIC) 7.4.2 Interrupt clear enable register 0 The ICER0 register allows disabling the peripheral interrupts, or for reading the enabled state of those interrupts. Enable interrupts through the ISER0 registers (Section 7.4.1).
UM11029 NXP Semiconductors Chapter 7: LPC84x Nested Vectored Interrupt Controller (NVIC) Table 111. Interrupt clear enable register 0 (ICER0, address 0xE000 E180) …continued Symbol Description Reset value ICE_PININT5 or Interrupt disable for both pinint5 and ICE_DAC1 DAC1. ICE_PININT6 or Interrupt disable for both pinint6 and ICE_USART3 USART3.
Chapter 8: LPC84x System configuration (SYSCON) Rev. 1.0 — 16 June 2017 User manual 8.1 How to read this chapter The system configuration block is identical for all LPC84x parts. 8.2 Features • Clock control – Configure the system PLL.
PDRUNCFG register: Section 8.6.47 “Power configuration register” 2. Select the fro_oscout (30 MHz/24 MHz/18 MHz) using the set_fro_frequency API call: Chapter 9 “LPC84x FRO API ROM routine” Figure 9 “UM11029 clock generation (continued)”. 3. The FROOSCCTRL register can be used to select direct fro_oscout or divided fro_oscout for fro clock.
Section 8.6.22 “System clock control 1 register” 8.3.4 Set up the system oscillator using XTALIN and XTALOUT To use the system oscillator with the LPC84x, assign the XTALIN and XTALOUT pins, which connect to the external crystal, through the fixed-pin function in the switch matrix.
Both the BOD interrupt and the BOD reset, depending on the value of bit BODRSTENA in this register, can wake-up the chip from sleep, deep-sleep, and power-down modes. See the LPC84x data sheet for the BOD reset and interrupt levels. Table 163. BOD control register (BODCTRL, address 0x4004 8150) bit description...
UM11029 NXP Semiconductors Chapter 8: LPC84x System configuration (SYSCON) 8.7.3 System PLL functional description The LPC84x uses the system PLL to create the clocks for the core and peripherals. fro_osc_clk sys_osc_clk FCLKIN FCLKOUT FCCO CLKIN SYSPLLCLKSEL LOCK LOCK DETECT analog section MSEL <...
UM11029 Chapter 9: LPC84x FRO API ROM routine Rev. 1.0 — 16 June 2017 User manual 9.1 How to read this chapter The ROM-based set fro_oscout API call is available on all parts. 9.2 Features • Select desired on-chip fro_oscout (30 MHz/24 MHz/18 MHz) 9.3 General description...
UM11029 NXP Semiconductors Chapter 9: LPC84x FRO API ROM routine Ptr to IAP IAP calls 0x0F001FF1 Ptr to ROM Driver table 0x0F001FF8 ROM Driver Table +0x0 Reserved +0x4 Reserved +0x8 Device API 1 set_fro_frequency FRO API function table +0xC Reserved...
UM11029 NXP Semiconductors Chapter 9: LPC84x FRO API ROM routine 9.4 API description The FRO API provides a function to configure the fro_oscout. The FRO API can be called in the application code through a simple API call. An example is provided with the code bundle software package on nxp.com.
Chapter 10: LPC84x Switch matrix (SWM) Rev. 1.0 — 16 June 2017 User manual 10.1 How to read this chapter The switch matrix is identical for all LPC84x parts. 10.2 Features • Flexible assignment of digital peripheral functions to pins Enable/disable of analog functions •...
Table 178 or in the data sheet. 2. Use the LPC84x data sheet to decide which pin x on the LPC84x package to connect the pin function to. 3. Use the pin description table to find the default GPIO function PIO0_n or PIO1_(n-32) assigned to package pin x.
The switch matrix enables functions that can only be assigned to one pin. Examples are analog inputs, all GPIO pins, and the debug SWD pins. If you want to assign a GPIO pin to a pin on any LPC84x package, disable any special •...
Rev. 1.0 — 16 June 2017 User manual 11.1 How to read this chapter The IOCON block is identical for all LPC84x parts. Registers for pins that are not available on a specific package are reserved. Table 196. Pinout summary...
UM11029 Chapter 12: LPC84x General Purpose I/O (GPIO) Rev. 1.0 — 16 June 2017 User manual 12.1 How to read this chapter All GPIO registers refer to 32 pins on each port. Depending on the package type, not all pins are available, and the corresponding bits in the GPIO registers are reserved.
UM11029 NXP Semiconductors Chapter 12: LPC84x General Purpose I/O (GPIO) Table 255. GPIO port byte pin registers (B[0:53], addresses 0xA000 0000 (B0) to 0xA000 0035 (B53)) bit description Symbol Description Reset Access value PBYTE Read: state of the pin PIO0m_n, regardless of direction, masking, or alternate function, except that pins configured as analog I/O always read as 0.
UM11029 NXP Semiconductors Chapter 12: LPC84x General Purpose I/O (GPIO) 12.5.4 GPIO port mask registers These registers affect writing and reading the MPORT registers. Zeroes in these registers enable reading and writing; ones disable writing and result in zeros in corresponding positions when reading.
UM11029 NXP Semiconductors Chapter 12: LPC84x General Purpose I/O (GPIO) 12.5.7 GPIO port set registers Output bits can be set by writing ones to these registers, regardless of MASK registers. Reading from these register returns the port’s output bits, regardless of pin directions.
UM11029 NXP Semiconductors Chapter 12: LPC84x General Purpose I/O (GPIO) 12.5.10 GPIO port direction set registers Direction bits can be set by writing ones to these registers. Table 264. GPIO port direction set register (DIRSET[0:1], address 0xA000 2380 (DIRSET0) to...
UM11029 NXP Semiconductors Chapter 12: LPC84x General Purpose I/O (GPIO) The state of multiple pins in a port can be read as a byte, halfword, or word from a • PORT register. The state of a selected subset of the pins in a port can be read from a Masked Port •...
UM11029 NXP Semiconductors Chapter 12: LPC84x General Purpose I/O (GPIO) More efficiently, software can dedicate a semaphore to the MASK registers, and set/capture the semaphore controlling exclusive use of the MASK registers before setting the MASK registers, and release the semaphore after the last operation that uses the MPORT or MASK registers.
Chapter 13: LPC84x Pin interrupts/pattern match engine Rev. 1.0 — 16 June 2017 User manual 13.1 How to read this chapter The pin interrupt generator and the pattern match engine are available on all LPC84x parts. 13.2 Features • Pin interrupts –...
Follow these steps to configure pins as pin interrupts: 1. Determine the pins that serve as pin interrupts on the LPC84x package. See the data sheet for determining the GPIO port pin number associated with the package pin. 2. For each pin interrupt, program the GPIO port pin number into one of the eight PINTSEL registers in the SYSCON block.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine 13.5.1 Pin interrupts From all available GPIO pins, up to eight pins can be selected in the system control block to serve as external interrupt pins (see Table 167). The external interrupt pins are connected to eight individual interrupts in the NVIC and are created based on rising or falling edges or on the input level on the pin.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine to IN7 slice n - 1 from slice n -1 (tied HIGH for slice 0) to IN0 slice n - 1 SYSCON slice n endpoint configured? PMCFG bit n = 1...
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine The detect logic of each slice can detect the following events on the selected input: Edge with memory (sticky): A rising edge, a falling edge, or a rising or falling edge that •...
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine The pattern match logic continuously monitors the eight inputs and generates interrupts when any one or more minterms (product terms) of the specified boolean expression is matched. A separate interrupt request is generated for each individual minterm.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine The ORed result of all three minterms asserts the RXEV request to the CPU and the • GPIO_INT_BMAT output. That is, if any of the three minterms are true, the output is asserted.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine 13.6.2 Pin interrupt level or rising edge interrupt enable register For each of the 8 pin interrupts selected in the PINTSELn registers (see Section 8.6.42), one bit in the IENR register enables the interrupt depending on the pin interrupt mode configured in the ISEL register: •...
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 272. Pin interrupt level or rising edge interrupt clear register (CIENR, address 0xA000 400C) bit description Symbol Description Reset Access value CENRL Ones written to this address clear bits in the IENR, thus disabling the interrupts.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 274. Pin interrupt active level or falling edge interrupt set register (SIENF, address 0xA000 4014) bit description Symbol Description Reset Access value SETENAF Ones written to this address set bits in the IENF, thus enabling interrupts.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine 13.6.9 Pin interrupt falling edge register This register contains ones for pin interrupts selected in the PINTSELn registers (see Section 8.6.42) on which a falling edge has been detected. Writing ones to this register clears falling edge detection.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Remark: Set up the pattern-match configuration in the PMSRC and PMCFG registers before writing to this register to enable (or re-enable) the pattern-match functionality. This eliminates the possibility of spurious interrupts as the feature is being enabled.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 280. Pattern match bit-slice source register (PMSRC, address 0xA000 402C) bit description Symbol Value Description Reset value 10:8 SRC0 Selects the input source for bit slice 0 Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 0.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 280. Pattern match bit-slice source register (PMSRC, address 0xA000 402C) bit description Symbol Value Description Reset value 16:14 SRC2 Selects the input source for bit slice 2 Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 2.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 280. Pattern match bit-slice source register (PMSRC, address 0xA000 402C) bit description Symbol Value Description Reset value 22:20 SRC4 Selects the input source for bit slice 4 Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 4.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 280. Pattern match bit-slice source register (PMSRC, address 0xA000 402C) bit description Symbol Value Description Reset value 28:26 SRC6 Selects the input source for bit slice 6 Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 6.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Sticky: A rising edge, a falling edge, or a rising or falling edge that is detected at any • time after the edge-detection mechanism has been cleared. The input qualifies as detected (the detect logic output remains HIGH) until the pattern match engine detect logic is cleared again.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 281. Pattern match bit slice configuration register (PMCFG, address 0xA000 4030) bit description …continued Symbol Value Description Reset value PROD_EN Determines whether slice 5 is an endpoint. DPTS5 No effect. Slice 5 is not an endpoint.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 281. Pattern match bit slice configuration register (PMCFG, address 0xA000 4030) bit description …continued Symbol Value Description Reset value 13:11 CFG1 Specifies the match contribution condition for bit slice 1.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 281. Pattern match bit slice configuration register (PMCFG, address 0xA000 4030) bit description …continued Symbol Value Description Reset value 19:17 CFG3 Specifies the match contribution condition for bit slice 3.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 281. Pattern match bit slice configuration register (PMCFG, address 0xA000 4030) bit description …continued Symbol Value Description Reset value 25:23 CFG5 Specifies the match contribution condition for bit slice 5.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine Table 281. Pattern match bit slice configuration register (PMCFG, address 0xA000 4030) bit description …continued Symbol Value Description Reset value 31:29 CFG7 Specifies the match contribution condition for bit slice 7.
UM11029 NXP Semiconductors Chapter 13: LPC84x Pin interrupts/pattern match engine – Bit0: Setting this bit will select pattern matches to generate the pin interrupts in place of the normal pin interrupt mechanism. For this example, pin interrupt 0 will be asserted when a match is detected on the first product term (which, in this case, is just a high level on input 1).
UM11029 Chapter 14: LPC84x Input multiplexing and DMA trigger multiplexing (INPUT MUX, DMA TRIGMUX) Rev. 1.0 — 16 June 2017 User manual 14.1 How to read this chapter SCT input multiplexing and DMA input multiplexing is available for all parts.
UM11029 NXP Semiconductors Chapter 14: LPC84x Input multiplexing and DMA trigger multiplexing 14.6 Register description All input multiplexer registers reside on word address boundaries. Details of the registers appear in the description of each function. All address offsets not shown in Table 284 are reserved and should not be written to.
UM11029 NXP Semiconductors Chapter 14: LPC84x Input multiplexing and DMA trigger multiplexing Table 287. DMA input trigger Input mux registers 0 to 24 (DMA_ITRIG_INMUX[0:24], address 0x4002 C040 (DMA_ITRIG_INMUX0) to 0x4002 C0A0 (DMA_ITRIG_INMUX24)) bit description Symbol Value Description Reset value Trigger input number (decimal value) for DMA channel 0x0F n (n = 0 to 12).
Rev. 1.0 — 16 June 2017 User manual 15.1 How to read this chapter The LPC84x provides an on-chip API in the boot ROM to optimize power consumption in active and sleep modes. See Section 16.1. Read this chapter to configure the reduced power modes deep-sleep mode, power-down mode, and deep power-down mode.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management Table 288. System control register (SCR, address 0xE000 ED10) bit description Symbol Description Reset value Reserved. SLEEPONEXIT Indicates sleep-on-exit when returning from Handler mode to Thread mode: 0 = do not sleep when returning to Thread mode.
Chapter 15: LPC84x Reduced power modes and power management 15.5 General description Power on the LPC84x is controlled by the PMU, by the SYSCON block, and the ARM Cortex-M0+ core. The following reduced power modes are supported in order from highest to lowest power consumption: 1.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management For configuring the self-wake-up timer: Section 23.5 • • For a list of all wake-up sources: Table 289 “Wake-up sources for reduced power modes” Table 289. Wake-up sources for reduced power modes...
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management Table 291. Power control register (PCON, address 0x4002 0000) bit description …continued Symbol Value Description Reset value DPDFLAG Deep power-down flag Not deep power-down. Read: deep power-down mode not entered.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management Table 293. Deep power down control register (DPDCTRL, address 0x4002 0014) bit description …continued Symbol Value Description Reset value WAKEPAD_ WAKEUP pin disable. Setting this bit disables the wake-up pin, so it can be DISABLE used for other purposes.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management Remark: Do not set bit 1 and bit 7 if you intend to use a pin to wake up the part from deep power-down mode. You can only disable both wake-up pins if the self-wake-up timer is enabled and configured.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management 15.7 Functional description 15.7.1 Power management The part supports 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.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management 15.7.3.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...
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management 15.7.4.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 interrupt, the microcontroller returns to its original power configuration defined by the contents of the PDRUNCFG and the SYSAHBCLKDIV registers.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management – BOD interrupt using the deep-sleep interrupt wake-up register 1 (Table 169). The BOD interrupt must be enabled in the NVIC. The BOD interrupt must be selected in the BODCTRL register.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management 15.7.6.2 Programming power-down mode The following steps must be performed to enter power-down mode: 1. The PM bits in the PCON register must be set to 0x2 (Table 291).
6. Use the ARM WFI instruction. 15.7.7.3 Wake-up from deep power-down mode using the WAKEUP pin or RESET Pulling the WAKEUP pin or RESET pin LOW wakes up the LPC84x from deep power-down, and the part goes through the entire reset process.
UM11029 NXP Semiconductors Chapter 15: LPC84x Reduced power modes and power management 1. Enable the low-power oscillator to run in deep power-down mode by setting bits 2 and 3 in the DPDCTRL register to 1 (see Table 293) 2. Ensure that bit 3 in the PCON register (Table 291) is cleared.
USART output. Any of the USARTs on the LPC84x device can use either FRG0 or FRG1. See Table 151 “Fractional generator 0 divider value register (FRG0DIV, address 0x4004 80D0) bit description”...
Chapter 20: LPC84x Standard counter/timer (CTIMER) Rev. 1.0 — 16 June 2017 User manual 20.1 How to read this chapter The standard timer is available on all LPC84x devices. 20.2 Features • 32-bit counter/timer with a programmable 32-bit prescaler. The timer includes external capture and match pin connections.
Chapter 21: LPC84x SCTimer/PWM Rev. 1.0 — 16 June 2017 User manual 21.1 How to read this chapter The SCTimer/PWM is available on all LPC84x devices. Remark: For a detailed description of SCTimer/PWM applications and code examples, Ref. 5 “AN11538”.
Chapter 22: LPC84x Windowed Watchdog Timer (WWDT) Rev. 1.0 — 16 June 2017 User manual 22.1 How to read this chapter The watchdog timer is identical on all LPC84x parts. 22.2 Features • Internally resets chip if not reloaded during the programmable time-out period.
UM11029 NXP Semiconductors Chapter 22: LPC84x Windowed Watchdog Timer (WWDT) When the Watchdog Timer is configured so that a watchdog event will cause a reset and the counter reaches zero, the CPU will be reset, loading the stack pointer and program counter from the vector table as for an external reset.
UM11029 NXP Semiconductors Chapter 22: LPC84x Windowed Watchdog Timer (WWDT) The synchronization logic between the two clock domains works as follows: When the MOD and TC registers are updated by APB operations, the new value will take effect in 3 WDCLK cycles on the logic in the WDCLK clock domain.
UM11029 NXP Semiconductors Chapter 22: LPC84x Windowed Watchdog Timer (WWDT) 22.6 Register description The Watchdog Timer contains the registers shown in Table 415. The reset value reflects the data stored in used bits only. It does not include the content of reserved bits.
UM11029 NXP Semiconductors Chapter 22: LPC84x Windowed Watchdog Timer (WWDT) Table 416. Watchdog mode register (MOD, 0x4000 0000) bit description Symbol Value Description Reset value WDINT Warning interrupt flag. Set when the timer reaches the value in WDWARNINT. Cleared by writing 1.
UM11029 NXP Semiconductors Chapter 22: LPC84x Windowed Watchdog Timer (WWDT) Table 417. Watchdog operating modes selection WDEN WDRESET Mode of Operation X (0 or 1) Debug/Operate without the Watchdog running. Watchdog interrupt mode: the watchdog warning interrupt will be generated but watchdog reset will not.
UM11029 NXP Semiconductors Chapter 22: LPC84x Windowed Watchdog Timer (WWDT) Table 419. Watchdog Feed register (FEED, 0x4000 0008) bit description Symbol Description Reset Value FEED Feed value should be 0xAA followed by 0x55. 31:8 Reserved, user software should not write ones to reserved bits.
Chapter 23: LPC84x Self-wake-up timer (WKT) Rev. 1.0 — 16 June 2017 User manual 23.1 How to read this chapter The self-wake-up timer is available on all LPC84x parts. 23.2 Features • 32-bit, loadable down counter. Counter starts automatically when a count value is loaded.
Chapter 24: LPC84x Multi-Rate Timer (MRT) Rev. 1.0 — 16 June 2017 User manual 24.1 How to read this chapter The MRT is available on all LPC84x parts. 24.2 Features • 31-bit interrupt timer Four channels independently counting down from individually set values •...
Chapter 25: LPC84x System tick timer (SysTick) Rev. 1.0 — 16 June 2017 User manual 25.1 How to read this chapter The SysTick timer is available on all LPC84x parts. 25.2 Features • Simple 24-bit timer. Uses dedicated exception vector.
UM11029 NXP Semiconductors Chapter 25: LPC84x System tick timer (SysTick) The SysTick timer is an integral part of the Cortex-M0+. The SysTick timer is intended to generate a fixed 10 millisecond interrupt for use by an operating system or other system management software.
UM11029 NXP Semiconductors Chapter 25: LPC84x System tick timer (SysTick) Table 434. SysTick Timer Control and status register (SYST_CSR, 0xE000 E010) bit description Symbol Description Reset value ENABLE System Tick counter enable. When 1, the counter is enabled. When 0, the counter is disabled.
UM11029 NXP Semiconductors Chapter 25: LPC84x System tick timer (SysTick) 25.6.4 System Timer Calibration value register The value of the SYST_CALIB register is driven by the value of the SYSTCKCAL register in the system configuration block SYSCON (see Table 164).
UM11029 Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Rev. 1.0 — 16 June 2017 User manual 26.1 How to read this chapter The ADC is available on all parts. The number of available ADC channels depends on the package type.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Calibration is required after every power-up or wake-up from Deep power-down • mode. See Section 26.3.4 “Hardware self-calibration”. For a sampling rate higher than 1 Msamples/s, VDDA must be higher than 2.7 V. See •...
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) 26.3.2 Perform a sequence of conversions triggered by an external pin The ADC can perform conversions on a sequence of selected channels. Each individual conversion of the sequence (single-step) or the entire sequence can be triggered by hardware.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) The VREFP and VREFN pins provide a positive and negative reference voltage input. The result of the conversion is (4095 x input voltage VIN)/(VREFP - VREFN). The result of an input voltage below VREFN is 0, and the result of an input voltage above VREFP is 4095 (0xFFF).
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) 26.6 Register description The reset value reflects the data stored in used bits only. It does not include reserved bits content. Table 442. Register overview : ADC (base address 0x4001 C000 )
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 443. A/D Control Register (CTRL, addresses 0x4001 C000) bit description Symbol Value Description Reset value CLKDIV The system clock is divided by this value plus one to produce the sampling clock.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 444. A/D Conversion Sequence A Control Register (SEQA_CTRL, address 0x4001 C008) bit description Symbol Value Description Reset value 11:0 CHANNELS Selects which one or more of the twelve channels will be sampled and 0x00 converted when this sequence is launched.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 444. A/D Conversion Sequence A Control Register (SEQA_CTRL, address 0x4001 C008) bit description Symbol Value Description Reset value BURST Writing a 1 to this bit will cause this conversion sequence to be continuously cycled through.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 444. A/D Conversion Sequence A Control Register (SEQA_CTRL, address 0x4001 C008) bit description Symbol Value Description Reset value SEQA_ENA Sequence Enable. In order to avoid spuriously triggering the sequence, care should be taken to only set the SEQA_ENA bit when the selected trigger input is in its INACTIVE state (as defined by the TRIGPOL bit).
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 445. A/D Conversion Sequence A Control Register (SEQA_CTRL, address 0x4001 C008) bit description Symbol Value Description Reset value TRIGPOL Select the polarity of the selected input trigger for this conversion sequence.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 445. A/D Conversion Sequence A Control Register (SEQA_CTRL, address 0x4001 C008) bit description Symbol Value Description Reset value SINGLESTEP When this bit is set, a hardware trigger or a write to the START bit...
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) 26.6.4 A/D Global Data Register A and B The A/D Global Data Registers contain the result of the most recent A/D conversion completed under each conversion sequence. Results of A/D conversions can be read in one of two ways. One is to use these A/D Global Data Registers to read data from the ADC at the end of each A/D conversion.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 446. A/D Sequence A Global Data Register (SEQA_GDAT, address 0x4001 C010) bit description Symbol Description Reset value 29:26 These bits contain the channel from which the RESULT bits were converted (e.g.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 447. A/D Sequence B Global Data Register (SEQB_GDAT, address 0x4001 C014) bit description Symbol Description Reset value 19:18 THCMPCROSS Indicates whether the result of the last conversion performed represented a...
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) The information presented in the DAT registers always pertains to the most recent conversion completed on that channel regardless of what sequence requested the conversion or which trigger caused it.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 448. A/D Data Registers (DAT[0:11], address 0x4001 C020 (DAT0) to 0x4001 C04C (DAT11)) bit description Symbol Description Reset value 29:26 CHANNEL This field is hard-coded to contain the channel number that this particular register relates to (i.e.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 449. A/D Compare Low Threshold register 0 (THR0_LOW, address 0x4001 C050) bit description Symbol Description Reset value Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 452. Compare High Threshold register 1 (THR1_HIGH, address 0x4001 C05C) bit description Symbol Description Reset value Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 453. A/D Channel Threshold Select register (CHAN_THRSEL, addresses 0x4001 C060) bit description Symbol Value Description Reset value CH6_THRSEL Threshold select by channel. Threshold 0. Channel 6 results will be compared against the threshold levels indicated in the THR0_LOW and THR0_HIGH registers Threshold 1.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Disabled: Threshold comparisons on channel n will not generate an A/D • threshold-compare interrupt request. Outside threshold: A conversion result on channel n which is outside the range • specified by the designated HIGH and LOW threshold registers will set the channel n THCMP flag in the FLAGS register and generate an A/D threshold-compare interrupt request.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 455. A/D Flags register (FLAGS, address 0x4001 C068) bit description Symbol Description Reset value THCMP5 Threshold comparison event on Channel 5. Set to 1 upon either an out-of-range result or a threshold-crossing result if enabled to do so in the INTEN register.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) Table 455. A/D Flags register (FLAGS, address 0x4001 C068) bit description Symbol Description Reset value SEQB_INT Sequence A interrupt/DMA flag. If the MODE bit in the SEQB_CTRL register is 0, this flag will mirror the DATAVALID bit in the sequence A global data register (SEQB_GDAT), which is set at the end of every A/D conversion performed as part of sequence B.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) hardware triggers. Each sequence can be triggered by a different hardware trigger. One of these conversion sequences is referred to as the A sequence and the other as the B sequence.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) state (as designated by the TRIGPOL bit). If this condition is not met, a trigger will be generated immediately upon enabling the sequence - even though no actual transition has occurred on the trigger input.
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) 26.7.4.2 Threshold-Compare Out-of-Range Interrupt Every conversion performed on any channel is automatically compared against a designated set of low and high threshold levels specified in the THRn_HIGH and THRn_LOW registers. The results of this comparison on any individual channel(s) can be...
UM11029 NXP Semiconductors Chapter 26: LPC84x 12-bit Analog-to-Digital Converter (ADC) 26.7.7 Hardware Trigger Source Selection Each ADC has a selection of several on-chip and off-chip hardware trigger sources. The trigger to be used for each conversion sequence is specified in the TRIGGER fields in the two SEQn_CTRL registers.
Rev. 1.0 — 16 June 2017 User manual 28.1 How to read this chapter The analog comparator is available on all LPC84x parts. 28.2 Features • Selectable external inputs can be used as either the positive or negative input of the comparator.
Section 10.3.1 “Connect an internal signal to a package pin” to assign the analog comparator output to any pin on the LPC84x package. Table 462. Analog comparator pin description Function Type Pin...
Chapter 29: LPC84x CRC engine Rev. 1.0 — 16 June 2017 User manual 29.1 How to read this chapter The CRC engine is available on all LPC84x parts. 29.2 Features • Supports three common polynomials CRC-CCITT, CRC-16, and CRC-32. – CRC-CCITT: x –...
UM11029 Chapter 30: LPC84x ROM API integer divide routines Rev. 1.0 — 16 June 2017 User manual 30.1 How to read this chapter The ROM-based 32-bit integer division routines are available on all parts. 30.2 Features • Performance-optimized signed/unsigned integer division.
UM11029 NXP Semiconductors Chapter 30: LPC84x ROM API integer divide routines 30.4 API description The integer division routines perform arithmetic integer division operations and can be called in the application code through simple API calls. Table 471. Divide API calls...
UM11029 NXP Semiconductors Chapter 30: LPC84x ROM API integer divide routines Table 472. sidiv Routine sidiv Input parameter numerator: Numerator signed integer. denominator: Denominator signed integer. Return Signed division result without remainder. Description Signed integer division 30.4.2 DIV unsigned integer division Table 473.
UM11029 NXP Semiconductors Chapter 30: LPC84x ROM API integer divide routines 30.5 Functional description 30.5.1 Signed division The example C-code listing below shows how to perform a signed integer division via the ROM API. /* Divide (-99) by (+6) */ int32_t result;...
Chapter 31: LPC84x Serial Wire Debug (SWD) Rev. 1.0 — 16 June 2017 User manual 31.1 How to read this chapter The debug functionality is identical for all LPC84x parts. 31.2 Features • Supports ARM Serial Wire Debug mode. Direct debug access to all memories, registers, and peripherals.
UM11029 NXP Semiconductors Chapter 31: LPC84x Serial Wire Debug (SWD) The boundary scan mode and the pins needed are selected by hardware (see Section 31.5.3). There is no access to the boundary scan pins through the switch matrix. Remark: If SWD is disabled in the FAIM configuration, these pins will be configured as GPIO pins on POR.
UM11029 NXP Semiconductors Chapter 31: LPC84x Serial Wire Debug (SWD) 31.5.4 Micro Trace Buffer (MTB) The MTB registers are located at memory address 0x5000 C000 and are described in Ref. 4. The EXTTRACE register in the SYSCON block (see Section 8.6.34) starts and...
NXP Semiconductors. applications and products. In no event shall NXP Semiconductors be liable for any indirect, incidental, NXP Semiconductors does not accept any liability related to any default, punitive, special or consequential damages (including - without limitation - lost...
UM11029 NXP Semiconductors Chapter 32: Supplementary information Chapter 15: LPC84x Reduced power modes and power management 15.7.4.2 Programming sleep mode ....254 15.1 How to read this chapter ....245 15.7.4.3...
UM11029 NXP Semiconductors Chapter 32: Supplementary information Chapter 25: LPC84x System tick timer (SysTick) 25.6.1 System Timer Control and status register . . 435 25.1 How to read this chapter ....434 25.6.2...
Page 515
29.6.1 CRC mode register ....482 Chapter 30: LPC84x ROM API integer divide routines 30.4.3 DIV signed integer division with remainder . 487 30.1...
Need help?
Do you have a question about the LPC84x and is the answer not in the manual?
Questions and answers