Summary of Contents for NXP Semiconductors LPC29 Series
Page 1
UM10316 LPC29xx User manual Rev. 3 — 19 October 2010 User manual Document information Info Content Keywords LPC2917/01; LPC2919/01; LPC2926; LPC2927; LPC2929; LPC2921; LPC2923; LPC2925; LPC2930; LPC2939 User Manual, ARM9, CAN, LIN, Abstract This document extends the LPC29xx data sheets with additional details to support both hardware and software development.
Page 2
UM10316 NXP Semiconductors LPC29xx User manual Revision history Date Description 20101019 • Modifications: Editorial updates to CGU, PMU, VIC, USB OTG, and Flash/EEPROM chapters. • Table 103 “LPC2930 boot configuration” added. • Part LPC2926 added. • Editorial updates. • Description of USBCmdCode register updated.
UM10316 Chapter 1: LPC29xx Introductory information Rev. 3 — 19 October 2010 User manual 1. Introduction The LPC29xx combine an 125 MHz ARM968E-S CPU core, Full Speed USB 2.0 OTG and device, CAN and LIN, up to 56 kB SRAM, up to 768 kB flash memory, external memory interface, two or three 10-bit ADCs, and multiple serial and parallel interfaces in a single chip targeted at consumer, industrial, medical, and communication.
Page 4
UM10316 NXP Semiconductors Chapter 1: LPC29xx Introductory information – Three full-duplex Q-SPIs with four slave-select lines; 16 bits wide; 8 locations deep; Tx FIFO and Rx FIFO. – Two I C-bus interfaces. • Other peripherals: – Up to three ADCs: Two 10-bit ADCs, 8-channels each, with 3.3 V measurement range and one, 8-channel 10-bit ADC with 5.0 V measurement range provide a...
UM10316 NXP Semiconductors Chapter 1: LPC29xx Introductory information – CPU operating voltage: 1.8 V ± 5 %. – I/O operating voltage: 2.7 V to 3.6 V; inputs tolerant up to 5.5 V. • Available in 100-pin,144-pin, and 208-pin LQFP packages.
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx 4.1 Ordering options Table 2. LPC29xx part overview Part Flash SRAM LIN/ Pins UART I2C-bus Clkout number...
UM10316 NXP Semiconductors Chapter 1: LPC29xx Introductory information 6. Functional blocks This chapter gives an overview of the functional blocks, clock domains, and power modes. Table 1–2 for availability of peripherals and blocks for specific LPC29xx parts. The functional blocks are explained in detail in the following chapters. Several blocks are gathered into subsystems and one or more of these blocks and/or subsystems are put into a clock domain.
UM10316 NXP Semiconductors Chapter 1: LPC29xx Introductory information Amongst the most compelling features of the ARM968E-S are: • Separate directly connected instruction and data Tightly Coupled Memory (TCM) interfaces • Write buffers for the AHB and TCM buses Enhanced 16 × 32 multiplier capable of single-cycle MAC operations and 16-bit fixed- •...
UM10316 Chapter 2: LPC29xx memory mapping Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The memory configuration varies for the different LPC29xx parts (see Table 2–6). In addition to the memory blocks, peripheral register blocks in memory region 7 are available only if the peripheral is implemented.
UM10316 NXP Semiconductors Chapter 2: LPC29xx memory mapping 3. Memory-map regions The ARM9 processor has a 4 GB of address space. The LPC29xx has divided this memory space into eight regions of 512 MB each. Each region is used for a dedicated purpose.
Page 18
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx LPC29xx 4 GB 0xFFFF FFFF 0xE00A 0000 PCR/VIC control 0xFFFF 8000 0xFFFF FFFF reserved 0xE008 B000 reserved 0xFFFF F000...
UM10316 NXP Semiconductors Chapter 2: LPC29xx memory mapping 3.1 Region 0: TCM/shadow area The ARM968E-S processor has its exception vectors located at address logic 0. Since flash is the only non-volatile memory available in the LPC29xx, the exception vectors in the flash must be located at address logic 0 at reset (AHB_RST).
UM10316 NXP Semiconductors Chapter 2: LPC29xx memory mapping After reset, the region 1 embedded flash area is always available at the shadow area. After booting, any other region of the AHB system memory map (e.g. internal SRAM) can be re-mapped to region 0 by means of the shadow memory mapping register. For more...
UM10316 NXP Semiconductors Chapter 2: LPC29xx memory mapping Region 4 is reserved for internal SRAM. The LPC29xx has two internal SRAM instances. Instance #0 is 32 kB, instance #1 is 16 kB. See Section 7–1. 3.6 Regions 5 and 6 Regions 5 and 6 are not used.
Page 22
UM10316 NXP Semiconductors Chapter 2: LPC29xx memory mapping Note that the ARM stores the pre-fetch abort flag along with the associated instruction (which will be meaningless) in the pipeline and processes the abort only if an attempt is made to execute the instruction fetched from the illegal address. This prevents the accidental aborts that could be caused by pre-fetches occurring when code is executed very near to a memory boundary.
UM10316 Chapter 3: LPC29xx Clock Generation Unit (CGU) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter This chapter describes the base clock generation for all LPC29xx parts. CGU0 is identical for all parts. CGU1 is configuration dependent. Table 11.
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) OSC1M FDIV0..6 XO50M PLL160M clkout / clkout120 / clkout240 Output Control Clock outputs Fig 11. Structure of the clock generation scheme 3.1 Controlling the XO50M oscillator (external oscillator) The XO50M oscillator can be disabled using the ENABLE field in the oscillator control register.
Page 29
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) PSEL P23EN clkout120 / clkout240 Input clock / 2PDIV clkout Bypass Direct / MDIV MSEL Fig 12. PL160M PLL control mechanisms The PLL reference input clock is provided by the external oscillator (XO50M). The PLLs accept an input clock frequency in the range of 10 MHz to 25 MHz only.
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) 3.3 Controlling the frequency dividers The seven frequency dividers are controlled by the FDIV0..6 registers. The frequency divider divides the incoming clock by (L/D), where L and D are both 12-bit values, and attempts to produce a 50% duty-cycle.
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) 3.7 Clock detection All of the clock sources have a clock detector, the status of which can be read in a CGU register. This register indicates which sources have been detected.
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) Remark: The clock selection in this register depends on whether the register is used for CGU0 or CGU1. In the CGU0, the low-power oscillator (LP_OSC) or the external crystal oscillator can be selected as input. In the CGU1, the two CGU0 base clocks BASE_ICLK0_CLK and BASE_ICLK1_CLK, can be selected instead.
Page 37
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) Table 17. RDET register bit description (RDET, address 0xFFFF 8018 (CGU0) or 0xFFFF B018 (CGU1)) * = reset value Symbol Access Value Description 31 to 12 reserved Reserved FDIV6_PRESENT Activity-detection register for FDIV 6 (CGU0...
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) The feedback-divider division ratio is controlled by MSEL[4:0] in the PLL_CONTROL register. The division ratio between the PLL output clock and the input clock is the decimal value on MSEL[4:0] plus one.
Page 41
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) Table 21. PLL_CONTROL register bit description (PLL_CONTROL, address 0xFFFF 8028 (CGU0) and 0xFFFF B028 (CGU1)) …continued * = reset value Symbol Access Value Description 23 to 16 MSEL[4:0] Feedback-divider division ratio (M)
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) 5.7 Frequency divider status register There is one status register FDIV_STATUS_n for each frequency divider (n = 0..6 for CGU0). Note that there is only one frequency divider in the CGU1. The status bits reflect the inputs to the FDIV as driven from the control register Table 22.
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) 5.14 Output-clock configuration register for CGU1 clocks There is one configuration register for each CGU1 output clock generated. All output generators have the same register bits. The CGU1 output clock can be generated directly from the two CGU0 base clocks BASE_ICLK0_CLK and BASE_ICLK1_CLK or from the CGU1 PLL.
UM10316 NXP Semiconductors Chapter 3: LPC29xx Clock Generation Unit (CGU) Table 30. BUS_DISABLE register bit description (BUS_DISABLE, address 0xFFFF 8FF4 (CGU0) and 0xFFFF BFF4 (CGU1)) * = reset value Symbol Access Value Description 31 to 1 reserved Reserved; do not modify. Read as logic 0, write...
UM10316 Chapter 4: LPC29xx Reset Generation Unit (RGU) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. The USB reset is not available on the LPC2917/19/01 parts. 2.
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 36. RESET_CONTROL1 register bit description (RESET_CONTROL1, 0xFFFF 9104) …continued Symbol Access Value Description 27 to 25 reserved Reserved; do not modify. Write as logic 0 Activate USB_RST DMA_RST_CTRL Activate DMA_RST...
Page 53
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 37. RESET_STATUS0 register bit description (RESET_STATUS0, address 0xFFFF 9110) * = reset value Symbol Access Value Description 31 to 10 reserved Reserved; do not modify. Read as logic 0,...
Page 54
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 39. RESET_STATUS2 register bit description (RESET_STATUS2, address 0xFFFF 9118) * = reset value Symbol Access Value Description 31 and 30 IVNSS_CAN_RST_STAT Reset IVNSS CAN status No reset activated since RGU last...
Page 55
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 39. RESET_STATUS2 register bit description (RESET_STATUS2, address 0xFFFF 9118) …continued * = reset value Symbol Access Value Description 19 and 18 PESS_A2V_RST_STAT Reset PeSS AHB2APB status No reset activated since RGU last...
Page 56
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 39. RESET_STATUS2 register bit description (RESET_STATUS2, address 0xFFFF 9118) …continued * = reset value Symbol Access Value Description 1 and 0 SCU_RST_STAT Reset SCU status No reset activated since RGU last...
Page 57
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 40. RESET_STATUS3 register bit description (RESET_STATUS3, address 0xFFFF 911C) …continued * = reset value Symbol Access Value Description 13 and 12 MSCSS_QEI_STAT Reset MSCSS QEI status No reset activated since RGU last...
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 40. RESET_STATUS3 register bit description (RESET_STATUS3, address 0xFFFF 911C) …continued * = reset value Symbol Access Value Description 1 and 0 IVNSS_LIN_RST_STAT Reset IVNSS LIN status No reset activated since RGU last...
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 42. RST_ACTIVE_STATUS1 register bit description (RST_ACTIVE_STATUS1, address 0xFFFF 9154) …continued * = reset value Symbol Access Value Description SPI_RST_STAT Current state of SPI_RST TMR_RST_STAT Current state of TMR_RST UART_RST_STAT...
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) Table 44. PCR_RST_SRC register bit description (PCR_RST_SRC, address 0xFFFF 9408) * = reset value Symbol Access Value Description 31 to 4 reserved Reserved; do not modify. Read as logic 0...
UM10316 NXP Semiconductors Chapter 4: LPC29xx Reset Generation Unit (RGU) 4.5 RGU bus-disable register The BUS_DISABLE register prevents any register in the CGU from being written to. Table 48. BUS_DISABLE register bit description (BUS_DISABLE, address 0xFFFF 9FF4) * = reset value...
UM10316 Chapter 5: LPC29xx Power Management Unit (PMU) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The implementation of some branch clocks for power control depends on the peripheral and memory configuration of each LPC29xx part, see Table 5–49.
Page 63
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) Table 50. Branch clock overview …continued Legend: ‘1’ Indicates that the related register bit is tied off to logic HIGH, all writes are ignored ‘0’ Indicates that the related register bit is tied off to logic LOW, all writes are ignored ‘+’...
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) Table 50. Branch clock overview …continued Legend: ‘1’ Indicates that the related register bit is tied off to logic HIGH, all writes are ignored ‘0’ Indicates that the related register bit is tied off to logic LOW, all writes are ignored ‘+’...
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) Clocks that have been programmed to enter sleep mode follow the chosen setting of the PD field in register PM. This means that with a single write-action all of these domains can be set either to sleep or to wake up.
Page 66
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) Table 51. Register overview: PMU (base address: 0xFFFF A000) …continued Name Access Address Reset value Description Reference offset CLK_CFG_SMC 0x230 0x0000 0001 AHB clock to Static Memory Controller Table 5–54...
Page 67
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) Table 51. Register overview: PMU (base address: 0xFFFF A000) …continued Name Access Address Reset value Description Reference offset CLK_STAT_GPIO5 0x28C 0x0000 0001 APB clock to General-Purpose I/O 5 Table 5–55...
Page 68
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) Table 51. Register overview: PMU (base address: 0xFFFF A000) …continued Name Access Address Reset value Description Reference offset CLK_STAT_MSCSS_APB 0x504 0x0000 0001 APB clock to MSCSS module-status Table 5–55 register...
Page 69
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) Table 51. Register overview: PMU (base address: 0xFFFF A000) …continued Name Access Address Reset value Description Reference offset CLK_CFG_UART0 0x700 0x0000 0001 IP clock to UART-0 configuration Table 5–54 register...
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) 4.3 PMU clock configuration register for output branches Each generated output clock from the PMU has a configuration register. Table 54. CLK_CFG_XXX register bit description (CLK_CFG_SAFE to CLK_CFG_USB_CLK, addresses 0xFFFF A100 to 0xFFFF AD00)
Page 72
UM10316 NXP Semiconductors Chapter 5: LPC29xx Power Management Unit (PMU) Table 55. CLK_STAT_XXX register bit description (CLK_STAT_SAFE to CLK_STAT_USB_CLK, addresses 0xFFFF A104 to 0xFFFF AD04) * = reset value Symbol Access Value Description 31 to 10 reserved Reserved; do not modify. Read as logic 0...
UM10316 Chapter 6: LPC29xx System Control Unit (SCU) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. See Table 6–56 for available GPIO pins for the port selection registers and for registers that are part specific. Table 56.
UM10316 NXP Semiconductors Chapter 6: LPC29xx System Control Unit (SCU) Table 61. SFSP5_18 function select register bit description (SFSP_5_18, address 0xE000 1548) * = reset value Symbol Access Value Description 31:5 reserved VBUS USB mode port 1 in host or device...
UM10316 NXP Semiconductors Chapter 6: LPC29xx System Control Unit (SCU) SFSPx_y PAD_TYPE RESERVED FUNC_SEL Function 0 Function 1 Function 2 Function 3 Fig 15. Schematic representation of an I/O pin 3.2 JTAG security registers Table 62. Security disable register bit description (SEC_DIS, address 0xE000 1B00)
UM10316 NXP Semiconductors Chapter 6: LPC29xx System Control Unit (SCU) The SSMM0 register defines the memory mapping seen by the ARM CPU master, the SSMM1 and SSMM2 register defines the memory mapping for the DMA0 and DMA1 masters, and the SSMM3 register for the USB master.
UM10316 Chapter 7: LPC29xx Chip Feature ID (CFID) Rev. 3 — 19 October 2010 User manual 1. Introduction The CFID module contains registers that show the functionality of the chip. It contains an ID to identify the silicon and four registers containing information about the features enabled or disabled for each part in the LPC29xx series.
Page 82
UM10316 NXP Semiconductors Chapter 7: LPC29xx Chip Feature ID (CFID) Table 68. FEAT3 register bit description (FEAT3, address 0xE000 010C) Symbol Access Value Description JTAGSEC The setting of this bit is determined by the setting of the JTAG security in the flash index sector (see Section 28–2.6.3).
UM10316 Chapter 8: LPC29xx event router Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. Not all event sources are connected to pins. Table 8–69 shows the event router connections for each LPC29xx part.
UM10316 NXP Semiconductors Chapter 8: LPC29xx event router Input events are processed in event slices; one for each event signal. Each of these slices generates one event signal and is visible in the RSR (Raw Status Register). These events are then AND-ed with enables from the MASK register to give PEND (PENDing register) event status.
UM10316 NXP Semiconductors Chapter 8: LPC29xx event router Table 70. Event-router pin connections …continued Symbol Direction Bit position Description Default polarity UART1 RXD UART1 receive data input USB_I2C_SCL IN USB I C serial clock CAN interrupt (internal) VIC FIQ (internal)
UM10316 NXP Semiconductors Chapter 8: LPC29xx event router Table 72. PEND register bit description (address 0xE000 2C00) * = reset value Symbol Access Value Description PEND[0] An event has occurred on a corresponding pin or logic 1 is written to bit 0 in the INT_SET...
UM10316 NXP Semiconductors Chapter 8: LPC29xx event router Table 75. MASK register bit description (address 0xE000 2C60) * = reset value Symbol Access Value Description 31 to 27 reserved Reserved; do not modify. Read as logic 0 MASK[26] Event enable...
UM10316 NXP Semiconductors Chapter 8: LPC29xx event router 3.7 Activation polarity register The APR is used to configure which level is the active state for the event source. Table 8–78 shows the bit assignment of the APR register. Table 78.
Page 89
UM10316 NXP Semiconductors Chapter 8: LPC29xx event router Table 80. RSR register bit description (address 0xE000 2D20) Symbol Access Value Description 31 to 27 reserved Reserved; do not modify. Read as logic 0 RSR[26] Corresponding event has occurred Corresponding event has not occurred...
UM10316 Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. See Table 9–81 for interrupt requests that are configuration dependent. All other interrupt requests are available in all LPC29xx parts (see Table 9–88).
Page 91
UM10316 NXP Semiconductors Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) • The IRQ exception has a lower priority than FIQ and is masked out when an FIQ exception occurs. IRQ service routines should take care of saving and/or restoring the used registers themselves.
UM10316 NXP Semiconductors Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) If the level-sensitive interrupt request line of the VIC is enabled (depending on the polarity setting), the request is forwarded to the interrupt selection. The interrupt selection part selects the interrupt request line with the highest priority, based on the target and priority of the interrupt request and priority masks.
UM10316 NXP Semiconductors Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) Table 83. INT_PRIORITYMASK_n registers bit description (INT_PRIORITYMASK_0/1, addresses 0xFFFF F000 and 0xFFFF F004) Symbol Access Reset Description value 31 to 4 reserved Reserved; do not modify. Read as logic 3 to 0 PRIORITY_LIMITER[3:0] Priority limiter.
UM10316 NXP Semiconductors Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) The INT_PENDING_1_31 register is read-only. Table 9–85 shows the bit assignment of the INT_PENDING_1_31 register. Table 85. INT_PENDING_1_31 register bit description (INT_PENDING_1_31, address 0xFFFF F200) Symbol Access Value Description PENDING[31]...
UM10316 NXP Semiconductors Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) Table 87. INT_FEATURES register bit description (INT_FEATURES, address 0xFFFF F300) * = reset value Symbol Access Value Description 0Fh* 7 to 0 Number of interrupt requests 3Fh* 4.6 Interrupt request register...
Page 100
UM10316 NXP Semiconductors Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) Table 88. Interrupt source and request reference …continued Interrupt Interrupt source Description request I2C1 C interrupt from I C1 (SI state change) GPDMA GPDMA DMA err GPDMA DMA tc all CAN controllers...
Page 101
UM10316 NXP Semiconductors Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) Table 89. INT_REQUESTn register bit description (INT_REQUEST1 to 56, addresses 0xFFFF F404 to 0xFFFF F4E0). * = reset value Symbol Access Value Description PENDING Pending interrupt request. This reflects the state of the interrupt source channel.
Page 102
UM10316 NXP Semiconductors Chapter 9: LPC29xx Vectored Interrupt Controller (VIC) Table 89. INT_REQUESTn register bit description (INT_REQUEST1 to 56, addresses 0xFFFF F404 to 0xFFFF F4E0). * = reset value Symbol Access Value Description ACTIVE_LOW Active-LOW interrupt line. This selects the polarity of the interrupt request line.
UM10316 Chapter 10: LPC29xx general system control Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. Introduction This chapter contains power control, interrupt, and wake-up features that pertain to various functions and peripherals on the LPC29xx.
UM10316 NXP Semiconductors Chapter 10: LPC29xx general system control Setting the power mode and configuring the clock domains is handled by the CGU, see Section 3–3. Configuration of wake-up events is handled by the Event Router, see Section 8–2. 4. Reset and power-up behavior The LPC29xx contains external reset input and internal power-up reset circuits.
UM10316 NXP Semiconductors Chapter 10: LPC29xx general system control UART Interrupt Requests Fig 22. Interrupt (UART) causing an IRQ Event Router Events Interrupt Requests Fig 23. Event causing an IRQ 6. Interrupt device architecture In the LPC29xx a general approach is taken to generate interrupt requests towards the CPU.
UM10316 NXP Semiconductors Chapter 10: LPC29xx general system control Interrupt Request >1 & STATUS ENABLE >1 Event CLEAR CLEAR STATUS STATUS ENABLE ENABLE Control Interface Fig 24. Interrupt device architecture A set of software-accessible variables is provided for each interrupt source to control and observe interrupt request generation.
UM10316 NXP Semiconductors Chapter 10: LPC29xx general system control 6.1.1 Interrupt clear-enable register Write ‘1’ actions to this register set one or more ENABLE variables in the INT_ENABLE register. INT_SET_ENABLE is write-only. Writing a 0 has no effect. Table 91.
UM10316 NXP Semiconductors Chapter 10: LPC29xx general system control Table 95. INT_CLR_STATUS register bit description Variable Name Access Value Description CLR_STATUS[i] Clears STATUS[i] variable in INT_STATUS register (set to 0) 6.1.6 Interrupt set-status register Write ‘1’ actions to this register set one or more STATUS variables in the INT_STATUS register.
UM10316 NXP Semiconductors Chapter 10: LPC29xx general system control – Initialization of the interrupt functionality (outside the scope of this driver) – Installation of the event-dispatcher interrupt function – Initialization of the ESR driver • Installation of the ESR: – Configure the signal specifications for external interrupts With this API the edge/level sensitivity can be programmed –...
UM10316 Chapter 11: LPC29xx pin configuration Rev. 3 — 19 October 2010 User manual 1. How to read this chapter Table 11–97 for pin configurations of all LPC29xx parts. Table 97. Feature overview Part Pins Pin configuration Pin assignment LPC2917/19/01 Figure 11–27 Table 11–98 LPC2921/23/25...
Page 112
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 98. LPC2917/19/01 LQFP144 pin assignment …continued Pin name Description Default function Function 1 Function 2 Function 3 P0[26]/TXD1/ GPIO 0, pin 26 UART1 TXD SPI2 SDI SDI2 P0[27]/RXD1/ GPIO 0, pin 27...
Page 113
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 98. LPC2917/19/01 LQFP144 pin assignment …continued Pin name Description Default function Function 1 Function 2 Function 3 P2[27]/CAP0[3]/ GPIO 2, pin 27 TIMER0 CAP3 TIMER0 MAT3 EXTINT7 MAT0[3]/EI7 P1[27]/CAP1[2]/ GPIO 1, pin 27...
Page 114
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 98. LPC2917/19/01 LQFP144 pin assignment …continued Pin name Description Default function Function 1 Function 2 Function 3 P1[14]/CAP2[0]/ GPIO 1, pin 14 TIMER2 CAP0 SPI0 SCS3 EXTBUS D0 SCS0[3]/D0 P1[13]/SCL1/ GPIO 1, pin 13...
Page 115
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 98. LPC2917/19/01 LQFP144 pin assignment …continued Pin name Description Default function Function 1 Function 2 Function 3 1.8 V supply for oscillator DD(OSC) ground for PLL SS(PLL) [1][4] P2[7]/MAT1[3]/ GPIO 2, pin 7...
Page 116
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 98. LPC2917/19/01 LQFP144 pin assignment …continued Pin name Description Default function Function 1 Function 2 Function 3 P2[13]/ GPIO 2, pin 13 PWM0 MAT5 SPI0 SDO PMAT0[5]/ SDO0 P0[4]/PMAT0[2]/ GPIO 0, pin 4...
Page 117
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 98. LPC2917/19/01 LQFP144 pin assignment …continued Pin name Description Default function Function 1 Function 2 Function 3 P0[17]/IN2[1]/ GPIO 0, pin 17 ADC2 IN1 UART0 RXD EXTBUS A23 RXD0/A23 1.8 V power supply for digital core...
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration 3. LPC2921/23/25 pin configuration LPC2921FBD100 LPC2923FBD100 LPC2925FBD100 002aae242 Fig 28. Pin configuration for SOT407-1 (LQFP100) The LPC2921/23/25 uses three ports: port 1 with 32 pins, port 1 with 28 pins, and port 5 with 2 pins.
Page 119
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 99. LPC2921/23/25 LQFP100 pin assignment …continued Pin name Description Function 0 (default) Function 1 Function 2 Function 3 P1[27]/CAP1[2]/ GPIO 1, pin 27 TIMER1 CAP2, PWM TRAP2 PWM3 MAT3 TRAP2/PMAT3[3] ADC2 EXT START...
Page 120
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 99. LPC2921/23/25 LQFP100 pin assignment …continued Pin name Description Function 0 (default) Function 1 Function 2 Function 3 P1[8]/SCS1[0]/ GPIO 1, pin 8 SPI1 SCS0 TXDL1/CS0 P1[7]/SCS1[3]/RXD1 GPIO 1, pin 7...
Page 121
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 99. LPC2921/23/25 LQFP100 pin assignment …continued Pin name Description Function 0 (default) Function 1 Function 2 Function 3 VREFN LOW reference for ADC P0[8]/IN1[0] GPIO 0, pin 8 ADC1 IN0 P0[9]/IN1[1]...
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration 5. LPC2930/30 pin configuration LPC2939FBD208 002aae253 Fig 30. Pin configuration for LQFP208 package The LPC2930/29 uses five ports: port 0 and port 1 with 32 pins, ports 2 with 28 pins each, port 3 with 16 pins, port 4 with 24 pins, and port 5 with 20 pins.
Page 130
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 101. LPC2930/39 LQFP208 pin assignment …continued Pin name Description Function 0 Function 1 Function 2 Function 3 (default) P0[31]/CAP0[3]/ GPIO 0, pin 31 TIMER0 CAP3 TIMER0 MAT3 MAT0[3] P2[24]/SCS1[1]/ GPIO 2, pin 24...
Page 131
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 101. LPC2930/39 LQFP208 pin assignment …continued Pin name Description Function 0 Function 1 Function 2 Function 3 (default) P1[26]/PMAT2[0]/ GPIO 1, pin 26 PWM2 MAT0 PWM TRAP3 PWM3 MAT2 TRAP3/PMAT3[2] P4[20]/...
Page 132
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 101. LPC2930/39 LQFP208 pin assignment …continued Pin name Description Function 0 Function 1 Function 2 Function 3 (default) P3[10]/SDI2/ GPIO 3, pin 10 SPI2 SDI PWM1 MAT4 USB_PWRD1 PMAT1[4]/ USB_PWRD1 ground for core SS(CORE) 1.8 V power supply for digital core...
Page 133
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 101. LPC2930/39 LQFP208 pin assignment …continued Pin name Description Function 0 Function 1 Function 2 Function 3 (default) ground for I/O SS(IO) P1[8]/SCS1[0]/ GPIO 1, pin 8 SPI1 SCS0 LIN1 TXD/ UART TXD EXTBUS CS0...
Page 134
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 101. LPC2930/39 LQFP208 pin assignment …continued Pin name Description Function 0 Function 1 Function 2 Function 3 (default) P2[11]/USB_RST1/ GPIO 2, pin 11 USB_RST1 PWM0 MAT3 SPI0 SCK PMAT0[3]/SCK0 P0[0]/PHB0/ GPIO 0, pin 0...
Page 135
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 101. LPC2930/39 LQFP208 pin assignment …continued Pin name Description Function 0 Function 1 Function 2 Function 3 (default) 3.3 V power supply for I/O DD(IO) P0[6]/IN0[2]/ GPIO 0, pin 6 ADC0 IN2...
Page 136
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 101. LPC2930/39 LQFP208 pin assignment …continued Pin name Description Function 0 Function 1 Function 2 Function 3 (default) P5[11]/D23/DCD0 GPIO 5, pin 11 EXTBUS D23 UART0 DCD P0[15]/IN1[7]/ GPIO 0, pin 15...
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration Table 101. LPC2930/39 LQFP208 pin assignment …continued Pin name Description Function 0 Function 1 Function 2 Function 3 (default) ground for I/O SS(IO) P0[23]/IN2[7]/ GPIO 0, pin 23 ADC2 IN7 PWM2 MAT5...
Page 138
UM10316 NXP Semiconductors Chapter 11: LPC29xx pin configuration For booting from external memory, connect the pins as shown in Table 11–103 to the external memory device. Table 103. LPC2930 boot configuration LPC2930 connections External memory connections Port Function 8-bit 16-bit...
UM10316 Chapter 12: LPC29xx external Static Memory Controller (SMC) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to parts LPC2917/19/01, LPC2926/27/29, LPC2930, and LPC2939. The LPC2921/23/25 do not have an external static memory controller. The flashless LPC2930 uses the external SMC for booting (see Section 11–6).
UM10316 NXP Semiconductors Chapter 12: LPC29xx external Static Memory Controller (SMC) 3. External memory interface The external memory interface depends on the bank width: 32, 16 or 8 bits selected via MW bits in the corresponding SMBCR register. Choice of memory chips requires an adequate set-up of the RBLE bit in the same register.
Page 144
UM10316 NXP Semiconductors Chapter 12: LPC29xx external Static Memory Controller (SMC) CS0 .. CS n OE_N BLS0 D[7:0] IO[7:0] A[x:0] A[x:0] 8-bit bank using 8-bit device Fig 37. External memory interface: 8-bit banks with 8-bit devices Memory is available in various speeds, so the numbers of wait-states for both read and write access must be set up.
Page 145
UM10316 NXP Semiconductors Chapter 12: LPC29xx external Static Memory Controller (SMC) CLK(SYS) WE/BLS WST2 WSTWEN 002aae705 WSTWEN=3, WST2=7 (1) BLS has the same timing as WE in configurations that use the byte lane enable signals to connect to write enable (8 bit devices).
UM10316 NXP Semiconductors Chapter 12: LPC29xx external Static Memory Controller (SMC) CLK(SYS) WST1 WST2 WSTWEN IDCY WSTOEN 002aae706 WSTOEN=2, WSTWEN=4, WST1=6, WST2=4, IDCY=5 Fig 40. Reading/writing external memory Address pins on the device are shared with other functions. When connecting external memories, check that the I/O pin is programmed to the correct function.
UM10316 NXP Semiconductors Chapter 12: LPC29xx external Static Memory Controller (SMC) Sequential-access burst-reads from burst-flash devices of the same type as for burst ROM are supported. Due to sharing of the SMBWST2R register between write and burst- read transfers it is only possible to have one setting at a time for burst flash; either write delay or the burst-read delay.
Page 152
UM10316 NXP Semiconductors Chapter 12: LPC29xx external Static Memory Controller (SMC) A data transfer can be initiated to the external memory greater than the width of the external-memory data bus. In this case the external transfer is automatically split up into several separate transfers.
UM10316 NXP Semiconductors Chapter 12: LPC29xx external Static Memory Controller (SMC) 4.7 Bank status register The bank status register reflects the status flags of each memory bank. Table 12–112 shows the bit assignment of the SMBSR0 to SMBSR7 registers. Table 112. SMBSRn register bit description (SMBSR0 toSMBSR7, addresses 0x6000 0018,...
UM10316 Chapter 13: LPC29xx USB device Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The USB device controller is used in parts LPC2921/23/25, LPC2926/27/29, LPC2930, and LPC2939. The LPC2917/19/01 do not have an USB controller (see also Table 1–4).
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 113. USB related acronyms, abbreviations, and definitions used in this chapter Acronym/abbreviation Description Random Access Memory Start-Of-Frame Serial Interface Engine SRAM Synchronous RAM UDCA USB Device Communication Area Universal Serial Bus 3.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 5.1 Analog transceiver The USB Device Controller has a built-in analog transceiver (ATX). The USB ATX sends/receives the bi-directional D+ and D- signals of the USB bus. 5.2 Serial Interface Engine (SIE) The SIE implements the full USB protocol layer.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 5.8 GoodLink Good USB connection indication is provided through GoodLink technology. When the device is successfully enumerated and configured, the LED indicator will be permanently ON. During suspend, the LED will be OFF.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 8. Clocking and power management This section describes the clocking and power management features of the USB Device Controller. 8.1 Power requirements The USB protocol insists on power management by the device. This becomes very critical if the device draws power from the bus (bus-powered device).
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Note that the AHB slave clock is always enabled as long as the PCUSB bit of PCONP is set. When the device controller is not in use, all of the device controller clocks may be disabled by clearing PCUSB.
Page 161
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 117. Register overview: USB device register map (base address 0xE010 0000) Name Access Address Description Reset value USBEpIntPri 0x240 USB Endpoint Priority 0x0000 0000 Endpoint realization registers USBReEp 0x244 USB Realize Endpoint...
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 9.1 Clock control registers 9.1.1 USB Clock Control register (USBClkCtrl - 0xE010 0FF4) This register controls the clocking of the USB Device Controller. Whenever software wants to access the device controller registers, both DEV_CLK_EN and AHB_CLK_EN must be set.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 119. USB Clock Status register (USBClkSt - address 0xE010 0FF8) 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.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 121. USB Device Interrupt Status register (USBDevIntSt - address 0xE010 0200) bit description Symbol Description Reset value EP_SLOW Slow endpoints interrupt. If an Endpoint Interrupt Priority Register (USBEpIntPri) bit is not set, the corresponding endpoint interrupt will be routed to this bit.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Symbol Symbol ERR_INT EP_RLZED Symbol TxENDPKT CDFULL CCEMPTY DEV_STAT EP_SLOW EP_FAST FRAME ENDPKT Table 125. USB Device Interrupt Clear register (USBDevIntClr - address 0xE010 0208) bit description Symbol Value Description Reset value 31:0 No effect.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 128. USB Device Interrupt Priority register (USBDevIntPri - address 0xE010 022C) bit description Symbol Value Description Reset value 31:2 Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Symbol EP3TX EP3RX EP2TX EP2RX EP1TX EP1RX EP0TX EP0RX Table 132. USB Endpoint Interrupt Enable register (USBEpIntEn - address 0xE010 0234) bit description Symbol Value Description Reset value 31:0 The corresponding bit in USBDMARSt is set when an interrupt occurs for USBEpIntEn this endpoint.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 134. USB Endpoint Interrupt Clear register (USBEpIntClr - address 0xE010 0238) bit description Symbol Value Description Reset value 31:0 No effect. USBEpIntClr Clears the corresponding bit in USBEpIntSt, by executing the SIE Select bit allocation Endpoint/Clear Interrupt command for this endpoint.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Symbol EP3TX EP3RX EP2TX EP2RX EP1TX EP1RX EP0TX EP0RX Table 138. USB Endpoint Interrupt Priority register (USBEpIntPri - address 0xE010 0240) bit description Symbol Value Description Reset value 31:0 The corresponding interrupt is routed to the EP_SLOW bit of USBDevIntSt 0...
Page 171
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 139. USB Realize Endpoint register (USBReEp - address 0xE010 0244) bit allocation Reset value: 0x0000 0003 Symbol EP31 EP30 EP29 EP28 EP27 EP26 EP25 EP24 Symbol EP23 EP22 EP21 EP20 EP19...
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device The device will not respond to any transactions to unrealized endpoints. The SIE Configure Device command will only cause realized and enabled endpoints to respond to transactions. For details see Table 13–171.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 9.5.1 USB Receive Data register (USBRxData - 0xE010 0218) For an OUT transaction, the CPU reads the endpoint buffer data from this register. Before reading this register, the RD_EN bit and LOG_ENDPOINT field of the USBCtrl register should be set appropriately.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 145. USB Transmit Data register (USBTxData - address 0xE010 021C) bit description Symbol Description Reset value 31:0 TX_DATA Transmit Data. 0x0000 0000 9.5.4 USB Transmit Packet Length register (USBTxPLen - 0xE010 0224) This register contains the number of bytes transferred from the CPU to the selected endpoint buffer.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 147. USB Control register (USBCtrl - address 0xE010 0228) bit description Symbol Value Description Reset value RD_EN Read mode control. Enables reading data from the OUT endpoint buffer for the endpoint specified in the LOG_ENDPOINT field using the USBRxData register.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 149. USB Command Data register (USBCmdData - address 0xE010 0214) bit description Symbol Description Reset value 31:8 Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device This register is intended for initialization prior to enabling the DMA for an endpoint. When the DMA is enabled for an endpoint, hardware clears the corresponding bit in USBDMARSt on completion of a packet transfer. Therefore, software should not clear the bit using this register while the endpoint is enabled for DMA operation.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 9.7.4 USB UDCA Head register (USBUDCAH - 0xE010 0280) The UDCA (USB Device Communication Area) Head register maintains the address where the UDCA is located in on-chip RAM. Refer to Section 13–14.2 “USB device communication area”...
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 9.7.7 USB EP DMA Disable register (USBEpDMADis - 0xE010 028C) Writing a one to a bit in this register clears the corresponding bit in USBEpDMASt. Writing zero has no effect on the corresponding bit of USBEpDMASt. Any write to this register clears the internal DMA_PROCEED flag.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 159. USB DMA Interrupt Enable register (USBDMAIntEn - address 0xE010 0294) bit description Symbol Value Description Reset value 31:3 - Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 9.7.12 USB End of Transfer Interrupt Set register (USBEoTIntSet - 0xE010 02A8) Writing one to a bit in this register sets the corresponding bit in the USBEoTIntSt register. Writing zero has no effect. USBEoTIntSet is a write only register.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 165. USB New DD Request Interrupt Set register (USBNDDRIntSet - address 0xE010 02B4) bit description Symbol Value Description Reset value Set endpoint xx (2 ≤ xx ≤ 31) new DD interrupt request. 0...
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 10. Interrupt handling This section describes how an interrupt event on any of the endpoints is routed to the Nested Vectored Interrupt Controller (NVIC). For a diagram showing interrupt event handling, see Figure 13–43.
Page 184
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device are then Ored and routed to the EOT bit in USBDMAIntSt. Likewise, all New DD request interrupts and system error interrupt events are routed to the NDDR and ERR bits respectively in the USBDMAStInt register.
Page 185
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device interrupt event on Slave mode from other Endpoints USBEpIntSt USBDevIntSt FRAME EP_FAST EP_SLOW USBDevIntPri[0] USBEpIntEn[n] USBEpIntPri[n] USBDevIntPri[1] ERR_INT USBDMARSt to VIC to DMA engine USBEoTIntST DMA Mode USBNDDRIntSt USBDMAIntSt NDDR USBSysErrIntSt For simplicity, USBDevIntEn and USBDMAIntEn are not shown.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 11. Serial interface engine command description The functions and registers of the Serial Interface Engine (SIE) are accessed using commands, which consist of a command code followed by optional data bytes (read or write action).
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 171. Configure Device Register 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. CONF_DEVICE Device is configured.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 11.4 Read Current Frame Number (Command: 0xF5, Data: read 1 or 2 bytes) Returns the frame number of the last successfully received SOF. The frame number is eleven bits wide. The frame number returns least significant byte first. In case the user is only interested in the lower 8 bits of the frame number, only the first byte needs to be read.
Page 190
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 173. Set Device Status Register bit description Bit Symbol Value Description Reset value SUS_CH Suspend (SUS) bit change indicator. The SUS bit can toggle because: • The device goes into the suspended state.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 11.7 Get Device Status (Command: 0xFE, Data: read 1 byte) The Get Device Status command returns the Device Status Register. Reading the device status returns 1 byte of data. The bit field definition is same as the Set Device Status...
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 175. Read Error Status Register bit description Symbol Description Reset value TGL_ERR Wrong toggle bit in data PID, ignored data. BTSTF Bit stuff error. B_OVRN Buffer Overrun. End of packet error.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 176. Select Endpoint Register bit description Bit Symbol Value Description Reset value SETUP bit: the value of this bit is updated after each successfully received packet (i.e. an ACKed package on that particular physical endpoint).
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 177. Set Endpoint Status Register bit description Bit Symbol Value Description Reset value CND_ST Conditional Stall bit. Unstalls both control endpoints. Stall both control endpoints, unless the STP bit is set in the Select Endpoint register.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device Table 178. Clear Buffer Register bit description Symbol Value Description Reset value 7:1 - Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device – Set the priority of each enabled interrupt using USBEpIntPri. – Configure the desired interrupt mode using the SIE Set Mode command. – Enable device interrupts using USBDevIntEn (normally DEV_STAT, EP_SLOW, and possibly EP_FAST).
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 13.2 Data transfer for OUT endpoints When the software wants to read the data from an endpoint buffer it should set the RD_EN bit and program LOG_ENDPOINT with the desired endpoint number in the USBCtrl register.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 1. USB transfers – transfer of data over the USB bus. The USB 2.0 specification refers to these simply as transfers. Within this section they are referred to as USB transfers to distinguish them from DMA transfers. A USB transfer is composed of transactions.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 14.3 Triggering the DMA engine An endpoint raises a DMA request when Slave mode is disabled by setting the corresponding bit in the USBEpIntEn register to 0 (Section 13–9.3.2) and an endpoint interrupt occurs (see Section 13–9.7.1 “USB DMA Request Status register (USBDMARSt...
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 14.4.4 Isochronous_endpoint When set, this bit indicates that the descriptor belongs to an isochronous endpoint. Hence 5 words have to be read when fetching it. 14.4.5 Max_packet_size The maximum packet size of the endpoint. This parameter is used while transferring the data for IN endpoints from the memory.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 14.4.10 Packet_valid This bit is used for isochronous endpoints. It indicates whether the last packet transferred to the memory is received with errors or not. This bit is set if the packet is valid, i.e., it was received without errors.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device DMA operation is not supported for physical endpoints 0 and 1 (default control endpoints). 14.5.2 Finding DMA Descriptor When there is a trigger for a DMA transfer for an endpoint, the DMA engine will first determine whether a new descriptor has to the fetched or not.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device A DD can have the following types of completion: Normal completion - If the current packet is fully transferred and the Present_DMA_count field equals the DMA_buffer_length, the DD has completed normally. The DD will be written back to memory with DD_retired set and DD_status set to NormalCompletion.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 14.6.3 Transferring the Data The data is transferred to or from the memory location DMA_buffer_start_addr. After the end of the packet transfer the Present_DMA_count value is incremented by 1. The isochronous packet size is stored in memory as shown in Figure 13–45.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device OUT transfers in ATLE mode data to be sent data in packets data to be stored in USB by host driver as seen on USB RAM by DMA engine DMA_buffer_start_addr 160 bytes...
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device In ATLE mode, the last buffer length to be transferred always ends with a short or empty packet indicating the end of the USB transfer. If the concatenated transfer lengths are such that the USB transfer ends on a MaxPacketSize packet boundary, the (NDIS) host will send an empty packet to mark the end of the USB transfer.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 14.7.4 Ending the packet transfer The DMA engine proceeds with the transfer until the number of bytes specified in the field DMA_buffer_length is transferred to or from on-chip RAM. Then the EOT interrupt will be generated.
Page 210
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 5. Software sends the SIE Select Endpoint command to read the Select Endpoint Register and test the FE bit. Software finds that the active buffer (B_2) has data (FE=1). Software clears the endpoint interrupt and begins reading the contents of B_2.
UM10316 NXP Semiconductors Chapter 13: LPC29xx USB device 11. Both B_1 and B_2 are empty, and the active buffer is B_2. The next packet written by software will go into B_2. In DMA mode, switching of the active buffer is handled automatically in hardware. For...
UM10316 Chapter 14: LPC29xx USB Host controller Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The USB host controller is available on LPC2930 and LPC2939 only (see also Table 1–4). 2. Introduction This section describes the host portion of the USB 2.0 OTG dual role core which integrates the host controller (OHCI compliant), device controller and I2C.
UM10316 NXP Semiconductors Chapter 14: LPC29xx USB Host controller 2.2 Architecture The architecture of the USB host controller is shown below in Figure 14–47. register interface (AHB slave) REGISTER INTERFACE port port 1 HOST CONTROL port 2 CONTROLLER LOGIC/ DMA interface...
UM10316 NXP Semiconductors Chapter 14: LPC29xx USB Host controller Table 181. USB OTG port pins Pin name Direction Description Pin category U2PWRD2 Port power status Host power switch USB_OVRCR2 Over-current status Host power switch USB_HSTEN2 Host enabled status Control 3.1.1 USB host usage note Both ports can be configured as USB hosts.
UM10316 NXP Semiconductors Chapter 14: LPC29xx USB Host controller Table 182. Register overview: USB Host (base address 0xE010 0000) …continued Name Address Description Reset value offset HcBulkCurrentED 0x2C Contains the physical address of the current endpoint descriptor of the bulk list.
UM10316 Chapter 15: LPC29xx USB OTG interface Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The USB OTG controller is available in LPC2926/27/29, LPC2930, and LPC2939 only. Note that the host controller is not implemented on the LPC2926/27 and LPC2929 (see also Table 1–4).
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface support an OTG connection. The communication between the register interface and an external OTG transceiver is handled through an I C interface and through the external OTG transceiver interrupt signal. For USB connections that use the device or host controller only (not OTG), the ports use an embedded USB Analog Transceiver (ATX).
Page 218
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface Table 184. USB OTG port pins Pin name Direction Description Interfacing USB_SSPND1 Bus suspend status External OTG transceiver USB_PWRD1 Port power status USB host USB_PPWR1 Port power enable USB host USB_OVRCR1...
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface 6.4 OTG Interrupt Clear Register (OTGIntClr - 0xE010 010C) Writing a one to a bit in this register will clear the corresponding bit in the OTGIntSt register. Writing a zero has no effect. The bit allocation of OTGIntClr is the same as in OTGIntSt.
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface Table 187. OTG Status Control register (OTGStCtrl - address 0xE010 0110) bit description Symbol Description Reset Value TMR_MODE Timer mode selection. 0: monoshot 1: free running TMR_SCALE Timer scale selection. This field determines the duration of each timer count.
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface Table 191. I2C Receive register (I2C_RX - address 0xE010 0300) bit description Symbol Description Reset Value RX Data Receive data. 6.10 I2C Transmit Register (I2C_TX - 0xE010 0300) This register is the top byte of the transmit FIFO. The transmit FIFO is 4 bytes deep.
Page 227
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface Table 193. I2C status register (I2C_STS - address 0xE010 0304) bit description Symbol Value Description Reset Value Receive FIFO Empty. RFE is set when the RX FIFO is empty and is cleared when the RX FIFO contains valid data.
Page 228
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface Table 193. I2C status register (I2C_STS - address 0xE010 0304) bit description Symbol Value Description Reset Value Arbitration Failure Interrupt. When transmitting, if the SDA is low when SDAOUT is high, then this I C has lost the arbitration to another device on the bus.
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface Table 194. I2C Control register (I2C_CTL - address 0xE010 0308) bit description Symbol Value Description Reset Value DRSIE Slave Transmitter Data Request Interrupt Enable. This enables the DRSI interrupt which signals that the slave transmitter has run out of data and the last byte was acknowledged, so the SCL line is being held low.
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface 6.15 Interrupt handling The interrupts set in the OTGIntSt register are set and cleared during HNP switching. All OTG related interrupts are routed separately to the VIC. I2C related interrupts are set in the I2C_STS register and routed, if enabled by I2C_CTL, to the USB_I2C_INT bit.
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface The OTG software stack is responsible for implementing the HNP state machines as described in the On-The-Go Supplement to the USB 2.0 Specification. The OTG controller hardware provides support for some of the state transitions in the HNP state machines as described in the following subsections.
Page 232
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface idle B_HNP_TRACK = 0 B_HNP_TRACK = 1 ? set HNP_FAILURE, clear B_HNP_TRACK, clear PU_REMOVED bus suspended ? disconnect device controller from U1 PU_REMOVED set? set REMOVE_PU PU_REMOVED set? reconnect port U1 to the...
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface b_peripheral when host sends SET_FEATURE with b_hnp_enable, set B_HNP_TRACK REMOVE_PU set? remove D+ pull-up, set PU_REMOVED go to go to b_wait_acon b_peripheral HNP_FAILURE set? add D+ pull-up HNP_SUCCESS set? go to b_host Fig 55.
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface /* Wait for TDI to be set */ while (!(OTG_I2C_STS & TDI)); /* Clear TDI */ OTG_I2C_STS = TDI; Add D+ pull-up /* Add D+ pull-up through ISP1301 */ OTG_I2C_TX = 0x15A; // Send ISP1301 address, R/W=0 OTG_I2C_TX = 0x006;...
Page 235
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface idle A_HNP_TRACK = 0 A_HNP_TRACK = 1 ? set HNP_FAILURE, clear A_HNP_TRACK disconnect host controller from U1 bus suspended ? resume detected ? connnect host controller back to U1 bus reset detected?
Page 236
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface a_host when host sends SET_FEATURE with a_hnp_enable, set A_HNP_TRACK set BDIS_ACON_EN in external OTG transceiver load and enable OTG timer suspend host on port 1 go to a_suspend TMR set? HNP_SUCCESS set?
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface Load and enable OTG timer /* The following assumes that the OTG timer has previously been */ /* configured for a time scale of 1 ms (TMR_SCALE = “10”) /* and monoshot mode (TMR_MODE = 0)
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface 8. Clocking and power management The OTG controller clocking is shown in Figure 15–58. Note that the host controller is not implemented on the LPC2927 and LPC2929. ahb_slave_clk REGISTER BASE_SYS_CLK INTERFACE...
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface When software wishes to access registers in one of the controllers, it should first ensure that the respective controller’s 48 MHz clock is enabled by setting its CLK_EN bit in the OTGClkCtrl register and then poll the corresponding CLK_ON bit in OTGClkSt until set.
UM10316 NXP Semiconductors Chapter 15: LPC29xx USB OTG interface necessary to wait for either of the dma_need_clk signals or the dev_need_clk to be de-asserted, the status of USB_NEED_CLK can be polled in the USBIntSt register to determine when they have all been de-asserted.
UM10316 Chapter 16: LPC29xx General Purpose Input/Output (GPIO) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. Available ports depend on the pin configuration for each part. Table 197.
UM10316 NXP Semiconductors Chapter 16: LPC29xx General Purpose Input/Output (GPIO) The signal line is normally pulled up to a HIGH voltage level (logic 1) by an external resistor. Each of the devices connected to the signal line can either drive the signal line to a LOW voltage level (logic 0) or stay at high impedance (open-drain).
UM10316 NXP Semiconductors Chapter 16: LPC29xx General Purpose Input/Output (GPIO) 3.2 GPIO port output register The port output register is used to define the output level on each I/O pin individually if this pin has been configured as an output by the port direction register. If the port input register is written to the port output register is written to as well.
UM10316 Chapter 17: LPC29xx timer 0/1/2/3 Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. Note that capture pins CAP0 and CAP1 on timer 1 are not pinned out for LPC2926/27/29 and LPC2921/23/25. 2.
UM10316 NXP Semiconductors Chapter 17: LPC29xx timer 0/1/2/3 3. Timer counter and interrupt timing Each timer consists of a prescale counter (PR register) and a timer counter (TC register). The prescale counter is incremented at every cycle of the system clock. As soon as the prescale counter matches the prescale value contained in the PV register it is reset to 0 and the timer counter is incremented.
UM10316 NXP Semiconductors Chapter 17: LPC29xx timer 0/1/2/3 CLK(SYS) Prescale Counter (PC) Timer Counter (TC) Timer Counter (TC) reached Timer Interrupt Match Value (MRx=6) (active low) PR=2, MRx=6 Fig 62. Stop-on-match timing 4. Timer match functionality The timer block contains four match circuits, each of which can be programmed with an individual match value and a specific action-on-match.
UM10316 Chapter 18: LPC29xx SPI0/1/2 Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. Introduction The LPC29xx contains three Serial Peripheral Interface (SPI) modules to enable synchronous serial communication with slave or master peripherals that have either Motorola SPI or Texas Instruments synchronous serial interfaces.
Page 256
UM10316 NXP Semiconductors Chapter 18: LPC29xx SPI0/1/2 In normal transmission mode software programs the settings of the SPI module, writes data to the transmit FIFO and then enables the SPI module. The SPI module transmits until all data has been sent, or until it gets disabled with data still unsent. When data needs to be transmitted to another slave software has to re-program the settings of the SPI module, write new data and enable the SPI module again.
UM10316 NXP Semiconductors Chapter 18: LPC29xx SPI0/1/2 Transmit FIFO Slave 1 Slave 2 Slave 3 Slave 4 Fig 63. Sequential-slave mode: example It is possible to temporarily suspend or skip one or more of the slaves in a transfer. To do...
Page 259
UM10316 NXP Semiconductors Chapter 18: LPC29xx SPI0/1/2 Table 213. SPI_CONFIG register bit description (SPI_CONFIG0/1/2, addresses: 0xE004 7000 (SPI0), 0xE004 8000 (SPI1), 0xE004 9000 (SPI2)) …continued * = reset value Symbol Access Value Description UPDATE_ENABLE Update enable bit This must be set by software when the SLV_ENABLE register has been programmed.
UM10316 NXP Semiconductors Chapter 18: LPC29xx SPI0/1/2 3.10 SPI slave-settings 2 register The SPI second slave-settings register configures several other parameters for each slave of the SPI module. Remark: Some bits in this register are only relevant in master mode, and each individual slave has its own register with parameters.
UM10316 Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter (UART) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. The modem control features are pinned out on the LPC2939/30 only. 2.
Page 270
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter Table 225. UART0/1 Pin description Type Description UART0/1 DCD Input Data Carrier Detect. Active low signal indicates if the external modem has established a communication link with the UART and data may be exchanged. In normal operation of the modem interface (MCR[4]=0), the complement value of this signal is stored in MSR[7].
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter Table 233. UARTn Interrupt Handling U0IIR[3:0] Priority Interrupt Type Interrupt Source Interrupt Reset value 0001 None None 0110 Highest RX Line Status or PE or FE or BI UnLSR Read / Error...
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter Table 234. UARTn FIFO Control Register (U0FCR - address 0xE004 5008, U1FCR - 0xE004 6008, Write Only) bit description Symbol Value Description Reset Value 31:8 - Reserved RX Trigger These two bits determine how many receiver...
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter Table 235. UARTn Line Control Register (U0LCR - address 0xE004 500C, U1LCR - 0xE004 600C) bit description Bit Symbol Value Description Reset Value Break Control Disable break transmission. Enable break transmission. Output pin UART0 TXD is forced to logic 0 when UnLCR[6] is active high.
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter If Auto-RTS mode is disabled, the RTSen bit controls the RTS output of the UART. If Auto-RTS mode is enabled, hardware controls the RTS output, and the actual value of RTS will be copied in the RTS Control bit of the UART. As long as Auto-RTS is enabled, the value of the RTS Control bit is read-only for software.
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter UART1 TX start bits0..7 stop start bits0..7 stop start bits0..7 stop CTS1 pin Fig 65. Auto-CTS Functional Timing While starting transmission of the initial character the CTS1 signal is asserted. Transmission will stall as soon as the pending transmission has completed. The UART will continue transmitting a 1 bit as long as CTS1 is deasserted (high).
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter Table 238. UARTn Line Status Register (U0LSR - address 0xE004 5014, U1LSR - 0xE004 6014, Read Only) bit description Bit Symbol Value Description Reset Value Framing Error When the stop bit of a received character is a logic 0, a (FE) framing error occurs.
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter Table 239: UARTn Modem Status Register (U0MSR - address 0xE004 5018, U1MSR - 0xE004 6018, Read Only) bit description Bit Symbol Value Description Reset Value Data Set Ready State. Complement of input signal DSR. This bit is connected to MCR[0] in modem loopback mode.
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter Table 241. UARTn Auto-baud Control Register (U0ACR - 0xE004 5020, U1ACR - 0xE004 6020) bit description Symbol Value Description Reset value 31:10 - Reserved, user software should not write ones to reserved bits.
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter • The UnIIR ABTOInt interrupt will get set if the interrupt is enabled (UnIER ABToIntEn is set and the auto-baud rate measurement counter overflows). • The UnIIR ABEOInt interrupt will get set if the interrupt is enabled (UnIER ABEOIntEn is set and the auto-baud has completed successfully).
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter When a matching address character is detected it will be pushed onto the RXFIFO along with the partiy bit, and the receiver will be automatically enabled (RS485CTRL bit 1 will be cleared by hardware).
Page 292
UM10316 NXP Semiconductors Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter The UARTn transmitter block, UnTX, accepts data written by the CPU or host and buffers the data in the UARTn TX Holding Register FIFO (UnTHR). The UARTn TX Shift Register (UnTSR) reads the data stored in the UnTHR and assembles the data to transmit via the serial output pin, TXDn.
UM10316 Chapter 20: LPC29xx WatchDog Timer (WDT) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. Introduction The purpose of the Watchdog timer is to reset the ARM9 processor within a reasonable amount of time if the processor enters an error state.
UM10316 NXP Semiconductors Chapter 20: LPC29xx WatchDog Timer (WDT) Table 248. Watchdog programming steps Step Normal mode Debug mode Write 0x251D8951 (key exor Write time-out value (e.g.0x0000 FFFF) counter_enable) to the Watchdog Timer to the Watchdog time-out register. Control register. The timer is now started This indicates time-out reset at 65,536 clock cycles.
UM10316 NXP Semiconductors Chapter 20: LPC29xx WatchDog Timer (WDT) Table 252. PR register bit descritpion (PR, address: 0xE004 0008) * = reset value Variable name Access Value Description 31 to 0 PR[31:0] 0x0000 Prescale register. This specifies the maximum 0000* value for the prescale counter.
UM10316 Chapter 21: LPC29xx CAN 0/1 Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. CAN functional description Figure 21–69 gives a brief overview of the main blocks in the CAN gateway controller. This consists of two identical CAN controllers working as independent CAN nodes.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 4. CAN bus timing 4.1 Baud-rate prescaler The period of the CAN system clock, t , is programmable and determines individual bit timing. The CAN system clock is calculated using the following equation:...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 5.2 Automatic transmit-priority protection To allow uninterrupted streams of transmit messages, the CAN controller provides automatic transmit-priority detection for all transmit buffers. Depending on the selected transmit priority mode (TPM) in the mode register, internal prioritization is based on the CAN identifier or a user-defined local priority.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 7. CAN controller self-test The CAN controller supports two options for self-tests: • Global self-test: setting the self-reception request bit in normal operating mode • Local self-test: setting the self-reception request bit in self-test mode Both self-tests use the self-reception feature of the CAN controller.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 TX Buffer TX Buffer TX Buffer Transceiver RX Buffer Fig 72. Local self-test (example for high-speed CAN bus) A message transmission is initiated by setting the self-reception request bit SRR in conjunction with the selected message buffer(s) STB3, STB2 and STB1.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 11-BIT index 0 11-BIT index 1 11-BIT index 2 11-BIT index 3 standard frame h entries format FullCAN identifier section 11-BIT index (h−2) 11-BIT index (h−1) CASFESA 11-BIT index (h) 11-BIT index (h+1)
Page 306
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 258. Standard frame-format FullCAN identifier section …continued Symbol Description 15 to 13 SCC Odd index: CAN controller number Odd index: message disable bit. Logic 0 is message enabled and logic 1 is message disabled...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 The semaphore operates in the following manner: • SEM[1:0] = 01: Acceptance filter is in the process of updating the buffer • SEM[1:0] = 11: Acceptance Filter has finished updating the buffer •...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 260. Standard frame-format explicit identifier section …continued Symbol Description Odd index: message disable bit. Logic 0 is message enabled and logic 1 is message disabled Not used 10 to 0 ID[28:18] Odd index: 11-bit CAN 2.0 B identifier...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 262. Extended frame-format explicit identifier section Symbol Description EFF_GRP_ start address 31 to 29 SCC CAN controller number 28 to 0 ID[28:0] 29-bit CAN 2.0 B identifier 8.5 Extended frame-format group identifier section...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Use the ID ready interrupt IDI and the receive interrupt RI. In this mode all CAN messages are accepted and stored in the receive buffers of active CAN Controllers. With the activated FullCAN Mode, received FullCAN messages are automatically stored by the acceptance filter in the FullCAN message-object section (see also Section 21–13...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Each CAN identifier is linked to an ID Index number (see also Figure 21–75 Figure 21–85). For a CAN identifier match, the matching ID index is stored in the identifier index IDI of the message info register CCRXBMI for the appropriate CAN controller (see Section 21–6.1...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 It is possible to disable the 5Ah identifier in the FullCAN section. Then, the screening process would be finished with the match in the explicit identifier section. The first group in the group identifier section has been defined so that incoming CAN messages with identifiers of 5Ah up to 5Fh are accepted on SCC 0.
Page 313
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 264. Register overview: CAN controller (base address 0xE008 0000 (CAN0) , 0xE008 1000 (CAN1)) …continued Name Access Address Description Reset value Reference offset CCTXB2ID 0x44 CAN controller transmit- buffer 2 identifier 0x0000 0000 see Table 21–282...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 267. Register overview: CANCS central status (base address: 0xE008 8000) Name Access Address Description Reset Reference offset value CCCTS CAN controllers central transmit-status register 0x030303 Table 21–296 CCCRS CAN controllers central receive-status register 0x03 Table 21–297...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 268. CCMODE register bit description (CCMODE, address 0xE008 0000 (CAN0) and 0xE008 1000 (CAN1)) …continued * = reset value; **both reset value and soft reset mode value Symbol Access Value Description...
Page 316
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 269. CAN controller command register bit description (CCCMD, address 0xE008 0004 (CAN0) and 0xE008 1004 (CAN1)) …continued Symbol Access Value Description [1][2][3] Self-reception request A message is transmitted from the selected transmit buffer and received simultaneously.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 The AT bit is used when the CPU requires suspension of the previously requested transmission; e.g. to transmit a more urgent message first. A transmission already in progress is not stopped. To see if the original message has been either transmitted successfully or aborted, the transmission-complete status bit should be checked.
Page 318
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 270. CCGS register bit description (CCGS, address 0xE008 0008 (CAN0) and 0xE008 1008 (CAN1)) …continued * = reset value; **both reset value and soft reset mode value Symbol Access Value Description...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 After reading all messages and releasing their memory space with the command 'release receive buffer' this bit is cleared. 9.4 CAN controller interrupt and capture register The CAN controller interrupt and capture register allows the identification of an interrupt source.
Page 320
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 271. CAN controller interrupt and capture register bit description (CCIC, address 0xE008 000C (CAN0) and 0xE008 100C (CAN1)) * = reset value; **both reset value and soft reset mode value Symbol...
Page 321
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 271. CAN controller interrupt and capture register bit description (CCIC, address 0xE008 000C (CAN0) and 0xE008 100C (CAN1)) …continued * = reset value; **both reset value and soft reset mode value...
Page 322
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 The RI bit is not cleared on a read-access to the interrupt register. Giving the command ‘Release receive buffer will clear RI temporarily. If there is another message available within the receive buffer after the release command, RI is set again: otherwise RI stays cleared.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 9.5 CAN controller interrupt-enable register The CAN controller interrupt-enable register CCIE enables the different types of CAN controller interrupts. Table 21–273 shows the bit assignment of the CCIE register. Table 273. CAN controller interrupt-enable register bit descriptioN (CCIE, address 0xE008...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 273. CAN controller interrupt-enable register bit descriptioN (CCIE, address 0xE008 0010 (CAN0) and 0xE008 1010 (CAN1)) …continued * = reset value Symbol Access Value Description EWIE Error warning interrupt-enable An interrupt is generated if either the error...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 274. CAN controller bust timing register bit description (CCBT, address 0xE008 0014 (CAN0) and 0xE008 1014 (CAN1)) …continued * = reset value Symbol Access Value Description 13 to 10 reserved Reserved; do not modify. Read as logic 0...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 9.8 CAN controller status register The CAN controller status register CCSTAT reflects the transmit status of all three transmit buffers, and also the global status of the CAN controller itself. The register is read-only.
Page 327
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 276. CAN controller status register bit description (CCSTAT, address 0xE008 001C (CAN0) and 0xE008 101C (CAN1)) …continued * = reset value; **both reset value and soft reset mode value Symbol Access Value...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 276. CAN controller status register bit description (CCSTAT, address 0xE008 001C (CAN0) and 0xE008 101C (CAN1)) …continued * = reset value; **both reset value and soft reset mode value Symbol Access Value...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 277. CAN controller receive-buffer message info register bit description (CCRXBMI, address 0xE008 0020 (CAN0) and 0xE008 1020 (CAN1)) * = reset value Symbol Access Value Description Frame format An extended frame-format message has been...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 278. CAN controller receive buffer identifier register bit description (CCRXBID, address 0xE008 0024 (CAN0) and 0xE008 1024 (CAN1)) * = reset value Symbol Access Value Description 31 to 29 reserved Reserved; do not modify. Read as logic 0...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 280. CAN controller receive-buffer data B register bit description (CCRXBDB, address 0xE008 002C (CAN0) and 0xE008 102C (CAN1)) * = reset value Symbol Access Value Description 31 to 24 DB8[7:0] Data byte 8. If the data-length code value is...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 21–283 shows the bit assignment of the CCTXB1DA, CCTXB2DA and CCTXB3DA registers. Table 283. CAN controller transmit-buffer data A registers register bit description (CCTXB1/2/3DA, addresses 0xE008 0038, 0xE008 0048, 0xE008 0058 (CAN0), and...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 10.2 CAN acceptance-filter standard-frame explicit start-address register The CAN acceptance filter standard-frame explicit start-address register CASFESA defines the start address of the section of explicit standard identifiers in the acceptance-filter look-up table. It also indicates the size of the section of standard identifiers which the acceptance filter will search.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 287. CAN acceptance-filter standard-frame group start-address register bit description (CASFGSA, address 0xE008 7008) * = reset value Symbol Access Value Description 31 to 12 reserved Reserved; do not modify. Read as logic 0...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 288. CAEFESA register bit description (CAEFESA, address 0xE008 700C) …continued * = reset value Symbol Access Value Description 11 to 2 EFESA[9:0] Extended-frame explicit start address. This register defines the start address of the section of explicit extended identifiers in acceptance-filter look-up table.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 10.6 CAN acceptance-filter end of look-up table address register The CAN acceptance filter end of look-up table address register CAEOTA contains the end-address of the acceptance-filter look-up table. Table 21–290 shows the bit assignment of the CAEOTA register.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 291. CAN acceptance-filter look-up table error address register bit description (CALUTEA, address 0xE008 7018) * = reset value Symbol Access Value Description 31 to 11 reserved Reserved; do not modify. Read as logic 0...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 10.12 CAN controller central receive-status register The CAN controller central receive-status register CCCRS provides bundled access to the reception status of all CAN controllers. The status flags are the same as those in the status register of the corresponding CAN controller.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 298. CAN controller central miscellaneous-status register bit description * = reset value Symbol Access Value Description 31 to 10 reserved Reserved; do not modify. Read as logic 0 CAN controller 1 bus status...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 • The Standard Frame Individual Start Address Register (SFF_sa) must be greater than or equal to the number of IDs for which automatic receive storage is to be done, times two. SFF_sa must be rounded up to a multiple of 4 if necessary.
Page 344
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 300. FullCAN semaphore operation SEM1 SEM0 activity Acceptance Filter is updating the content Acceptance Filter has finished updating the content CPU is in process of reading from the Acceptance Filter Prior to writing the first data byte into a message object, the Acceptance Filter will write the FrameInfo byte into the according buffer location with SEM[1:0] = 01.
Page 345
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 START read 1st word SEM == 01? this message has not been SEM == 11? received since last check clear SEM, write back 1 st word read 2nd and 3rd words read 1st word...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 11.2 FullCAN interrupts The CAN Gateway Block contains a 2 kB ID Look-up Table RAM. With this size a maximum number of 146 FullCAN objects can be defined if the whole Look-up Table RAM is used for FullCAN objects only.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Message Message disable bit disable bit Index 0, 1 11-bit CAN ID 11-bit CAN ID FullCAN Explicit Index 2, 3 11-bit CAN ID 11-bit CAN ID Standard Frame Index 4, 5 11-bit CAN ID...
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 11.2.3 Setting the interrupt pending bits (IntPnd 63 to 0) The interrupt pending bit (IntPndx) gets asserted in case of an accepted FullCAN message and if the interrupt of the according FullCAN Object is enabled (enable bit FCANIntxEn) is set).
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 11.3.3 Scenario 3: Message gets overwritten indicated by Semaphore bits This scenario is a special case in which the lost message is indicated by the existing semaphore bits. The scenario is entered, if during a Software read of a message object another new message gets stored by the message handler.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 12.2 Group of standard frame-format identifier section (11-bit CAN ID) The start address of the group of the standard frame-format section is defined in the CASFGSA register with a value of 10h. The end of this section is defined in the CAEFESA register.
UM10316 NXP Semiconductors Chapter 21: LPC29xx CAN 0/1 Table 302. Used ID look-up table sections of example 2 ID-look-up table section Usage Group of standard frame format Not Activated Explicit extended frame format Not Activated Group of extended frame format Not Activated 13.1 FullCAN explicit standard frame-format section (11-bit CAN ID)
UM10316 Chapter 22: LPC29xx LIN/UART 0/1 Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The LIN/UART block is identical for all LPC29xx parts. 2. Introduction The LPC29xx LIN controller can function as UART or LIN interface and consists of two independent sub controllers for UART and LIN functions and a fractional baud rate generator for both.
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 5.1 LIN master The LIN master controller can send complete message frames without interrupting the CPU. Generation of a new message frame is always initiated by a transmission-request command. This LIN master command forces the LIN master to send the LIN header field including synch break, synch field and a user-specified ID field.
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 5.1.2 Registers and mapping The complete register layout of the LIN master controller is shown in Ref. 31–6. Refer to this for resolving register, register-slice and bit names. 5.1.3 Error detection The LIN master Controller contains error-detection logic which can detect the following wake-up or error conditions: •...
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 To safely distinguish between a bit error and a line clamped error, the LIN master should send a second message as soon as a bit error is detected. With the second message the LIN master will be able to distinguish clearly between bit errors and line-clamped errors.
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 7.1.4 LIN master-controller fractional baud rate generator register The LIN master-controller fractional baud rate generator register LFBRG stores the divisor in 16-bit binary format and the fraction in 4-bit binary format for the programmable baud- rate generator.
Page 368
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Figure 22–90 shows the status-flag handling in terms of transmitting and receiving header and response fields. The LSTAT register is read-only. Table 22–310 shows its bit assignment. Header fields Response fields Case 1:...
Page 369
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Table 310. LIN master-controller status register bit description (LIN0_STAT, address 0xE008 9010, LIN1_LSTAT, address 0xE008 A010) …continued * = reset value Symbol Access Value Description RXD line level. The current RXD line level is dominant...
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 7.2.2 LIN master-controller interrupt and capture register The LIN master-controller interrupt and capture register LIC determines when the LIN master controller gives an interrupt request if the corresponding interrupt-enable has been set. Reading the interrupt register clears the interrupt source. A detailed bus-error capture is reported.
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Table 311. LIN master-controller interrupt and capture register bit description (LIN0_LIC, address 0xE008 9014, LIN1_LIC, address 0xE008 A014) …continued * = reset value Symbol Access Value Description Checksum-error interrupt The received checksum field does not match...
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 to the CPU as read-only memory. By setting the software checksum bit the checksum register appears to the CPU as read/write memory. In this case, and before a transmission is initiated, the software has to provide the checksum to the checksum register.
Page 374
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Header Response data field(s) + checksum field minimum frame length data field(s) + checksum field maximum frame length expected message complete time frame time-out period Slave is sending and Master is receiving 001aaa220 Fig 91.
Page 375
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Table 314. LIN master-controller time-out register bit description (LIN0_LTO, address 0xE008 9024, LIN1_LTO, address 0xE008 A024) * = reset value Symbol Access Value Description 31 to 8 reserved Reserved; do not modify. Read as logic 0 7 to 0 LIN message time-out.
Page 376
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Table 315. LIN message-identifier register bit description (LIN0_LID, address 0xE008 9028, LIN1_LID, address 0xE008 A028) …continued * = reset value Symbol Access Value Description CSID Checksum ID inclusion The identifier field is included in the checksum...
Page 377
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Table 317. LDATB register bit description (LIN0_LDATB, address 0xE008 9030, LIN1_LDATB, address 0xE008 A030) * = reset value Symbol Access Value Description 31 to 24 DF8[7:0] LIN message-data field 8 0x00* 23 to 16 DF7[7:0]...
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 7.3 LIN/UART registers (LIN in UART mode) 7.3.1 LIN/UARTn Receiver Buffer Register The LU0/1RBR is the top byte of the LIN/UARTn RX FIFO. The top byte of the RX FIFO contains the oldest character received and can be read via the bus interface. The LSB (bit 0) represents the “oldest”...
Page 379
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Table 322. LIN/UARTn Interrupt Enable Register (LU0IER - address 0xE008 9014, LU1IER - 0xE008 A014) bit description Symbol Value Description Reset Value THRE enables the THRE interrupt for LIN/UARTn. The status of Interrupt this can be read from LU0/1LSR[5].
Page 380
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 interrupt handler routine can determine the cause of the interrupt and how to clear the active interrupt. The LU0/1IIR must be read in order to clear the interrupt prior to exiting the Interrupt Service Routine.
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 7.3.6 LIN/UARTn Line Control Register The LU0/1LCR determines the format of the data character that is to be transmitted or received. Table 326. LIN/UARTn Line Control Register (LU0LCR - address 0xE008 901C,...
Page 383
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Table 327. LIN/UARTn Line Status Register (LU0LSR - address 0xE008 9024, LU1LSR - 0xE008 A024, Read Only) bit description Bit Symbol Value Description Reset Value Transmitter TEMT is set when both LU0/1THR and LU0/1TSR are empty;...
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 Table 327. LIN/UARTn Line Status Register (LU0LSR - address 0xE008 9024, LU1LSR - 0xE008 A024, Read Only) bit description Bit Symbol Value Description Reset Value Receiver LU0/1LSR0 is set when the LU0/1RBR holds an unread Data Ready character and is cleared when the RBR FIFO is empty.
Page 385
UM10316 NXP Semiconductors Chapter 22: LPC29xx LIN/UART 0/1 The example uses hardware support from the LIN master, so the software ID parity (SWPA) and the checksum (SWCS) are generated automatically. LIN master interrupts are used for message reception and transmission.
UM10316 Chapter 23: LPC29xx I2C-interface Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. Features • C0 and I C1 use standard I/O pins with bit rates of up to 400 kbit/s (Fast I C-bus) and do not support powering off of individual devices connected to the same bus lines.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface with a STOP condition or with a repeated START condition. Since a repeated START condition is also the beginning of the next serial transfer, the I C bus will not be released. Each of the two I...
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface entered so that a possible slave operation is not interrupted. If bus arbitration is lost in the master mode, the I C block switches to the slave mode immediately and can detect its own slave address in the same serial transfer.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 6.2 Master Receiver mode In the master receiver mode, data is received from a slave transmitter. The transfer is initiated in the same way as in the master transmitter mode. When the START condition...
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 333. I2CnCONSET used to configure Slave mode Symbol I2EN Value I2EN must be set to 1 to enable the I C function. AA bit must be set to 1 to acknowledge its own slave address or the general call address. The STA, STO and SI bits are set to 0.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface SLAVE ADDRESS DATA DATA “0” - write “1” - read data transferred (n Bytes + Acknowledge) A = Acknowledge (SDA low) from Master to Slave A = Not acknowledge (SDA high) from Slave to Master...
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 7.3 Address mask registers, MASK0 to MASK3 The four mask registers each contain seven active bits (7:1). Any bit in these registers which is set to ‘1’ will cause an automatic compare on the corresponding bit of the received address when it is compared to the ADDRn register associated with that mask register.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface SDA line SCL line (1) A device transmits serial data. (2) Another device overrules a logic 1 (dotted line), transmitted by this I C master, by pulling the SDA line low. Arbitration is lost, and this I C enters Slave Receiver mode.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface via the I C Clock Control Registers. See the description of the I2CSCLL and I2CSCLH registers for details. The output clock pulses have a duty cycle as programmed unless the bus is synchronizing with other SCL clock sources as described above.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 334. Register overview: I2C (base address 0xE008 2000 (I2C0) and 0xE008 3000 (I2C1)) Name Access Address Description Reset offset value 0x0C I2C Slave Address Register. Contains the 7 bit slave address for operation of...
Page 397
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 335. I C Control Set Register (I2C[0/1]CONSET - addresses: 0xE008 2000, 0xE008 3000) bit description Bit Symbol Description Reset Value Reserved. User software should not write ones to reserved bits. The value read from a reserved bit is not defined.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface SI is the I C Interrupt Flag. This bit is set when the I C state changes. However, entering state F8 does not set SI since there is nothing for an interrupt service routine to do in that case.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 337. I C Data Register ( I2C[0/1]DAT - addresses 0xE008 2008, 0xE008 3008) bit description Bit Symbol Description Reset Value 7:0 Data This register holds data values that have been received, or are to be transmitted.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface The values for I2SCLL and I2SCLH should not necessarily be the same. Software can set different duty cycles on SCL by setting these two registers. For example, the I C bus specification defines the SCL low time and high time at different values for a 400 kHz I rate.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface STAC is the Start flag Clear bit. Writing a 1 to this bit clears the STA bit in the I2CONSET register. Writing 0 has no effect. I2ENC is the I C Interface Disable bit. Writing a 1 to this bit clears the I2EN bit in the I2CONSET register.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Remark: The ENA_SCL and MATCH_ALL bits have no effect if the MM_ENA is ‘0’ (i.e. if the module is NOT in monitor mode). 8.8.1 Interrupt in Monitor mode All interrupts will occur as normal when the module is in monitor mode. This means that...
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 344. I C Data buffer register (I2C[0/1]DATA_BUFFER addresses - 0xE008 202C, 0xE008 302C) bit description Bit Symbol Description Reset value 7:0 Data This register holds contents of the 8 msb’s of the I2DAT shift register.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 9. Details of I C operating modes The four operating modes are: • Master Transmitter • Master Receiver • Slave Receiver • Slave Transmitter Data transfers in each mode of operation are shown in Figures to 106.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface The master transmitter mode may now be entered by setting the STA bit. The I C logic will now test the I C bus and generate a start condition as soon as the bus becomes free.
Page 406
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface The I C bus rate settings do not affect the I C block in the slave mode. I2EN must be set to logic 1 to enable the I C block. The AA bit must be set to enable the I C block to acknowledge its own slave address or the general call address.
Page 407
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface successful transmission DATA to a Slave Receiver next transfer started with a Repeated Start condition Acknowledge received after the Slave address to Master receive mode, Acknowledge entry received after a = MR Data byte...
Page 408
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface successful transmission to DATA DATA a Slave transmitter next transfer started with a Repeated Start condition Not Acknowledge received after the Slave address to Master transmit mode, entry = MT arbitration lost in...
Page 409
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface reception of the own Slave address and one DATA DATA P OR S or more Data bytes all are acknowledged last data byte received is Not P OR S acknowledged arbitration lost as...
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface reception of the own Slave address and one or more Data DATA DATA P OR S bytes all are acknowledged arbitration lost as Master and addressed as Slave last data byte transmitted. Switched...
Page 411
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 351. Master Transmitter mode Status Status of the I C bus Application software response Next action taken by I C hardware Code and hardware To/From I2DAT To I2CON (I2CSTAT) STA STO SI...
Page 412
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 352. Master Receiver mode Status Status of the I C bus Application software response Next action taken by I C hardware Code and hardware To/From I2DAT To I2CON (I2CSTAT) STA STO SI...
Page 413
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 353. Slave Receiver Mode Status Status of the I C bus Application software response Next action taken by I C hardware Code and hardware To/From I2DAT To I2CON (I2CSTAT) STA STO SI...
Page 414
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 353. Slave Receiver Mode Status Status of the I C bus Application software response Next action taken by I C hardware Code and hardware To/From I2DAT To I2CON (I2CSTAT) STA STO SI...
Page 415
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 354. Tad_105: Slave Transmitter mode Status Status of the I C bus Application software response Next action taken by I C hardware Code and hardware To/From I2DAT To I2CON (I2CSTAT) STA STO SI...
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 9.5 Miscellaneous states There are two I2STAT codes that do not correspond to a defined I C hardware state (see Table 23–355). These are discussed below. 23.9.5.1 I2STAT = 0xF8 This status code indicates that no relevant information is available because the serial interrupt flag, SI, is not yet set.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface Table 355. Miscellaneous states Status Status of the I C bus Application software response Next action taken by I C hardware Code and hardware To/From I2DAT To I2CON (I2CSTAT) STA STO SI 0xF8...
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface If an uncontrolled source generates a superfluous START or masks a STOP condition, then the I C bus stays busy indefinitely. If the STA flag is set and bus access is not obtained within a reasonable amount of time, then a forced access to the I C bus is possible.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface time limit STA flag STO flag SDA line SCL line start condition Fig 107. Forced access to a busy I C bus STA flag SDA line SCL line start condition (1) Unsuccessful attempt to send a start condition.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface The I C hardware now begins checking the I C bus for its own slave address and general call. If the general call or the own slave address is detected, an interrupt is requested and I2STAT is loaded with the appropriate state information.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 2. Set up the Slave Address to which data will be transmitted, and add the Read bit. 3. Write 0x20 to I2CONSET to set the STA bit. 4. Set up the Master Receive buffer.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 4. Set up Master Transmit mode data buffer. 5. Set up Master Receive mode data buffer. 6. Initialize Master data counter. 7. Exit 10.7 Master Transmitter states 10.7.1 State : 0x18 Previous state was State 8 or State 10, Slave Address + Write has been transmitted, ACK has been received.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 10.7.5 State : 0x38 Arbitration has been lost during Slave Address + Write or data. The bus has been released and not addressed Slave mode is entered. A new Start condition will be transmitted when the bus is free again.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 1. Read data byte from I2DAT into Master Receive buffer. 2. Write 0x14 to I2CONSET to set the STO and AA bits. 3. Write 0x08 to I2CONCLR to clear the SI flag. 4. Exit 10.9 Slave Receiver states...
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 3. Set up Slave Receive mode data buffer. 4. Initialize Slave data counter. 5. Exit 10.9.5 State : 0x80 Previously addressed with own Slave Address. Data has been received and ACK has been returned. Additional data will be read.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 1. Write 0x04 to I2CONSET to set the AA bit. 2. Write 0x08 to I2CONCLR to clear the SI flag. 3. Exit 10.10 Slave Transmitter States 10.10.1 State : 0xA8 Own Slave Address + Read has been received, ACK has been returned. Data will be transmitted, ACK bit will be received.
UM10316 NXP Semiconductors Chapter 23: LPC29xx I2C-interface 3. Exit 10.10.5 State : 0xC8 The last data byte has been transmitted, ACK has been received. Not addressed Slave mode is entered. 1. Write 0x04 to I2CONSET to set the AA bit.
UM10316 Chapter 24: LPC29xx Modulation and Sampling Control Subsystem (MSCSS) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. Note that the ADC0 is available on LPC2926/27/29, LPC2930, and LPC2939 only.
Page 429
UM10316 NXP Semiconductors Chapter 24: LPC29xx Modulation and Sampling Control Subsystem The PWM_sync and trans_enable_in of PWM 0 are connected to the 4th match output of MSCSS timer 0 to start the PWM after a pre-programmed delay. This sync signal is cascaded through all PWMs, allowing a programmable delay offset between subsequent PWMs.
UM10316 NXP Semiconductors Chapter 24: LPC29xx Modulation and Sampling Control Subsystem • Capture inputs to measure time between events • Synchronization between several PWM signals • Synchronization between ADCs • Synchronization between PWMs and ADCs • Timed and synchronized renewal of settings •...
UM10316 NXP Semiconductors Chapter 24: LPC29xx Modulation and Sampling Control Subsystem To generate a sine wave, the sine period can be divided into N periods. In each of these a fixed voltage is generated via PWM0, having a much shorter period compared to the sine itself.
UM10316 Chapter 25: LPC29xx Pulse Width Modulator (PWM) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. Introduction The MSCSS contains four PWM blocks to allow generation and capture of all kinds of square waveforms.
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) the TRANS_ENA bit is not taken into account and shadowing occurs only if TRANS_EN_IN pin is high (update triggered by MSCSS Timer0 match3 output of TRANS_EN_OUT of previous PWM block). If TRANS_ENA_SEL is low shadowing is controlled via software.
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) Timer1 output Internal PWM output Fig 113.Modulation of PWM and timer carrier Figure 25–113 illustrates the carrier signal (Timer1, 50% duty cycle) the internal PWM signal and the modulated output signal of the PWM. The flowchart below shows how to...
Page 441
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) active HIGH-level on the trans_enable_in pin of the PWM. If TRANS_ENA_SEL is cleared, the trans_enable_in pin is ignored and update of the shadow registers takes place when the TRANS_ENA bit is set AND the PWM counter starts a new cycle. This happens when the counter overflows, or on an active HIGH signal on the sync_in input pin (if enabled via the SYNC_SEL bit of the MODECTL register).
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) Table 359. Bits involved in shadow register update SYNC_SEL TRANS_ENA_SEL Update of registers TRANS_ENA bit TRANS_ENA bit (master mode) trans_enable_in signal (slave mode) 5.3 PWM trap control register The APB PWM has an external asynchronous input which is used to switch the selected PWM outputs to the not-active level.
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) 5.6 PWM control register The CTRL register selects the active level for each output. It also allows mixing of the external carrier signal with the internal PWM generated signals. Table 25–363 shows the bit assignment of the CTRL register.
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) 5.8 PWM prescale register The PWM has a prescale register. The PWM counter increments after ‘PRSC + 1’ PWM clock cycles are counted. Table 25–365 shows the bit assignment of the PRSC register.
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) 5.11 PWM match active registers There are six MTCHACT registers per PWM; one for each PWM output. Each MTCHACT register can be programmed to contain the first value which is compared with the PWM counter to generate the corresponding PWM output and interrupt.
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) 5.20 PWM prescale shadow register The PRSCS register is the shadow register of the PRSC register. It mirrors the values used in the PWM domain. See Section 25–5.1 for more information on the principle of shadow registers.
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) 5.23 PWM match deactive shadow registers The MTCHDEACTS registers are the shadow registers of the MTCHDEACT registers. They mirror the values used in the PWM domain. See Section 25–5.1 for more information about the principle of the shadow registers.
Page 452
UM10316 NXP Semiconductors Chapter 25: LPC29xx Pulse Width Modulator (PWM) Table 382. PWM Match interrupt sources Register Interrupt source Description 31 to 12 unused Unused MTCHDEACT5 PWM counter value matching MTCHDEACT5 MTCHDEACT0 PWM counter value matching MTCHDEACT0 MTCHACT5 PWM counter value matching MTCHACT5...
UM10316 Chapter 26: LPC29xx Analog-to-Digital Converter (ADC) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. ADC0 is available in LPC2926/27/29, LPC2930, and LPC2939 only. 2.
UM10316 NXP Semiconductors Chapter 26: LPC29xx Analog-to-Digital Converter (ADC) running or finished. The channel configuration register (ACC) is used to define the resolution of the individual channels and to enable them. Once the conversion scan is finished the resulting conversion data can be read from the ACD registers.
UM10316 NXP Semiconductors Chapter 26: LPC29xx Analog-to-Digital Converter (ADC) 3. Pin description Table 384. ADC pins Symbol Pin name Direction Description ADC0 IN[7:0] IN0[7:0] analog input for 5.0 V ADC0, channel 7 to channel 0. ADC1/2 IN[7:0] IN1/2[7:0] analog input for 3.3 V ADC1/2, channel 7 to channel 0.
UM10316 NXP Semiconductors Chapter 26: LPC29xx Analog-to-Digital Converter (ADC) 4.7 ADC control register The ADC_CONTROL register controls the ADC operation modes. It contains three bits. • The start bit (0): when set to 1 the ADC conversion is started. •...
UM10316 Chapter 27: LPC29xx Quadrature Encoder Interface (QEI) Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. Introduction The MSCSS includes a quadrature encoder interface (QEI) with the following features: •...
UM10316 NXP Semiconductors Chapter 27: LPC29xx Quadrature Encoder Interface (QEI) 4. Functional description The QEI module interprets the two-bit gray code produced by a quadrature encoder wheel to integrate position over time and determine direction of rotation. In addition, it can capture the velocity of the encoder wheel.
UM10316 NXP Semiconductors Chapter 27: LPC29xx Quadrature Encoder Interface (QEI) Table 397. Encoder direction DIR bit DIRINV bit direction forward reverse reverse forward 4.1.2 Digital input filtering All three encoder inputs (PhA, PhB, and index) require digital filtering. The number of sample clocks is user programmable from 1 to 4,294,967,295.
UM10316 NXP Semiconductors Chapter 27: LPC29xx Quadrature Encoder Interface (QEI) Table 400. QEI Control Register (QEICON - address 0xE00C 9000) Symbol Description Reset value 4:31 reserved RESI Reset index counter. When set = 1, resets the index counter to all zeros.
UM10316 NXP Semiconductors Chapter 27: LPC29xx Quadrature Encoder Interface (QEI) Table 403. QEI Position Register (QEIPOS - address 0xE00C 900C) Symbol Description Reset value 0:31 Current position value. 6.5 QEI Maximum Position (QEIMAXPOS) This register contains the maximum value of the encoder position. In forward rotation the position register resets to zero when the position register exceeds this value.
UM10316 NXP Semiconductors Chapter 27: LPC29xx Quadrature Encoder Interface (QEI) 6.9 QEI Index Count (INXCNT) This register contains the current value of the encoder position. Increments or decrements when encoder counts occur, depending on the direction of rotation. Table 408. QEI Index Count Register (CMPOS - address 0xE00C 9020)
UM10316 NXP Semiconductors Chapter 27: LPC29xx Quadrature Encoder Interface (QEI) Table 412. QEI Velocity Register (QEIVEL - address 0xE00C 9030) Symbol Description Reset value 0:31 Current velocity pulse count. 6.14 QEI Velocity Capture (QEICAP) This register contains the most recently measured velocity of the encoder. This corresponds to the number of velocity pulses counted in the previous velocity timer period.The current velocity count is latched into this register when the velocity timer...
Page 474
UM10316 NXP Semiconductors Chapter 27: LPC29xx Quadrature Encoder Interface (QEI) Table 416. QEI Interrupt bits Symbol Description 13:31 reserved POS2REV_Int Combined position 2 and revolution count interrupt. Set when both the POS2_Int bit is set and the REV_Int is set.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM UM10316 Chapter 28: LPC29xx Flash/EEPROM Rev. 3 — 19 October 2010 User manual 1. How to read this chapter Flash configurations vary for the different LPC29xx parts. Table 417. Feature overview Part Flash size...
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM The flash memory consists of the embedded flash memory (flash), EEPROM, and a controller (the FMC) to control access to both. The EEPROM for the LPC29xx contains one 16 kB EEPROM block. The controller can be accessed in two ways: either by register...
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Normally the sectors are protected against write actions. Before a write is started, the corresponding sector(s) must be unprotected, after which protection can be enabled again. Protection is automatically enabled on a reset. During a write (erase/burn) operation the internal clock of the flash must be enabled.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Enable flash clock Unprotect sectors Write data to page for each page to be programmed Wait for burning Start burning page Disable flash clock to finish Fig 120. Flash-memory burn sequence 2.4 Flash signature generation The flash module contains a built-in signature generator.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Generation of an interrupt can be enabled (INT_SET_ENABLE register) or disabled (INT_CLR_ENABLE register) for each of these interrupt sources. The interrupt status is always available even if the corresponding interrupt is disabled. INT_STATUS indicates the raw, unmasked interrupt status.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM For every sector in flash memory there is a corresponding flash-word in the index sector that defines whether it is secured or not. Table 28–421 shows the link between index sector flash-words and sectors in flash memory.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM really updating the memory, but only updating the temporary data register called the “page register”. The page register needs to be written with minimum 1 byte and maximum 8 bytes before the second operation which is called “erase/program” in this document can be used to actually update the non-volatile memory.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM After the reset period the EEPROM devices will initialize themselves. Therefore the first 2 bytes (containing trimming information) of the last (protected) page of every EEPROM device will be read. The information that is read will be used as input values of the EEPROM devices, it will be ignored by the controller and is not visible on the AHB/VPB bus.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM A write operation causes an automatic post-increment of the address. This allows consecutive writes to the page register without the need of writing a new address for every write operation. Of course the address register could be written with another address value to write to another location.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Programming the page into memory takes a long time, therefore the corresponding interrupt can be enabled or the interrupt status bit can be polled to avoid stalling of the system bus. An erase/program operation starts by providing the MSBs of the address that selects the page in memory of a device.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM first read operation is started as result of writing the command register. The following read operations are started as result of reading the read data register to obtain the result of the previous read operations.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Polling is the easiest way to detect completion of an operation. This method is also used in the previous examples. 3. Register overview Table 423. Register overview: FMC (base address 0x2020 0000) Name...
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM 3.1 Flash memory control register The flash memory control register (FCTR) is used to select read modes and to control the programming of flash memory. Flash memory has data latches to store the data that is to be programmed into it, so that the data-latch contents can be read instead of reading the flash memory contents.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Table 424. FCTR register bit description (FTCR, address: 0x2020 0000) …continued * = reset value Symbol Access Value Description FS_WPB Program and erase protection. Program and erase enabled. Program and erase disabled. FS_ISS Index-sector selection.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM 3.2 Flash memory program-time register The flash memory program-time register (FPTR) controls the timer for burning and erasing the flash memory. It also allows reading of the remaining burn or erase time. A built-in timer is used to control the burn time or erase time. The timer is started by writing the burn or erase time to the timer register FPTR.TR, and by enabling it through...
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM To eliminate the delay associated with synchronizing flash-read data, a predefined number of wait-states must be programmed. These depend on flash-memory response time and system clock period. The minimum wait-states value can be calculated with the...
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Table 28–428 shows the bit assignment of the FCRA register. Table 428. FCRA register bit description (FCRA, address: 0x2020 001C) * = reset value Symbol Access Value Description 31 to 12 reserved Reserved; do not modify. Read as logic 0...
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM 3.7 Flash-memory BIST signature registers The flash-memory BIST signature registers return signatures as produced by the embedded signature generator. There is a 128-bit signature reflected by the four registers FMSW0, FMSW1, FMSW2 and FMSW3. The 16-bit signature is reflected by the FMS16 register.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Table 436. EEPROM command register bit description (EECMD - address 0x2020 0080) Bits Access Reset Field name Description value 31:5 reserved PAR_ACCESS Parallel access 0: no parallel access 1: the selected write or erase/program operation (no read!) is performed in parallel on all devices.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM 3.10 EEPROM write data register The EEPROM write data register is used to write data into the page register (write operations). Writing this register will start the write operation as side-effect. If the post-increment bit in the command register is set, consecutive writes to this register can be done to write a burst of data.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM 3.12 EEPROM wait state register The EEPROM controller has no awareness of absolute time, while for EEPROM operations several minimum absolute timing constraints have to be met. Therefore it can only derive time from its clock by frequency division. The user must program the wait state fields to appropriate values in this wait state register.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM wait state 1 wait state 2 wait state 3 su_a_we_n VALID DATA VALID DATA VALID DATA su_di_we_n VALID DATA VALID DATA VALID DATA BE_N su_be_n_we_n BE_N WE_N hw_we_n WE_N h_i_we_n Fig 127. Wait states in a write operation 3.13 EEPROM clock divider register...
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Table 444. EEPROM BIST stop address register bit description (EEMSSTOP - address 0x2020 00A0) Bits Access Reset Field name Description value STRTBIST BIST start bit Setting this bit will start the BIST. This bit is self-clearing.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Table 447. Un(protect) trigger LOADREQ PROGREQ (un)protect A sector gets protected by writing an odd value to its base address, followed by the same trigger as for unprotecting. Although the flash module does not need the CRA clock to select a sector for (un)protecting, the CRA clock must already be enabled to ensure an active APB clock.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM Although the flash module does not need the CRA clock to select a sector for erasure, the CRA clock must already be enabled to ensure an active APB clock. 4.1.4 Presetting data latches When only a part of a page has to be programmed, the data latches for the rest of the page must be preset to logical 1’s.
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM ⋅ ⋅ ≥ 512 FPTR.TR tlw_web_write which is true for: tlw_web_write FPTR.TR ----------------------------------- - ⋅ 512 t The burning is started by writing a trigger value to the FCTR register. Table 452. Burn trigger value...
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM tp_cl_ry_rr × MISR duration ----------------------------- FMSSTOP - FMSSTART + 1 clock period When signature generation is triggered via AHB or VPB, the duration is expressed in ahb_clk cycles. Polling the INT_STATUS.END_OF_MISR bit can also be used to check the completion of the signature generation.
Page 508
UM10316 NXP Semiconductors Chapter 28: LPC29xx Flash/EEPROM sign = 0 FOR address = FMSTART.FMSTART TO FMSTOP.FMSTOP FOR i = 0 TO 126 nextSign[i] = f_Q[address][i] XOR sign[i+1] nextSign[127] = f_Q[address][127] XOR sign[0] XOR sign[2] XOR sign[27] XOR sign[29] sign = nextSign signature128 = sign Fig 130.
UM10316 Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. Introduction The DMA controller allows peripheral-to memory, memory-to-peripheral, peripheral-to-peripheral, and memory-to-memory transactions.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller • Raw interrupt status. The DMA error and DMA count raw interrupt status can be read prior to masking. 4. Functional description This section describes the major functional blocks of the DMA Controller.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 4.1.4 Channel logic and channel register bank The channel logic and channel register bank contains registers and logic required for each DMA channel. 4.1.5 Interrupt request The interrupt request generates the interrupt to the ARM processor.
Page 512
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller Table 453. Endian behavior Source Destination Source Destination Source Source data Destination Destination data endian endian width width transfer transfer no/byte lane no/byte lane Little Little 1/[7:0] 1/[7:0] 21212121...
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 4.1.7 Channel hardware Each stream is supported by a dedicated hardware channel, including source and destination controllers, as well as a FIFO. This enables better latency than a DMA controller with only a single hardware channel shared between several DMA streams and simplifies the control logic.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 4.2.1 DMA request signals The DMA request signals are used by peripherals to request a data transfer. The DMA request signals indicate whether a single or burst transfer of data is required and whether the transfer is the last in the data packet.
Page 516
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller Table 455. Register overview: GPDMA (base address 0xE014 0000) …continued Name Access Address Description Reset state offset DMACSoftLSReq 0x02C DMA Software Last Single Request Register DMACConfig 0x030 DMA Configuration Register...
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 5.3 DMA Interrupt Terminal Count Request Clear Register (DMACIntTCClear - 0xE014 0008) The DMACIntTCClear Register is write-only and clears one or more terminal count interrupt requests. When writing to this register, each data bit that is set HIGH causes the corresponding bit in the status register (DMACIntTCStat) to be cleared.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 5.6 DMA Raw Interrupt Terminal Count Status Register (DMACRawIntTCStat - 0xE014 0014) The DMACRawIntTCStat Register is read-only and indicates which DMA channel is requesting a transfer complete (terminal count interrupt) prior to masking. (Note: the DMACIntTCStat Register contains the same information after masking.) A HIGH bit...
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 5.9 DMA Software Burst Request Register (DMACSoftBReq - 0xE014 0020) The DMACSoftBReq Register is read/write and enables DMA burst requests to be generated by software. A DMA request can be generated for each source by writing a 1 to the corresponding register bit.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller Table 466. DMA Software Last Burst Request Register (DMACSoftLBReq - 0xE014 0028) Name Function 31:16 Reserved. Read undefined. Write reserved bits as zero. 15:0 SoftLBReq Software last burst request flags for each of 16 possible sources. Each bit represents one DMA request line or peripheral function: 0 - writing 0 has no effect.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 5.14 DMA Synchronization Register (DMACSync - 0xE014 0034) The DMACSync Register is read/write and enables or disables synchronization logic for the DMA request signals. The DMA request signals consist of the DMACBREQ[15:0], DMACSREQ[15:0], DMACLBREQ[15:0], and DMACLSREQ[15:0].
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 5.19.1 Protection and access information AHB access information is provided to the source and destination peripherals when a transfer occurs. The transfer information is provided by programming the DMA channel (the Prot bits of the DMACCxControl Register, and the Lock bit of the DMACCxConfig Register).
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller Table 473. DMA channel control registers (DMACCxControl - 0xE014 01xC) …continued Name Function 20:18 SWidth Source transfer width. Transfers wider than the AHB master bus width are illegal. The source and destination widths can be different from each other.
Page 526
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller Table 474. Channel Configuration registers (DMACCxConfig - 0xE014 01x0) Name Function 31:19 Reserved Reserved, do not modify, masked on read. Halt: 0 = enable DMA requests. 1 = ignore further source DMA requests.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 5.20.1 Lock control The lock control may set the lock bit by writing a 1 to bit 16 of the DMACCxConfig Register. When a burst occurs, the AHB arbiter will not de-grant the master during the burst until the lock is deasserted.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 6.1.4 Disabling a DMA channel A DMA channel can be disabled in three ways: • By writing directly to the channel enable bit. Any outstanding data in the FIFO’s is lost if this method is used.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 7. Write the channel configuration information into the DMACCxConfig register. If the enable bit is set then the DMA channel is automatically enabled. 6.2 Flow control The peripheral that controls the length of the packet is known as the flow controller. The flow controller is usually the DMA Controller where the packet length is programmed by software before the DMA channel is enabled.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 6.2.1 Peripheral-to-memory or memory-to-peripheral DMA flow For a peripheral-to-memory or memory-to-peripheral DMA flow, the following sequence occurs: 1. Program and enable the DMA channel. 2. Wait for a DMA request.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 9. If the transfer has completed it is indicated by the transfer count reaching 0 if the DMA Controller is performing flow control, or by the sending a DMA request if the peripheral is performing flow control.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller 1. Read the DMACIntTCStat Register to determine whether the interrupt was generated due to the end of the transfer (terminal count). A HIGH bit indicates that the transfer completed. If more than one request is active, it is recommended that the highest priority channels be checked first.
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller The data to be transferred described by a LLI (referred to as the packet of data) usually requires one or more DMA bursts (to each of the source and destination).
Page 534
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller Fig 132. LLI example The first LLI, stored at 0x20000, defines the first block of data to be transferred, which is the data stored between addresses 0x0A200 and 0x0AE00: •...
Page 535
UM10316 NXP Semiconductors Chapter 29: LPC29xx General Purpose DMA (GPDMA) controller Because the next LLI address is set to zero, this is the last descriptor, and the DMA channel is disabled after transferring the last item of data. The channel is probably set to generate an interrupt at this point to indicate to the ARM processor that the channel can be reprogrammed.
UM10316 Chapter 30: LPC29xx ETM/ETB interface Rev. 3 — 19 October 2010 User manual 1. How to read this chapter The contents of this chapter apply to all LPC29xx parts. 2. Features • Closely tracks the instructions that the ARM core is executing. •...
UM10316 Chapter 31: Supplementary information Rev. 3 — 19 October 2010 User manual 31.1 Abbreviations Table 478. Abbreviations Acronym Description Analog to Digital Converter BEMF Back Electromotive Force BIST Built-In Self Test BLDCM Brushless Direct Current Motor BSDL Boundary-Scan Description Language Controller Area Network, see Ref.
UM10316 NXP Semiconductors Chapter 31: Supplementary information 31.2 Glossary ADC — Analog to Digital Converter; converts an analog input value to a discrete integer value. Atomic action — A number of software instructions executed without the possibility to interrupt them. A common solution is to disable the interrupts before this instruction sequence, and to restore the interrupt allowance afterwards.
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...
Page 553
UM10316 NXP Semiconductors Chapter 31: Supplementary information 31.6 Figures Fig 1. LPC2917/19/01 block diagram ....8 Fig 49. LPC29xx USB OTG port configuration: USB port 1 Fig 2.
Page 554
UM10316 NXP Semiconductors Chapter 31: Supplementary information Fig 93. I C bus configuration .....387 Fig 94. Format in the Master Transmitter mode..388 Fig 95.
UM10316 NXP Semiconductors Chapter 31: Supplementary information 31.7 Contents Chapter 1: LPC29xx Introductory information Introduction ......3 Block diagram .
Page 556
UM10316 NXP Semiconductors Chapter 31: Supplementary information Chapter 5: LPC29xx Power Management Unit (PMU) How to read this chapter ....62 Register overview ..... . 65 Power mode register (PM) .
Page 557
UM10316 NXP Semiconductors Chapter 31: Supplementary information Chapter 12: LPC29xx external Static Memory Controller (SMC) How to read this chapter ....140 Bank output enable assertion-delay control register .
Page 558
UM10316 NXP Semiconductors Chapter 31: Supplementary information 9.7.9 USB DMA Interrupt Enable register 13.3 Data transfer for IN endpoints ... 197 (USBDMAIntEn - 0xE010 0294) ..179 DMA operation.
Page 559
UM10316 NXP Semiconductors Chapter 31: Supplementary information Chapter 14: LPC29xx USB Host controller How to read this chapter ....212 Pin description ..... . . 213 3.1.1...
Page 560
UM10316 NXP Semiconductors Chapter 31: Supplementary information Chapter 18: LPC29xx SPI0/1/2 How to read this chapter ....255 SPI FIFO data register ....261 SPI receive FIFO POP register .
Need help?
Do you have a question about the LPC29 Series and is the answer not in the manual?
Questions and answers