Professional Documents
Culture Documents
1 Day Arm 20071088
1 Day Arm 20071088
Agenda
9:30 LPC2000 Technical Training Part I
- Introduzione
- LPC2000 devices and roadmaps dev tools. I nuovi dispositivi della
famiglia LPC2300 e LPC2400. Novit per il 2007
Break
- Presentazione dell'Architettura ARM7 (mappa di memoria, system
control, peripherals)
12:30 Pranzo
13:30 LPC2000 Technical Training Part II
- Inizializzazione delle periferiche di sistema
PLL, Vector Interrupt Controller e USB
- presentazioni di esempi con tool Keil e scheda di valutazione Keil
Break
- Implementazone dellarchitettura ARM7 nella famiglia LPC23/24
- Q&A
17:30 Chiusura
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Throughput
100
10
LPC3000
ARM926EJ
LPC2000
ARM7TDMI-S
16-bit XA
8-bit
16-bit
LPC900 2-Clock
LPC700 6-Clock
1
6-Clock MX
C51X2 6-Clock
C51 12-Clock
Memory Size
2 KB
64 KB
1 MB
>16 MB
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC900 Family
3V Flash
MOS34 / ASMC
Planned
Embedded
Flash
CMOS90
LPC2000 Family
ARM7S-TDMI
1.8V Flash
MOS34 / SSMC
Crolles2
ARM926EJ
CMOS90
Crolles2
0.5
0.4
0.35
90n
ARM1156EJ
CMOS65
Crolles2
65n
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Standard Microcontroller
Strategy Summary
Develop Innovative and Cost Effective Products
Focus on 16/32-bit market with wide range
of ARM7 & ARM9 based products
Expand the successful LPC Family approach:
- New peripherals like USB, Ethernet, .......
Use highly competitive flash based processes:
- 0.35 m and 0.18 m Flash in production
- Shrink path down to 0.14 m
- First products in 90nm in 2005
Introduction of innovative packages:
- Chip scale packages like HVSON10, TFBGA256
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC2000 Family
16/32-bit ARM7TDMI-S Products
ARM Microcontrollers
NXP has developed a family of ARM-based Microcontrollers
For
- Low-Cost High Volume Applications
With
- Embedded Flash and SRAM
- On-board AMBA-bus Peripherals (Adv. C Bus Architecture)
- Real-Time Deterministic behavior (no Cache required)
-High performance NXP specific Flash Memory matrix
-and access design
- Full Debug, Real-time Monitoring and Trace facilities
To
- Continue on from our successful 8-bit 80C51 Family
- Enable new low-cost 16/32-bit Microcontroller-based applications
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
13 mm
LPC3000
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ARM Volume in
Y2004: 190 MU
300
200
M units
250
150
100
0
7
05
03
01
02
04
06
0
20
20
20
20
20
20
20
0
20
0
99
19
98
19
SH MI
-7 PS
Po XX
X
w
er
P
SP
C
A
R
80 C
X
86
ST
20
+
R
M
68
K
50
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
2007
Released (28)
UART(2), I2C
SPI/SSP, LV RTC
ADC(1-2), DAC
3V single p.supply
UART(2), I2C
SPI(2), RTC
ADC, CAN
Flash Security
1.8V and 3.3 V
I2C
UART(2),
SPI(2), RTC
ADC
LPC2105 /01
128K/32K
LPC2104 /01
128K/16K
LPC2101/2/3
8/16/32K/Flsh
2/4/8KRam
ADC,LV,RTC
48pins
UART(2),
I2C(2), SPI,
SPI/SSP, RTC,
ADC
Flash Security
LPC2146
LPC2129 /01 LPC2136 /01
256K/32K+8K
256K/16K
256K/32K
USB
ADC(2), DAC
CAN (2)
ADC(2), DAC
LPC2144
LPC2124 /01 LPC2134 /01
128K/16K+8K
128K/16K
256K/16K
USB
ADC(2), DAC
ADC
ADC(2), DAC
LPC2114 /01
128K/16K
ADC
LPC2132 /01
64K/16K
ADC, DAC
LPC2131 /01
LPC2142
64K/16K+8K
USB
ADC, DAC
LPC2141
32K/8K
ADC
32K/8K+8K
USB
ADC
64pins
64pins
UART(2), I2C
SPI(2), RTC
ADC, CAN
UART(2), I2C
SPI, SPI/SSP,
LV RTC
ADC(1-2), DAC
10b-ADC
Flash Security
1.8V and 3.3 V UART(2),
+ external bus
UART(4), I2C(3)
SPI(1), SSP(2),
LV RTC,
ADC, DAC,
PWM(2),
USB full
I2C10/100 Ethernet,
CAN(2), IRC
SPI(2), RTC
ADC, CAN
LPC2220
0K/64K
ADC
LPC2210 /01
H2 06
/01
LPC2148
LPC2194 /01 LPC2138 /01
512K/32K+8K
256K/16K
512K/32K
USB
ADC(2), DAC
CAN (4)
ADC(2), DAC
LPC2119 /01
128K/16K
CAN (2)
UART(4)
2x AHB + Ethernet
+Single p supply
3.3V
Minibus
LPC2294 /01
256K/16K
CAN (4)
LPC2292 /01
256K/16K
CAN (2)
LPC2290 /01
0K/16K
ADC
0K/16K
CAN (2)
64pins
144pins
144pins
UART(2), I2C
SPI(2), USB,
LV RTC
ADC, DAC
UART(2), I2C
SPI(2), RTC
ADC
UART(2), I2C
SPI(2), RTC
ADC, CAN(2/4)
LPC2378
512K/58K
Ethernet,
USB, CAN,
MiniBus, MMC
LPC2368
512K/58K
Ethernet,
USB, CAN,
MMC
H1 2007
ARM7TDMI-S : LPC2000
ARM926EJ : LPC3000
+external bus
+ USB
OTG/Host
180 - 208 pins
UART(4), I2C(3)
SPI(1), SSP(2),
LV RTC,
ADC, DAC,
+ external
PWM(2),
bus
USB-OTG
10/100 Ethernet, 16 bits codec
CAN(2), IRC,
USB High
External Bus
speed device
LPC2366
256K/58K
Ethernet,
USB, CAN
LPC2468
512K/98K
Ethernet,
USB, CAN
LPC2364
128K/34K
Ethernet,
USB, CAN
LPC2458
512K/98K
Ethernet,
USB, CAN
LPC2888
Floating
point
coprocessor
USB Host full
speed
LPC3190
1M/64K
USB HS
LCD int
IIS,SPI
Ethernet
LPC2880
LPC3180
0M/64K
USB HS
64K RAM,
32+32K Cache
180 pins
Flex. Suppl.
HS USB,
Flex. Ext.
Mem.
LCDcontr.Interf
.
320 pins
ADC, 2xI2C,
2xSPI,
7xUART,USBOTG.
Functionality
Recently
released
Roadmap
LPC31xx: ARM9
SPI
LPC3190
IIS interface
Ethernet MAC controller
LCD interface
LPC2468
LPC2368 LPC2378
LPC23xx: ARM7
LPC24xx: ARM7
Ethernet (MII+RMII)
USB FS Device
USB Host/OTG LPC2458
2 x CAN
Ext. Memory (SDRAM, SRAM)
96K SRAM
USB FS Device
2 x CAN
LPC3000
LPC3000
LPC3000
LPC3000
LPC2000
LPC2000
LPC2000
LCD
LCD
LCD
Recently released
LPC22xx/01
New releases
LPC21xx/01
2007
LPC210x/01
Time
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Parts
Samples
LPC2104FBD48/00
Yes
LPC2105FBD48/00
Yes
LPC2106FBD48/00
Yes
LPC2106FHN48/00
Yes
LPC2114FBD64/00
Yes
LPC2124FBD64/00
Yes
LPC2119FBD64/00
Yes
LPC2129FBD64/00
Yes
LPC2194HBD64/00
Yes
LPC2212FBD144/00
Yes
LPC2214FBD144/00
Yes
LPC2292FBD144/00
Yes
LPC2292FET144/00
Yes
LPC2294HBD144/00
Yes
Status
RFS
RFS
RFS
RFS
RFS
RFS
RFS
RFS
RFS
RFS
RFS
RFS
RFS
RFS
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Parts
Samples
LPC2104FBD48/01
No
LPC2105FBD48/01
No
LPC2106FBD48/01
No
LPC2106FHN48/01
No
LPC2114FBD64/01
No
LPC2124FBD64/01
No
LPC2119FBD64/01
No
LPC2129FBD64/01
No
LPC2131FBD64/01
Yes
LPC2132FBD64/01
Yes
LPC2132FHN64/01
Yes
LPC2134FBD64/01
Yes
LPC2136FBD64/01
Yes
LPC2138FBD64/01
Yes
LPC2138FHN64/01
No
LPC2194HBD64/01
No
LPC2210FBD144/01
Yes
LPC2290FBD144/01
Yes
LPC2212FBD144/01
No
LPC2214FBD144/01
No
LPC2292FET144/01
No
LPC2294HBD144/01
No
Status
Dev
Dev
Dev
Dev
Dev
Dev
Dev
Dev
RFS
RFS
RFS
RFS
RFS
RFS
RFS
Dev
RFS
RFS
Dev
Dev
Dev
Dev
RFS date
H1/07
H1/07
H1/07
H1/07
H1/07
H1/07
H1/07
H1/07
Now
Now
Now
Now
Now
Now
Now
H1/07
Now
Now
H1/07
H1/07
H1/07
H1/07
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Test/Debug
Memory
Memory
Accelerator
Accelerator
Vss
Vdd
RST
X2
System
System
Functions
Functions
PLL
PLL
System Clock
ARM
ARM 7TDMI-S
7TDMI-S
Local Bus
Real
Real Time
Time
Clock
Clock
Trace
Trace
Watchdog
Watchdog
Timer
Timer
AHBBridge
Bridge
AHB
SRAM
SRAM
Controller
Controller
X1
TDO
TDI
TCK
128
128KB
KB
FLASH
FLASH
TMS
16-64KB
16-64KB
SRAM
SRAM
RTCK
TRST
Vectored
VectoredInterrupt
Interrupt
Controller
Controller
AHB
AHBto
toVPB
VPBBridge
Bridge
PWM
PWM
PWM1 - 6
Timer1
Timer1
MAT1.0-3
Timer0
Timer0
CAP1.0-3
UART1
UART1
MAT0.0-2
UART0
UART0
CAP0.0-2
SSEL
MOSI
MISO
SCK
SPI
SPI Port
Port
8 pins
GPIO
GPIO
GPIO
SDA
SCL
II22CC
2 pins
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC2101/2/3 Blocks
2/4/8Kb
Fast
Fast
GPIO
GPIO
Local Bus
PLL
PLL
Real
Real Time
Time
Clock
Clock
Vbatt
TDO
ARM
ARM 7TDMI-S
7TDMI-S
AHB Bus
AHB
AHBto
toVPB
VPB
Bridge
Bridge
Watchdog
Watchdog
Timer
Timer
RTC
Osc
4 x MAT3
3 x MAT2
3 x CAP2
4 x MAT1
4 x CAP1
3 x MAT0
Timer0
Timer0 Timer1
Timer1 Timer2
Timer2 Timer3
Timer3
32-bit
32-bit 32-bit
32-bit 16-bit
16-bit 16-bit
16-bit
3 x CAP0
UART1
UART1
8 pins
UART0
UART0
2 pins
SPI/SSP
SPI/SSP
SSEL
SPI
SPI
SCK
MISO
MOSI
SDA
22xxI2I2CC
SCL
GPIO
GPIO
GPIO
AVDD
AVSS
ADC
ADC
10-bits
10-bits
8 Inputs
RTCX1
RTCX2
MOSI
SSEL
X1
X2
ETM
ETM
System
System
Functions
Functions
SCK
MISO
RST
TDI
EICE
Vectored
Vectored
Interrupt
Interrupt
Controller
Controller
AHB Bus
Internal
Internal Flash
Flash
Controller
Controller
SRAM
SRAM
Controller
Controller
TMS
Bootloader,
RealMonitor
TRST
Fast GPIO
FLASH
FLASH
SRAM
SRAM
TCK
8/16/32Kb
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
16KB
16KB
SRAM
SRAM
128/256KB*
128/256KB*
FLASH
FLASH
JTAG
10
E-ICE
Flash
Flash Controller
Controller
// MAM
MAM
RT-Trace
ETM
ETM
ARM
ARM 7TDMI-S
7TDMI-S
System Clock
Real
Real Time
Time
Clock
Clock
System
System
Functions
Functions
PLL
PLL
AHBBridge
Bridge
AHB
SRAM
SRAM
Controller
Controller
Package:
LQFP64
LPC2119, LPC2129,LPC2194
Vss
256KB
Vdd
LPC2129,94
RST
128KB
X2
LPC2119
X1
*Flash size:
AHB Bus
Vectored
Vectored
Interrupt
Interrupt
Controller
Controller
Watchdog
Watchdog
Timer
Timer
AHB
AHBto
toVPB
VPB
Bridge
Bridge
10-bit
10-bit ADC
ADC
AIN0 - 3
RD2
CAN2
CAN2
TD2
RD1
CAN1
CAN1
TD1
PWM
PWM
PWM1 - 6
Timer1
Timer1
MAT1.0-3
GPIO
Timer0
Timer0
CAP1.0-3
GPIO
GPIO
MAT0.0-3
UART0
UART0
CAP0.0-3
UART1
UART1
8 pins
SSEL
MOSI
MISO
SPI
SPI Port
Port
SCK
SDA
SCL
II22CC
8 pins
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
SRAM
SRAM
Controller
Controller
Flash
Flash Controller
Controller
// MAM
MAM
ARM7TDMI-S
ARM7TDMI-S
PLL
PLL
System
Clock
D31:0
A23:0
WE
AHB
Vectored
VectoredInterrupt
Interrupt
Controller
Controller
Watchdog
Watchdog
Timer
Timer
OE
External
External Memory
Memory
Controller
Controller
AHB
AHB
Bridge
Bridge
System
System
Functions
Functions
ETM
ETM
BLS3:0
E-ICE
RT-Trace
CS3:0
10
144-Pin
Packages
Vss
Vdd
JTAG
RST
256KB
256KB
FLASH
FLASH
X2
16KB
16KB
SRAM
SRAM
X1
LPC2292, LPC2294
n: LPC2292 = 2
LPC2294 = 4
AHB
AHBto
toVPB
VPB
Bridge
Bridge
10-bit
10-bit
ADC
ADC
AIN0 - 7
CANn
CANn
RDn
...
TDn
RD1
CAN1
CAN1
TD1
PWM
PWM
PWM1 - 6
Timer1
Timer1
MAT1.0-3
GPIO
Timer0
Timer0
CAP1.0-3
GPIO
GPIO
MAT0.0-3
UART0
UART0
CAP0.0-3
UART1
UART1
8 pins
SPI1
SPI1
4 pins
SPI0
SPI0
4 pins
SDA
SCL
II22CC
8 pins
VPB
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Test/Debug
SRAM
SRAM
Controller
Controller
Memory
Memory
Accelerator
Accelerator
Trace
Trace
Vss
Vdd
RST
System Clock
AHB
Local Bus
Real
Real Time
Time
Clock
Clock
System
System
Functions
Functions
PLL
PLL
ARM
ARM 7TDMI-S
7TDMI-S
X2
X1
TDO
TDI
TCK
TMS
0/128/256
0/128/256KB
KB
FLASH
FLASH
TRST
16KB
16KB//64KB
64KB
SRAM
SRAM
RTCK
Vectored
Vectored
Interrupt
Interrupt
Controller
Controller
AHB
AHBto
toVPB
VPBBridge
Bridge
Watchdog
Watchdog
Timer
Timer
External
External
Memory
Memory
Controller
Controller
CS 3:0
A 23:0
BLS 3:0
OE,WE
D 31:0
PWM
PWM
PWM1 - 6
Timer1
Timer1
MAT1.0-3
Timer0
Timer0
CAP1.0-3
GPIO
GPIO
MAT0.0-2
ADC
ADC
CAP0.0-2
0/2x
0/2x
CAN
CAN
GPIO
UART1
UART1
8 pins
UART0
UART0
8 pins
SSEL
MOSI
MISO
2xSPI/SSP
2xSPI/SSP
SCK
SDA
SCL
II22CC
2 pins
Package: LQFP144
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Test/Debug
SRAM
SRAM
Controller
Controller
Memory
Memory
Accelerator
Accelerator
Trace
Trace
Real
Real Time
Time
Clock
Clock
Vbat
Watchdog
Watchdog
Timer
Timer
Vss
Vdd
RST
BBrown
rownO
OututDDetect
etect
PPower
owerO
OnnRReset
eset
System Clock
Local Bus
32 kHz
System
System
Functions
Functions
PLL
PLL
ARM
ARM 7TDMI-S
7TDMI-S
X2
X1
TDO
TDI
TCK
TMS
RTCK
32512
32512KB
KB
FLASH
FLASH
832KB
832KB
SRAM
SRAM
TRST
and AHB
AHB
AHBto
toVPB
VPBBridge
Bridge
Vectored
VectoredInterrupt
Interrupt
Controller
Controller
LPC2131, LPC2132
NOT
ONLY ONE
LPC2131
PWM
PWM
PWM1 - 6
MAT1.0-3
Timer1
Timer1
CAP1.0-3
Timer0
Timer0
MAT0.0-2
GPIO
GPIO
CAP0.0-2
DAC
DAC
GPIO
ADC0/1
ADC0/1
1-10-bit
UART1
UART1
2x8 pins
UART0
UART0
8 pins
SSEL
MOSI
MISO
SSP
SSP Port
Port
SCK
SSEL
MOSI
SCK
SCL
SDA
MISO
SPI
SPI Port
Port
2
2x
2xII2CC
2 pins
Package: LQFP64/HVQFN64
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CPU operating voltage range of 3.0V to 3.6V (3.3V +/- 10%) with 5 Volt tolerant I/O
pads.
Stage 1: Vdd < 2.9V, the Brown-Out Detector (BOD) asserts an interrupt signal to the
VIC (Vectored Interrupt Controller).
Stage 2: Vdd < 2.6 V LPC213x will be reset to prevent alteration of the Flash as
operation of the various elements of the chip would otherwise become unreliable due to
low voltage.
The BOD circuit maintains this reset down below 1V, at which point the Power-On Reset
circuitry maintains the overall Reset.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Test/Debug
SRAM
SRAM
Controller
Controller
Memory
Memory
Accelerator
Accelerator
ETM
ETM
ARM
ARM 7TDMI-S
7TDMI-S
System Clock
PLL
PLL11
USB Clock
PLL
PLL22
32 kHz
Real
Real Time
Time
Clock
Clock
Vbat
Vss
Vdd
RST
System
System
Functions
Functions
BBrown
rownO
OututDDetect
etect
PPower
owerO
OnnRReset
eset
VIC
VIC
Local Bus
X2
X1
TDO
TDI
TCK
TRST
64-512
64-512KB
KB
FLASH
FLASH
16-32KB
16-32KB
SRAM
SRAM
TMS
AHB
AHBto
to
VPB
VPB
Bridge
Bridge
Watchdog
Watchdog
Timer
Timer
(LPC2148
(LPC2148only)
only)
D+
DUp_LED OR
Connect
Vbus
USB
USB2.0
2.0Full
Full
Speed
SpeedDevice
Device
w/
w/ DMA
DMA
PWM
PWM
PWM1 - 6
MAT x 8
Timer0/1
Timer0/1
CAP x 8
Modem
pins (6)
UART0/1
UART0/1
Tx/RX 0,1
DAC
DAC
1-10-bit
ADC
ADC0/1
0/1
6+8 pins
Fast
Fast I/O
I/O
GPIO
46 max
SSEL
MOSI
MISO
SSP
SSP Port
Port
SCK
SSEL
MOSI
MISO
SCK
SPI
SPI Port
Port
SDA
II22CC0/1
0/1
SCL
64-pin LQFP
CONFIDENTIAL
Spec
LPC2142
LPC2148
Internal
Flash
64 KB
512 KB
Internal
SRAM
16 KB
32 KB + 8
KB shared
10-bit ADC
1 x 6-chan
1 x 8-chan
1 x 6-chan
UARTs
2 x 16C550 2 x 16C550
(one with auto
CTS/RTS plus
fractional baud
rate divisor)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Each Channel has its own Result Register thus reducing CPU Interrupt
Overhead by a factor of 8
ADCs can Operate in Burst Mode with autonomous signal acquisition
ADCs can be synchronized (e.g. for simultaneous current & voltage
measurement) and triggered by an input pin or Timer match
ADC Inputs
ADC Clock
(CLKS Bits)
1-8
Input Scan
(SEL Bits)
ADDR0
n-bit ADC
(n Clocks/Conv)
ADDR1
ADDR7
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Philips
Atmel SAM7S64
ST STR71X
16
Control,
Interrupt,Bulk,
Isochronous
Control,
Interrupt,Bulk,
Isochronous
Control,
Interrupt,Bulk,
Isochronous
Control,
Interrupt,Bulk,
Isochronous
64 bytes
64 bytes
64 bytes
64 bytes
64 bytes
64 bytes
64 bytes
64 bytes
64 bytes
64 bytes
64 bytes
64 bytes
1023 bytes
1023 bytes
64 bytes
512 bytes
Yes
No
No
Bi-directional* Endpoints
supported
16 max/device
Modes Supported
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC2880/88 Blocks
ROM
ROM
Controller
Controller
PLLPLLUSB
USB
RTC
Osc
TDO
TDI
SEL
AHB Bus
HS
HSUSB
USB
With
With
DMA
DMA
GP
GPDMA
DMA
Controller
Controller
Watchdog
Watchdog
Timer
Timer
AHB
AHBto
toAPB
APB
Bridges
Bridges0,
0,1,
1,2,
2,33
(1)
LPC2888 only
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Stereo audio in
16bit
16bit
PWM
PWM CODEC
CODEC
PWM1 - 6
MAT1.0-3
Timer1
Timer1
CAP1.0-3
MAT0.0-3
Timer0
Timer0
CAP0.0-3
MCLK
SD/MMC
SD/MMC
card
card
MD[3:0]
RTS, CTS
2x
UART
UART
With
With
IrDA
IrDA
Txd, Rxd
SPI
SPI
IC
MOSI
LCD
LCD
SSEL
I22C
MISO
GPIO
GPIO
85x
85x
LCD Bus
ADC
ADC
10-bits
10-bits
GPIO
4 Inputs
DATO, BCKO,
DCLKO,WSO
IS
IS
In/Out
In/Out
TCK
Real
Real Time
Time
Clock
Clock
SDA
RTCX1
RTCX2
DATI
ARM
ARM 7TDMI-S
7TDMI-S
8KB
8KB Cache
Cache
SCL
X1
X2
BCKI, WSI
E-ICE
System
SystemFunctions
Functions
BO,
BO,
PLLPOR
sys
POR
RST
Vectored
Vectored
Interrupt
Interrupt
Controller
Controller
Internal
Internal Flash
Flash
Controller
Controller
SCK
SRAM
SRAM
Controller
Controller
TMS
1MB
64k
TRST
Boot
Boot
ROM
ROM
FLASH
FLASH
(1)
Local Bus
SRAM
SRAM
180 pins
LPC2800 Family
Advanced and Flexible Memory Capability:
On-chip: 1Mbyte of Flash, 64KB of RAM, and 32KB of ROM
External Memory Controller for SDRAM, NOR and NAND Flash, and SRAM
8KBytes of Cache for enhanced performance from external memory
LPC2800 Peripherals:
480 Mbits/sec High-Speed USB device with on-chip PHY
Multi-Media Card, I2S, and LCD controller interfaces
General Purpose DMA
ATA interface
LPC2800 Power Supply sub-systems:
On-chip High-efficiency Switching regulator and Linear Regulators allow:
Operation from single AA(A) Battery cell (0.9 to 1.6V)
Operation from 5V USB input
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC2300/24000 Families
32-bit ARM7 Products
512 KB
Flash
ARM7TDMI-S
Internal
SRAM
Controller
Internal
Flash
Controller
16 KB
SRAM
MII
or
RMII
AHB2
Ethernet
MAC with
DMA
16 KB
SRAM
AHB
Bridge
AHB
Bridge
AHB to
Master
Port AHB Bridge
APB
Divider
Slave
Port
RST
Xtal2
Xtal1
Trace
Signals
TDO
TDI
TCK
Test/Debug Interface
Emulation Trace
Module
64 KB
SRAM
TMS
TRST
PLL
System
Functions
System
Clock
Internal RC
Oscillator
Vectored
Interrupt
Controller
External
Memory
Controller
GP DMA
Controller
USB with
4KB RAM
& DMA
A[23:0],
D[31:0],
etc.
AHB1
D+, D-,
etc.
AHB to
APB Bridge
APB
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
External Interrupts
Capture / Compare
Timers 0, 1, 2, 3
2 x 6 x PWM
PWM0, 1
P0,1,...
Ain7:0
A/D Converter
Vbat
Power Domain 2
X1
X2
RTC
Oscillator
2 x 4 x CAP
2 x 4 x MAT
Aout
*I2S Interface
*SSP1 Interface
SCK0
MOSI0
MISO0
FS/SSEL0
SCK1
MOSI1
MISO1
FS/SSEL1
MCICLK, MCIPWR
*SD/MMC Card
Interface
MCICMD, MCIDAT3:0
UART0, 2, 3
TxD0,2,3
RxD0,2,3
D/A Converter
TxD1
2 KB Battery RAM
Real Time Clock
RXCLK, TXCLK
RXWS,TXWS
RXSDA,TXSDA
RxD1
DTR, RTS
DSR, CTS, DCD, RI
UART1
Alarm
Watchdog Timer
CAN Channels 1, 2
RX2, 1
TX2, 1
System Control
I2C Interfaces 0, 1, 2
SCL0, 1, 2
SDA0, 1, 2
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Features: Core
72 MHz ARM7TDMI
Advanced Vectored Interrupt Controller (32 vectors, 16 priorities)
Single 3.3V power supply (3.0V to 3.6V).
4 reduced power modes, Idle, Sleep, Power Down, and Deep Power Down.
Processor wakeup from Power Down mode via any interrupt able to operate during
Power Down mode (includes external & GPIO interrupts, RTC, Ethernet wakeup).
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
42
CONFIDENTIAL
43
44
Ethernet Connection to
Backbone and
Remote Networks
Micro
with
Embedded
Flash
AHB Bus
bandwidth %
Cumulative
AHB
Bandwidth
Ethernet
50
50
USB
54
Ext, DRAM
20
74
SSP
79
I2C(2)
81
CAN (2)
84
UARTS(2)
88
ADC
96
CONFIDENTIAL
45
512 KB
Flash
Trace
Signals
TDI
TDO
TCK
Test/Debug Interface
ARM7TDMI-S
Internal
SRAM
Controller
Internal
Flash
Controller
Emulation Trace
Module
64 KB
SRAM
TMS
TRST
16 KB
SRAM
AHB2
16 KB
SRAM
AHB
Bridge
AHB
Bridge
AHB to
Master
Port AHB Bridge
APB
Divider
Vectored
Interrupt
Controller
AHB1
Slave
Port
AHB to
APB Bridge
46
512 KB
Flash
Internal
SRAM
Controller
Internal
Flash
Controller
ARM7TDMI-S
AHB2
Ethernet
RMII
Ethernet
MAC with
DMA
16 KB
SRAM
AHB
Bridge
AHB
Bridge
AHB to
Master
Port AHB Bridge
APB
Divider
Slave
Port
RST
Xtal1
8 KB
SRAM
Xtal2
Trace
Signals
TDI
TDO
TCK
Test/Debug Interface
Emulation Trace
Module
32 KB
SRAM
TMS
TRST
PLL
System
Functions
System
Clock
Internal RC
Oscillator
Vectored
Interrupt
Controller
AHB1
GP DMA
Controller
USB with
4KB RAM
& DMA
D+, D-,
etc.
AHB to
APB Bridge
APB
USB
CONFIDENTIAL
47
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Power Options
Power options:
On-chip DC-DC converter supplies 1.8V power to all internal logic, except
in the RTC power domain.
1.8V power can be supplied from off-chip for some pinouts.
Power reduction modes are entered via an encoding of the IDL and PD
bits in PCON, plus an additional new power control bit.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Idle Mode
CPU is halted, reducing power used by:
The CPU itself.
Memories and their controllers used by the CPU.
Internal buses used by the CPU.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Sleep Mode
All clocks are stopped to the CPU and peripherals.
If enabled, the main oscillator and PLL are shut down.
All dynamic operation of the device is suspended.
The DC-DC converter remains operational.
The Flash memory remains on, allowing for fast wakeup.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Ethernet wakeup
(portions of the Ethernet block receive clocks from the external PHY)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Ethernet wakeup
(portions of the Ethernet block receive clocks from the external PHY)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
RTC
Oscillator
2 KB Battery RAM
Real Time Clock
Alarm
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Address Resolution Protocol (ARP), Internet Protocol (IP), Internet Control Message Protocol
(ICMP), User Datagram Protocol (UDP), Transmission Control Protocol (TCP), Dynamic Host
Configuration Protocol (DHCP) Client, Domain Name System (DNS) Client, Bootstrap Protocol
(BOOTP), Trivial File Transfer Protocol (TFTP)
CONFIDENTIAL
58
LPC24xx
More RAM
Additional GPIO
Additional PWM
CONFIDENTIAL
59
LPC24xx
Announcement on the web
Datasheets by email (LogicPG@NXP.com)
2 Devices:
LPC2458: 512KB flash, 98KB SRAM, Ext bus
(16-bit), TFBGA180
LPC2468: 512KB flash, 98KB SRAM, Ext bus
(32-bit), LQFP208 & TFBGA208
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC3000 Family
32-bit ARM9 Products
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
90nm Process
208 MHz Core freq.
1.2V core operation
3.3V I/O
CPU subsystem
ETB
ETM9
I-Cache
32kB
D-Cache
32kB
VFP9
On-Chip
Memory
ARM926EJ
Instr
NAND
Flash
Data
Mem
Stick
ROM
SD
Card
64 KB
SRAM
DRAM
control
(Tightly-Coupled Memory)
Up to 1MB SRAM
(On-Chip Memory)
Standard E-ICE
JTAG Interface
6KB ETB
(Embedded Trace Buffer)
Interrupt
Controller
DMA
Controller
Timers
Watchdog
I2C A
SysCtrl
Keyscan
PLLs
Power
control
System Functions
I2C B
A/D
RTC
Other
Peripherals
USB
OTG
UART
1-5,7
UART6
IrDA
GPIO
PWM
SPI
Communication
Peripherals
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Technology Announcement
First ARM9 family-based microcontrollers in 90nm technology
Press release done on Feb 23th during the Embedded World Show Nuremberg:
LPC3000 Family based on 90nm technology industrys first 90nm ARM9* familybased 32-bit microcontroller family.
Based on NXP Nexperia platform using the ARM926EJ-S* core
Features:
Several power management benefits
Peripherals such as integrated USB On-the-Go (OTG) and full USB Open Host
Controller Interface (OHCI) host
Multi-level NAND Flash interface
Operating speed at 200MHz
Standard communication peripherals like up to 7 UARTs, SPI, I2C, USB, real-time
clock, Ethernet - to follow.
Floating point Vector Coprocessor
100mW power consumption @200Mhz with all peripherals switched on
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
phyCORE-ARM9/LPC3180
ARM9 with Vector Floating Point Unit
Technical Features
Carrier Board in EURO-card dimensions (100 x 160 mm)
RS-232: 2x female DB-9 connectors support UART5 and UART2
USB (Host/Device/OTG) connectors:
Standard A type connector for USB host functionality, Standard B type connector for USB device functionality
miniAB type connector for OTG functionality
JTAG 2.54mm pitch, 16-pin connector for JTAG debugging interface
SD Card slot
Reset push button, Boot jumper ,2x user buttons
4x user LEDs with jumpers to separate from I/O lines
Battery receptacle for LPC3180 Real-Time Clock and SRAM back-up
Keyboard 2x8 2.54mm pitch connector for keyboard interface
PART #: PCM-031
Serial: 1 to 32 KB IC-EEPROM
PART #: PCM-031
Configuration:
208 MHz, 32 MB SDRAM,32 MB Flash, 32 KB EEPROM, USB OTG, JTAG interface
Carrier Board
PART #: KPCM-976
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Trace
TracePort
Port
Analyser
Analyser
10
JTAG
JTAG
Interface
Interface
Debugger
Trace Tools
E-ICE
(JTAG)
ETM: Embedded
Trace Macrocell
ARM7-S
with RTM
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Program/Erase Flash
Verify
Blank check
Check ID
Fill Buffer
Save HEX file
Fo more info:
http://www.esacademy.com/
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
PHYTEC phyCOREARM7/LPC229x
phyCORE-ARM7/LPC229x
PCM-023-SK-2294
10/60 MHz,
1 MB SRAM, 2 MB Flash,
2 KB EEPROM,
SMSC LAN91C111 10/100 Mbit/s
Ethernet,
JTAG interface
$199.00
http://www.phytec.com/sbc/32bit/p
clpc229x.htm
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Price: 199$
Two serial interfaces,
a speaker, analog input (via potentiometer),
two CAN interfaces,
LCD, SD card interface
USB, Ethernet,
and eight LEDs make this board a great starting point for your next ARM project.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
for LPC2378
Contains:
LPC2378 development board
IAR J-LINK-KS JTAG debugger with USB connector
IAR Embedded Workbench with a 32KB version of the IAR C/C++ Compiler
IAR PowerPac: 3 tasks (RTOS) and 1 file (Flash File System) evaluation version
20-state version of visualSTATE
lab
i
a
Av
en
e
t th
a
le
Fe
f
do
ry
a
u
br
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
SD card Connector
USB connector
LCD Module
Headphone jack
http://www.nohau.com/emularm/lpc2800.html
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ARM Emulators
JTAG emulators
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
http://www.ashling.com/datasheets/armtools.html
Jlink + Trace
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Debuggers
Pathfinder debugger for
the LP2100
http://www.ashling.com/datasheets/armtools.html
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Debuggers
Chameleon Debugger
http://signum.com/Signum.htm?p=ARM.htm
Universal Debug
Engine (UDE)
MULTI Debugger
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
RealView
Multi 2000
AsIDE
Vision3
EWARM
CrossWorks
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Compilers
ARM Compiler
http://www.arm.com/devtools/soft_dev_tools?
OpenDocument.
GHS Compiler
http://www.ghs.com/products/arm_development.html
IAR Compiler
http://www.iar.com/Products/?name=EWARM
GNU GCC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ARM RTOS
CMX
ARM,Keil
Keil ARTX
Keil
COS-II
IAR,Nohau,Keil (appnotes
available online)
FreeRTOS
http://www.freertos.org/
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
RTOS Listing
eCos
Ashling
NicheTask
ThreadX
IAR,ARM
Pumpkin Salvo
Keil
Clinux
See www.uclinux.org
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
RTOS Support
Nucleus from
Accelerated Technology
a Mentor company
ChronOS
from InterNiche
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
NXP
Virtual COM port: Maps a virtual COM port communication in a USB pipe (see
LPC2000 news group, file section)
MMC driver: MMC memory card driver, application note (see NXP web site,
microcontroller section)
IAR:
Rowley :
Free lib: EFSL http://efsl.de (FAT12/16/32 file system with short file names)
Keil and IAR examples dont require any Windows USB class driver. Windows XP
supports all mentioned class drivers. NXP supplies the Virtual COM driver for
Windows XP, IAR supplies the .inf file for the CDC windows driver
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Keil
Supports Fat 16
8.3 file naming
Part of RTL
IAR
Power PACK
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Windows FAT16/32
Filesystem APIs
USB Mass storage
class driver
Customer Application
Init_USB()
Defines
device,
interfaces,
endpoints
Open_File()
Read_File()
Write_File()
Write_mem_blk()
Read_mem_blk()
Window low-level
HOST driver
USB HOST
SD, MMC
init
USB Device
SD/MMC cards
Ex.:
EFSL,
HCC,
IAR power Pack
Keil RTX FS
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
USB books
USB Design By Example
A pratical Guide to Building I/O devices
John Hyde, Intel University Press
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC2000 forum
Started by Leon Heller, an engineering consultant from
England: The NXP LPC2100 family of ARM MCUs is
sufficiently different from other ARM variants that I decided
that a forum dedicated to it would be useful.
Direct URL http://groups.yahoo.com/group/lpc2000/
Founded
Nov 17,
2003
Already
about 4000
members!
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ARM7 Core
Software Development
System Peripherals
User Peripherals
Keil Tutorial
GNU Tutorial
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Application examples
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
http://www.jandspromotions.com/philips2005/
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Magnetometer
Charlie
Ethernet Acquisition
Flash card
NoPC
TAM-TAM
TV-Oscilloscope
Distinctive Excellence
Nuclear Weighing
Measurement
Dual-Axis Level
Sensor
LAURIN
Buckymeter
Duux Babycall
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Why ARM?
Why NXP?
First ARM7TDMI supplier with on-board flash in 0.18 m process, with the largest
ARM7 product portfolio
Memory sizes from 8k up to 1M on-chip flash
Highest flash performance with nearly zero wait states due to internal MAM (Memory
Accelerator Module)
Widest selection of devices and of the integrated peripherals: 4*CAN, 2*ADC, SPI,
I2C)
Lowest pin count and smallest packages available
Price level allows to address mid/high end 16-bit applications, and high end 8 bit
application
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On Index
Hands-On
1.
Tools Setup
2.
3.
ADC
4.
Interrupts / Timer
5.
UART / CAN
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
Compile Current File
Make Project
Rebuild Project (all)
Open Options Dialog
Start/Stop Debugging
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
Build Project
Reset
Start Debugging
Run
Halt
Step into
Step over
Performance Analyzer
Signal Analyzer
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
Add New
signal
Here: 10
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Run Program
View Variables and Registers
Hands-On
Menu:
Peripherals /
GPIO /
Port1
Zoom:
In & Out
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
Halt
Stop Debugging
Options
Make Settings:
Using JTAG/ULINK
Select Debug Tab
Use
ULINK ARM Debugger
1.
2.
Architecture
3.
Instruction Set
4.
ARM7TDMI-S
5.
Systems
6.
7.
NXP Implementation
8.
Q&A
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
2.
Architecture
3.
Instruction Set
4.
ARM7TDMI-S
5.
Systems
6.
7.
NXP Implementation
8.
Q&A
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Bus Width
ARM7 is a 32-bit architecture
Data pathes and (ARM)
instructions are 32 bits wide
Address Bus
Address Register
Incr.
Instruction
Decode &
General
Control
Registers
Mult.
Thumb
Decompression
Shifter
ALU
Data Out
Data In
Data Bus
*: from C code
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Thumb State
Set of instructions re-coded into 16 bits
Improved code density by ~ 30%
saving program memory space
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Halfword
Byte
1
Word
8 bits
1
Word
Halfword
Halfword
Halfword
Halfword
Byte
Byte
Byte
Byte
Byte
Halfword
Word
Byte
Byte
Byte
Halfword
Word
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Processor Modes
ARM has seven operating modes
1. User
2. FIQ
3. IRQ
5. System
6. Abort
7. Undefined
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Registers (1)
An ARM core has 37 registers (32-bits wide)
General purpose registers
1 program counter
30 general purpose registers
Status registers
1 current program status register
5 saved program status registers
These registers are not all accessible at the same time. The processor
state and operating mode determine which registers are available to the
programmer.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Registers (II)
Depending on processor mode one of several banks is
accessible. Each mode can access
the program counter r15 (PC)
a particular r13 (stack pointer SP)
a particular r14 (subroutine link register, LR)
a set of r0-r7 registers, and a particular set of r8-r12
the current program status register (CPSR)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Register Overview
FIQ
IRQ
Supervisor
Abort
Undefined
r0
r0
r0
r0
r0
r0
r1
r1
r1
r1
r1
r1
r2
r2
r2
r2
r2
r2
r3
r3
r3
r3
r3
r3
r4
r4
r4
r4
r4
r4
r5
r5
r5
r5
r5
r5
r6
r6
r6
r6
r6
r6
r7
r7
r7
r7
r7
r7
r8
r8_fiq
r8
r8
r8
r8
r9
r9_fiq
r9
r9
r9
r9
r10
r10_fiq
r10
r10
r10
r10
r11
r11_fiq
r11
r11
r11
r11
r12
r12_fiq
r12
r12
r12
r12
r13 (SP)
r13_fiq (SP)
r13_irq (SP)
r13_svc (SP)
r13_abt (SP)
r13_und (SP)
r14 (LR)
r14_fiq (LR)
r14_irq (LR)
r14_svc (LR)
r14_abt (LR)
r14_und (LR)
r15 (PC)
r15 (PC)
r15 (PC)
r15 (PC)
r15 (PC)
r15 (PC)
CPSR
CPSR
CPSR
CPSR
CPSR
CPSR
SPSR_fiq
SPSR_irq
SPSR_svc
SPSR_abt
SPSR_und
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
r0 - r7
PC
a Stack pointer
SP
a Link register
LR
CPSR
In Thumb state, the high registers (r8 - r15) are not part of the standard
register set. The assembly language programmer has limited access to
them, but can use them for fast temporary storage
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
r0
r1
r1
r2
r2
Thumb state
r3
r3
Low registers
r4
r4
r5
r5
r6
r6
r7
r7
Thumb state
Thumb
ARM
State
State
r8
r9
r10
r11
High registers
r12
r13 (SP)
r13 (SP)
r14 (LR)
r14 (LR)
r15 (PC)
r15 (PC)
CPSR
CPSR
SPSR
SPSR
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
24 23
Condition
code flags
16 15
Reserved
0
mode
Control bits
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
24 23
Condition
code flags
16 15
mode
Mode Bits
10000
User
10001
FIQ
10010
IRQ
10011
Supervisor
10111
Abort
11011
Undefined
11111
System
T Bit
Thumb mode (when set)
ARM mode (when cleared)
Control bits
Reserved
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Exception
Exceptions result whenever the normal flow of a
program has to be halted temporarily, for example
to service an interrupt from a peripheral. Before
attempting to handle an exception, the
ARM7TDMI-S preserves the current processor
state so that the original program can resume
when the handler routine has finished.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Exception Handling
Entering an exception the ARM core
saves the address of the next instruction in the appropriate LR
r15 (PC)
PC + 4 or PC + 8
r14_<mode> (LR)
CPSR
CPSR:
0
mode
Control bits
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Exception Vectors
Vector Table
0x1C
.
.
.
FIQ
0x18
IRQ
0x14
(Reserved)
0x10
Data Abort
0x0C
Prefetch Abort
0x08
Software Interrupt
0x04
Undefined Instruction
0x00
Reset
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Multiple Exceptions
Exception priorities
When multiple exceptions arise at the same time, a fixed priority
sytem determines the order in which they are handled
1.
Reset
2.
3.
FIQ
4.
IRQ
5.
6.
Undefined Instruction
7.
highest priority
lowest priority
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Leaving Exception
To leave an exception, the exception handler must
copy SPSR back into CPSR
SPSR_<mode>
CPSR
CPSR:
0
mode
Control bits
PC - offset
r15 (PC)
1.
2.
Architecture
3.
Instruction Set
4.
ARM7TDMI-S
5.
Systems
6.
7.
NXP Implementation
8.
Q&A
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Instruction Set
All instructions are 32-bits long
Many instructions execute in a single cycle
Instructions are conditionally executed
ARM is a load / store architecture
via registers => RISC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Conditional Execution
Mnemonic
Description
EQ
Equal
NE
Not equal
CS / HS
CC / LO
MI
Negative
PL
Positive or zero
VS
Overflow
VC
No overflow
HI
Unsigned higher
LS
GE
LT
GT
LE
AL
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Instruction Examples
Data processing instructions
SUB
r0, r1, #5
r0 := R1 - 5
ADD
ADDS
r5 := r5 + r6 if equal
r0 := [r1 +4]
LDRSH
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Thumb Instructions
ARM instruction set
31
ARM instruction
Recoding
15
Thumb instruction
ARM instruction
Thumb instruction
ARM instruction
Thumb instruction
ARM instruction
Thumb instruction
ARM instruction
Thumb instruction
ARM instruction
Thumb instruction
ARM instruction
Thumb instruction
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
2KBytes
Conditional
256Bytes
4MBytes
(2 Instructions!)
if Rm[0] = 0
Data Processing
Subset of ARM data processing instructions
Not conditionally executed (but some update flags)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Breakpoint
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Thumb code
15
001
Major op-code
10
Minor op-code
denoting format 3
denoting ADD
move/compare/add/sub/
instruction
Rd
8-bit immediate
Destination and
Immediate
source register
value
31
1110
00
0100
0 Rd 0 Rd
ARM code
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
BX<condition> Rn
In Thumb state:
BX Rn
Rn
31
n: 0-15
BX
Destination
address
31
ARM / Thumb
selection
0:
ARM state
1:
Thumb state
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
2.
Architecture
3.
Instruction Set
4.
ARM7TDMI-S
5.
Systems
6.
7.
NXP Implementation
8.
Q&A
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ARM7TDMI-S
The ARM7TDMI-S is based on ARM7 core
3 stage pipeline
Von Neumann architecture
CPI ~1.9
T:
D:
M:
I:
S:
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ARM7TDMI-S Core
Address Bus
Address Register
Incr.
Instruction
Decode &
General
Control
Registers
Mult.
Shifter
Thumb
Decompression
ALU
Data Out
Data In
Data Bus
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Thumb
PC
PC
PC - 4
PC - 8
PC - 2
PC - 4
Fetch
Decode
Execute
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
2.
Architecture
3.
Instruction Set
4.
ARM7TDMI-S
5.
Systems
6.
7.
NXP Implementation
8.
Q&A
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
RAM
ARM core
16 bit wide
Interrupt
Controller
Peripherals
I/O
ROM
8 bit wide
RAM
32 bit wide
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
AMBA
Advanced Microcontroller Bus Architecture
on-chip interconnect
established, open specification
framework for SoC designs
enabler for IP reuse
digital glue that binds IP cores together
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
AHB
APB
Bridge
APB
Timer
Display
High-bandwidth
on-chip RAM
DMA
Bus Master
RTC
I/O
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
low-power
non-pipelined
simple interface
wait support
(VPB)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
2.
Architecture
3.
Instruction Set
4.
ARM7TDMI-S
5.
Systems
6.
7.
NXP Implementation
8.
Q&A
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Decode
ThumbARM
decompress
Instruction Fetch
ARM decode
Reg. select
Execute
Reg.
read
Shift
ALU
Reg.
write
CPI:
1.9
ARM9TDMI
Fetch
Instruction
Fetch
Decode
ARM or Thumb
instruction decode
Reg.
decode
Reg.
read
Execute
Memory
Shift + ALU
Memory
access
Writeback
Reg.
write
CPI:
1.5
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
System
mode
Thumb
instruction set
3
Early ARM
architectures
T: Thumb
4
SA-110
SA-1110
4T
Improved
ARM/Thumb
Interworking
Jazelle
5T
CLZ
Instruction
Saturated maths
DSP multiplyaccumulate
instructions
Java
bytecode
execution
5TE
ARM9EJ-S
ARM7EJ-S
ARM7TDMI
ARM9TDMI
ARM1020E
ARM9E-S
ARM720T
ARM940T
X-Scale
ARM966ES
E: DSP-extensions
5TEJ
S: synthesizable
ARM926EJ
-S
J: Java
: Core Architecture
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
0.15
0.18
400
0.35
4.8mm2
0.35
2.1mm2
0.6
4.8mm2
0.18mm
ARM 9E
ARM 9...
100
0.18
< 0.5mm2
0.25
1.0mm2
ARM 11
(ARM 10)
0.25
0.25
2.4mm2
0.15
1997
1998
1999
2000
2001
2002
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
2.
Architecture
3.
Instruction Set
4.
ARM7TDMI-S
5.
Systems
6.
7.
NXP Implementation
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
PWM
(6 outputs)
RTC
Watchdog
2 UARTs (16C550)
IC (400kb/s)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
NXP Implementation
1.
Memory Addressing
2.
3.
4.
5.
6.
Integrated Peripherals
Timer 0 / Timer 1, UART 0 / UART 1, IC, SPI, PWM, RTC,
Watchdog, ADC, USB, CAN, Ethernet, SD, IIS, GPDMA
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
AHB Peripherals
VPB Peripherals
0xFFFF FFFF
0xF000 0000
0xEFFF FFFF
0xE000 0000
Memory blocks not
drawn to scale!
3.0 GB
2.0 GB
0x8000 0000
Boot Block (re-mapped from On-Chip Flash)
0x7FFF E000
0x7FE0 0000
0x7FD0 0000
RAM on AHB
1.0 GB
0x4000 nnnn*
0x4000 0000
0x3FFF FFFF
0.0 GB
0x000m FFFF
0x0000 0000
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
512k
LPC2100, 128k
8K Boot Block
0x01 FFFF
Sector 14 8K
Sector 9 64K
Sector 13 8K
Sector 8 64K
Sector 12 8K
Sector 2 8k
Sector 7 8K
Sector 2 8k
Sector 1 8K
Sector 1 8K
Sector 0 8K
0x0
Sector 0 8K
Sector 26
Sector 22
8K Boot Block
Sector 16 8K
Sector 10 8k
LPC213X
4K
0x07 CFFF
4k
Sector 21 32K
Sector 15 32k
256k
0x03 FFFF
128k
64k
32k
0x0
0x07 FFFF
Sector 14 32K
Sector 11 32k
Sector 10 32K
0x03 FFFF
0x01 FFFF
Sector 9 32K
Sector 8 32K
Sector 7 4K
...
Sector 1 4K
Sector 0 4K
0x00 FFFF
0x00 7FFF
0x0
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
SRAM: 8, 16, 32 or 64 KB
0x4000FFFF
64KB SRAM
0x40007FFF
32KB SRAM
0x40003FFF
16KB SRAM
RAM Int Vect
8KB SRAM
RAM Int Vect
0x40001FFF
0x4000003F
0x40000000
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
Memory Addressing
2.
3.
4.
5.
6.
Integrated Peripherals
Timer 0 / Timer 1, UART 0 / UART 1, IC, SPI, PWM, RTC,
Watchdog, Ethernet, SD, IIS, GPDMA
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
System Control
Includes a number of important system features
Power Control
Memory mapping configuration
Oscillator
PLL
VPB (VLSI Pheriperal Bus) divider
Reset (active low)
Wakeup Timer
External Interrupts
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Power Control 1
[PCON 0xE01FC0C0]
R/W
PCON[0]
IDL
PCON[1]
PD
20 uA at room
temperature,
50 uA with single
voltage supply
Biggest factors:
temperature, clock rates
Peripheral Clock Divider: 20%
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Power Control 2
When disabled, peripherals are switched off to conserve power
Power Control for
Peripherals Register
[PCONP 0xE01FC0C4]
PCONP 1
PCTIM0
Enable Timer0
PCONP 2
PCTIM1
Enable Timer1
PCONP 3
PCURT0
Enable UART0
PCONP 4
PCURT1
Enable UART1
PCONP 5
PCONP 7
PCI2C
Enable I2C
PCONP 8
PCSPI
Enable SPI
PCONP 9
PCRTC
Enable RTC
R/W
Each peripheral
typically below 1mA
......
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
PCSP0
Enable SPI0
PCONP 9
PCRTC
Enable RTC
PCONP 10
PCSPI1
Enable SPI1
PCONP 11
PCEMC
PCONP 12
PCAD
Enable A/D-Converter
PCONP 13
PCCAN1
PCONP 14
PCCAN2
PCONP 15
PCCAN3
PCONP 16
PCCAN4
Acceptance Filter
enabled with any
CAN Controller
CAN peripheral
typically below 2mA
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Boot Block
The uppermost Flash sector contains the Boot Loader
controls physical interface for programming and erasing the Flash
supports ISP (In System Programming) mode for initial
programming of customer code
supports In-Application Programming in a running system under
the control of customer software
buffers an entire Flash line (512 bytes) at once to keep
programming time to a minimum
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Exception Vectors
Vector Table
0x1C
.
.
.
FIQ
0x18
IRQ
0x14
(Reserved)
0x10
Data Abort
0x0C
Prefetch Abort
0x08
Software Interrupt
0x04
Undefined Instruction
0x00
Reset
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
0x0000 003F
0x0000 0000
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
0x8000 0000
Boot Loader
On-chip User Flash Memory
0x0000 003F
0x0000 0000
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Boot Loader
On-chip User Flash Memory
0x0000 003F
0x0000 0000
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
0xFFFF FFFF
4.0 GB
VPB Peripherals
Exception Vector
re-mapping
0x7FFF FFFF
2.0 GB
Boot Block
re-mapping
0x0000 0000
0x00
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
MAP 1:0
R/W
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
FOSC
XTAL1
Oscillator
Phase
Detector
Current
Controlled
Oscillator
10 to 60 MHz
Fosc * M
FCCO
cclk
2P
Divider
Value
10 to 25 MHz
1 to 30 MHz
without PLL
P:=1..8
Multiplier Value
Default: 4
VPB pclk
Divider
1/2/4
M:=1..32
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Fosc:
Fcco:
PLL CCO-frequency
10 ... 60-70
MHz
10 ... 25
MHz
MHz
Fcco
2P
cclk = M FOSC
cclk =
FCCO = cclk 2 P
Fcco= Fosc M 2 P
cclk
Fosc
60 MHz
10 MHz
(P = 2)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
[PLLCON 0xE01FC080]
PLLCON0
PLLE
PLL Enable
PLLCON1
PLLC
PLL Connect
MSEL 4:0
PLLCFG 6:5
PSEL 1:0
R/W
R/W
00: 1
01: 2
10: 4
11: 8
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
PLLFEED
[PLLFEED 0xE01FC08C]
WO
[PLLSTAT 0xE01FC088]
PLLSTAT 4:0
MSEL 4:0
PLLSTAT 1:0
PSEL 1:0
PLLSTAT 8
PLLE
PLLSTAT 9
PLLC
PLLSTAT10
PLOCK
RO
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
VPBDIV
[VPBDIV 0xE01FC100]
cclk / pclk ratio
R/W
00: 4
01: 1
10: 2
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
Memory Addressing
2.
3.
4.
5.
6.
Integrated Peripherals
Timer 0 / Timer 1, UART 0 / UART 1, IC, SPI, PWM, RTC,
Watchdog, ADC, CAN
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Flash Architecture
Flash is split into two blocks of 128 bits each
128 bits are accessed at once
Separate Branch Trail Buffer holds 128 bits of history of each block
=> 4-times speed improvement for linear code; branches will cause a
variable delay, depending on target address
Additional Data Buffer for data accesses to Flash
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Core
Bus Interface
ARM7
Flash Memory
Bank 1
Flash Memory
Bank 2
128 bit
128 bit
Prefetch Buffer 1
Local Bus
Prefetch Buffer 2
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
MAM Registers
MAM Control Register
MAMCR 1:0
MAM mode
control
[MAMCR 0xE01FC000]
R/W
MAM Fetch
Cycle timing
[MAMTIM 0xE01FC004]
R/W
000: reserved
001: MAM fetch is 1 clock cycle
...
111: MAM fetch is 7 clock cycles
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On Index
1.
Tools Setup
2.
3.
ADC
4.
Interrupts / Timer
5.
UART / CAN
Hands-On
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
MAM Setup
Enabling the MAM for
60Mhz clock and 50ns
Flash
Setup MAM
Fully Enable
MAM Timing 3
3 * 17ns = 51ns
Hands-On
Explanation of MAM
Register values
Partially Enable:
Code fetches only
Fully enable:
Code and data fetches
MAM Timing
Number of clock cycles
used for one flash
memory access
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Verify
PLL and MAM Settings
Hands-On
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Flash IAP
Hands-On
Project FlashSWInt
Load and single step
Watch memory at 0x8000, ASCII mode
Exercise:
Change program to use address 0x10200
for storing the string
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
Memory Addressing
2.
3.
4.
5.
6.
Integrated Peripherals
Timer 0 / Timer 1, UART 0 / UART 1, IC, SPI, PWM, RTC,
Watchdog, ADC, CAN
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
48-pin devices:
32
64-pin devices:
46
76 (max.)
112
LPC23/24
Up to 160 GPIO pins, all implemented as fast GPIOs, with 64 GPIO interrupts
(plus 4 other external interrupts).
Shared with
Alternate functions of all peripherals
Data/address bus and strobe signals for external memories
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
The current state of the port pins is read from this register
IOSET
IOCLR
Writing "1" sets pins low and clears corresponding bits in IOSET
IODIR
PINSEL0/1
1 = OUTPUT
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
10
Improving Speed
GPIO registers are now interfaced directly to the
ARM7 Local bus
Ports can now toggle every 2 clocks giving a clock
period of cclk/4= 15Mhz
This is a 3.5x speed increase
Enables faster soft peripherals
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Fetching
Writing
Decoding
E5803000
Executing
E5802000
Fetching
E580500
Decoding
Nothing
Fetching
Writing
Decoding
E5804000
Executing
E5803000
Executing
E5803000
Fetching
E580500
Fetching
E580500
Decoding
Nothing
Fetching
Writing
Decoding
E5805000
Decoding
Nothing
Executing
E5804000
Executing
E5804000
Executing
E5805000
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Fast GPIO
Special features
GPIO registers accessed via ARM local bus in addition
to conventional peripheral bus access
Mask registers allow treating sets of port pins as a
group, leaving other bits unchanged
Local bus GPIO registers are now byte addressable
Entire port value can be written in one instruction using
the IOPIN register
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
GPIO
UART
Timer/Counter
reserved
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
PINSEL2
(144-pin
devices)
(144-pin devices)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
PINSEL0 21:20
...
P0.10
...
...
...
...
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Type
Description
D [31:0]
Input / Output
A [23:0]
Output
OE
Output
BLS [3:0]
Output
WE
Output
CS [3:0]
Output
Boot from
PINSEL2 27:25
24 23
20 19
16 15
12 11
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
GPIO Exercise
Hands-On
Exercise:
Modify the example
to use a macro or function
for LEDs
Optional Exercise:
Invent a display pattern
indicating seconds and
125ms
Hint:
Examples:
SET_LEDS(byte)
LEDs are on
Port 1, bits 16-23
Walking LED, or
Bar indicator
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
Memory Addressing
2.
3.
4.
5.
6.
Integrated Peripherals
Timer 0 / Timer 1, UART 0 / UART 1, IC, SPI, PWM, RTC,
Watchdog
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
FIQ
IntEnable
O
R
0:4
En Channel
5
FIQ
High Prio
...
32
FIQ
FIQ
En Channel
IRQ
IntSelect
32
VectorCntl
IRQStatus
O
R
IntEnableClear
SoftIntClear
SoftInt
32
interrupt
RawInterrupt
Timer
Interrupt
Source
FIQStatus
VICVectorAddr 0
C
P
U
16/32 (LPC23/24)
VICVectorAddr 15/31
0:4
VICDefVectAddr
Low Prio
VICVectorAddr
VICVectorAdd 0
D[0..31]
IRQ
D[ ]
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
IRQ Interrupts
Vectored
Vectored
Interrupt
Interrupt
Controller
Controller
Timer
Timer
(Overflow)
(Overflow)
Interrupt
FIQ
ARM-Core
IRQ
Channel
Channel#4
#4
VIC
Vector
Address
Channel
Channel#16
#16
Exception
Vector
Table
Main
0x1C
0x18
0x14
...
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
VICVectAddr4
VICVectAddr
ISR
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ISR
VICDefVectAddr
ISR
CODE
VICVectAddr
ISR
ISR
ISR
ISR
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Interrupt
FIQ ISR
in Flash
FIQ ISR
in RAM
VectorAddress = 0x1C
ISR
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On Index
1.
Tools Setup
2.
3.
ADC
4.
Interrupts / Timer
5.
UART / CAN
Hands-On
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Project: BlinkyIRQ
Hands-On
Load Project
BlinkyIRQ
Build and Debug
Simulation
Use Logic Analyzer
gTimCnt
loop
Peripheral window
Vectored Int. Contr.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
Exercise:
Timer & Interrupt
Add timer 1 interrupt to
BlinkyIRQ
Interrupt all 333us
Use Vector 1
In ISR, display some LED
pattern on port 1.20 to 1.23
every 333ms
Performance Analyzer
Signal Analyzer
Peripheral GPIO window
Peripheral Timer window
Peripheral VIC window
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Interrupts
1.
Hands-On
Tools Installation
Emulator/Debugger:
Compiler:
Flash Tool:
Hardware:
(Nohau)
(IAR)
(NXP)
(Nohau)
2.
Oscillator / PLL
3.
4.
Interrupts
a. Single Interrupt
b. Nested Interrupts
5.
6.
UART
RTC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
(User Manual !)
Try again
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
Start Seehau
Run project
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
(Assembler!)
ldr
pc,=?cstartup
SUPERVISOR mode
Undefined ldr
SWI
ldr
Prefetch
ldr
Data
ldr
nop
reserved
IRQ
ldr
pc,[pc,#-0xff0]
IRQ mode
FIQ
ldr
pc,=0x1C
IRQ mode
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
Timer.c
T0_MCR= 0x03;
//Interrupt on Match0, reset timer on match
Function
LEDs are changed whenever variable TimerIsUp=1
This variable is
set by Timer 0 interrupt routine after Timer 0 match
cleared by main routine before LEDs are changed
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Start Seehau
Run project
Press SW4
Release SW4
Hands-On
(Tools -> Seehau)
(RUN -> Go or Button)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Nested Interrupts
Solution 1
Hands-On
blinks LEDs
Timer0_ISR()
Main()
VICVectAddr1
ExtInt_ISR()
VICVectAddr0
Hands-On
InitExtInt2()
Timer.c
InitTimer0()
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
!
Nested IR-Handler now save status and reenable further interrupts before entering ISR
nested interrupts possible!
Main()
Nested IR handler
Timer IRS routine
VICVectAddr0
Nested IR handler
Ext. Int. ISR
VICVectAddr1
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
reset IRQ-source
switch to System mode, interrupts enabled switch to System mode, interrupts enabled
branch to distinct ISR
reset VIC
reset VIC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
is
InitExtInt2()
is
InitTimer0()
new
InitExtInt2()
new
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On
Make
OK?
Start Seehau
Run project
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Nested Interrupts
Solution 2
Priorities
Hands-On
blinks LEDs
Nested Interrupts
Solution 2
Hands-On
Timer0_ISR()
VICVectAddr0
Main()
ExtInt_ISR()
VICVectAddr1
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Flag(s)
Block
ARM Core
ARM Core
Timer 0
Timer 1
UART 0
WDT
-
VIC
IR Sources
LPC2104
LPC2105
LPC2106
VIC IR Source #
I2C
SI (state change)
SPI
SPIF, MODF
10
reserved
11
PLL
12
RTC
13
System Control
14
System Control
15
System Control
16
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Flag(s)
Block
add'l
VIC
IR Sources
LPC2114/24
LPC2119*/29*
LPC2194**
LPC2210/12/14LPC2
290**/92**
LPC2294***
VIC IR
Source #
...
...
17
A/D Converter
18
* CAN
19
* CAN
CAN 1 Transmitter
20
* CAN
CAN 1 Receiver
21
** CAN
CAN 2 Transmitter
22
** CAN
CAN 2 Receiver
23
*** CAN
CAN 3 Transmitter
24
*** CAN
CAN 3 Receiver
25
*** CAN
CAN 4 Transmitter
26
*** CAN
CAN 4 Receiver
27
...
System
Control
A/D
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1.
Memory Addressing
2.
3.
4.
5.
6.
Integrated Peripherals
Timer 0 / Timer 1, UART 0 / UART 1, IC, SPI, PWM, RTC,
Watchdog
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
RTC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Only for
LPC213x,4x
LPC23,LPC24
PCLK
RTC
oscillator
Clock Divider
(prescaler)
MUX
Clock
generator
The Counter
Increment can
cause an
interrupt
Time
Counters
Alarm
Registers
Comparators
Interrupt Generator
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
RTC
Current
consumption from
Vbat
Power down
Power down
20-30A
Power down
Running from
Vbat
20-30 A
Active
(pclk=15MHz)
Running
around 80 A
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
IAP programming
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ADC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
A/D Converter
Features
10 bit successive approximation analog to digital converter
Multiplexed inputs
4 pins
(64-pin devices)
8 pins
(144-pin devices)
Measurement range of 0 V to 3 V
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ADC Inputs
7 6 5 4 3 2 1 0
ADDR0
ADDR1
Select Single Channel
ADCR (7:0)
10-bit ADC
(11 Clocks/Conv)
ADDR7
V3A
VSSA
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
ADC Inputs
ADC Clock
(CLKS Bits)
1-8
Input Scan
(SEL Bits)
ADDR0
n-bit ADC
(n Clocks/Conv)
ADDR1
ADDR7
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
DAC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC213x DAC
Digital-to-Analog Converter (DAC)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On Index
1.
Tools Setup
2.
3.
ADC
4.
Interrupts / Timer
5.
UART / CAN
Hands-On
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Project: BlinkyADC
Hands-On
Load Project
BlinkyADC
Build and Debug
Simulation
Use Logic Analyzer
Peripheral windows
GPIO P1
ADC -> modify voltage
Run on hardware
Verify change of AD values
with potentiometer
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
UART
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
10100101
10110110
01111000
001
000
00
10
11
01
01
CAN
SSP
0
1010010110110110
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
UART0 / UART1
UART 0
Interface
UART 1
Interface
TxD0
RxD0
TxD1
CTS
DTR
RxD1
DCD
RI
RTS
DTR
Modem
Interface
signals
UART0 / UART1
Register locations conform to 550 industry standard UART
Built-in Baud Rate Generator
16-bit baud rate generator clock divisor made from 2 8-bit divisor
registers: DLM (MSB), DLL (LSB)
Required baud rate: pclk / (16 x Divisor*)
(* if the Divisor is 0x0000, it is treated as 0x0001.)
Fractional baud rate generator (LPC214x, LPC2101-2-3)
Error Detection
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
IIC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
I2C
Interface1
2nd I2C
interface
on LPC213x
I2C
Interface2
SDA
SCL
SDA
SCL
400Kbits/sec
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
I2C Bus
Fast-I2C compliant bus interface
configurable as Master, Slave, or both
multi-master bus
bi-directional data transfer between masters and slaves
up to 400kb/s
arbitration between simultaneously transmitting masters without
corruption of serial data on the bus
serial clock synchronization allows devices with different bit rates to
communicate via one serial bus
programmable clock rate
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
SPI Interface
MISO
SPI
Interface
MOSI
SPICLK
SS
SPI Bus
Compliant with Serial Peripheral Interface (SPI)
specification
Combined SPI master and slave function
Maximum data bit rate of 1/8 of the peripheral clock rate
Programmable clock polarity and phase for data
transmit/receive operations
No. of SPI channels:
1
(48-pin devices)
(64/144-pin devices)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
SSP
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
MISO1
SSP
Interface
MOSI1
SCK1
SSEL1
SSP Interface
Compatible with Motorola SPI, 4-wire TI SSI and
National Semiconductor Microwire bus
Supports multiple slaves and master on the bus but
at any point of time only one master and slave can
communicate
8-Frame FIFOs for both Transmit and Receive
Frame sizes can be from 4 bits to 16 bits
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
USB
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
USB 2.0
Since USB is a standard doesnt that make all
microcontrollers with USB the same?
NO!!
Architectural choices and implementation details make a big
difference in performance and ease of use.
The LPC2148 is a high performance USB device.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Introduction to USB
An Auto-configuring Plug-and-play
Serial Bus
HOST/HUB
PC
HUB
Phone
Monitor
HUB
Kbd
Speaker
Pen
Mic
Mouse
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Approved on 11/23/99
by the USB Core team
12 Mbps bus
Full-speed (12 Mbps)
Low-speed (1.5 Mbps)
Standard A connector
and standard B
connector
USB 2.0
OTG
specification released
specification
Connects peripherals
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
R2
D+
D+
R1
ZO = 90 ohms15%
5 Meters Max.
R1
Host or
Hub Port
F.S./L.S. USB
Transceiver
D+
(45ohms Outputs)
D-
sb.org
www.usb.org
Hub Port 0
or
D+
R1
Host or
Hub Port
R1 = 15K ohm5%
R2 = 1.5K ohm5%
Untwisted, Unshielded
3 Meters Max.
R1
R1 = 15K ohms5%
R2 = 1.5K ohms5%
www.usb.org
www.usb.org
F.S. USB
Transceiver
R2
L.S. USB
Transceiver
www.usb.org
www.us
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Device Layers
Function
Represents capability delivered by
the device, The primary usage function,
like mouse, audio output, printer, hub, etc.
Function
USB
USB Logical
Logical
Device
Device
USB Bus
Interface
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Device Abstractions
End Point
Ultimate data source or sink at the device end
Unique address, unidirectional, transfer characteristics
Each endpoint is unidirectional and has a transfer type associated with its
peripheral
Pipe
Association of endpoint with host SW owner
Interface
Collection of pipes
Map to a capability
Owned by exactly 1 software client
More that 1 interface can be defined in a device
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Endpoints
Up to 32 (16 pairs) endpoints can reside within a device
All USB transfers are targeted to/from a device endpoint
An endpoint is a buffer used to transmit or receive data
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Interfaces
Made of 0 or more pipes
Has a client owner
Accesses individual pipes
Shares default pipe
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Pipes
Connect host memory buffer to endpoint FIFO
Stream Type
No USB imposed data format
Unidirectional
Message Type
USB imposed data format
Bidirectional
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Function
Client SW
Interface x
manages an interface
Buffers
Pipe Bundle
to an interface
No USB
Format
manages devices
Default Pipe
to Endpoint Zero
Unspecified
USB Bus
Endpoint 0
- Required, shared
- Configuration access
- Capability control
Endpoint
Zero
Data Per
Endpoint
No USB
Format
SIE
a collection of
endpoints
USB
Framed
Data
USB Bus
Interface
Host
Interface
Controller USB Framed
Data
Transactions
a collection of
Interfaces
USB Device
USB System
Data
Interface
Specific
Device
SIE
USB Wire
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Client
Client
Software
Software
Buffers
Buffers
Data
Data Flows
Flows
Pipes
Pipes
Endpoints
Endpoints
USB
USB Device
Device
Interface
Interface
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Communications Layers
Physical
Packets
Transactions
3 phases (token, data, handshake)
Token phase has token packet sent by host
Always present
Packet ID (PID) identifies transaction type
Transfers
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Transfers to Transactions
Interface
Interface
Interface
Interface
Pipe
Pipe
Pipe
Device
Device
Driver
Driver
User
User
Params
Params
Interface
Interface
Pipe
Pipe
Pipe
Device
Device
Driver
Driver
Device
Device
Driver
Driver
Client
Client SW
SW
Device
Device
Description
Description
Service
Service
Description
Description
Transfer
Transfer Manager
Manager
Transaction
Transaction
List
List
Requirements,
Limitations
USB
USB System
System SW
SW
and
and
Host
Host Controller
Controller
Transaction
Schedule
Transaction
Schedule
Executor
Executor
Token
Token
Token
Token
Token
Token
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Transfer
Transaction
Token Packet
PID
Transaction
Data Packet
Body
CRC
Transaction Types
OUT
IN
SOF (Start of Frame)
SETUP
Handshake Packet
PID Packet IDentifier (16 types)
Body Depended on Packet type
CRC Cyclical Redundancy Check
used for error checking
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Frames
Control
Isochronous
Interrupt
Bulk
1 ms
1 ms
SOF packets
marks each
frame tick
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Control
Interrupt
Bulk
Isochronous
no support
no support
64 (one 64-byte
transaction/frame)
yes
no
no
no
yes
no
Configuration
yes
Mouse, keyboard
no
Printer, scanner
yes
Audio, video
Note:
frame = 1msec @FS
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Slot
Frame = 1ms
Stereo Audio
Low Speed
BULK
Stereo Audio
BULK
Stereo Audio
BULK
Stereo Audio
BULK
Stereo Audio
BULK
Stereo Audio
BULK
Stereo Audio
BULK
Stereo Audio
BULK
Scanner
Stereo Audio
Interrupt,
Control,
Low Speed
Rx Line
Tx Line
Rx Voice
Tx Voice
SOF
Stereo Audio
BULK
Low Speed
BULK
(not to scale)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Transactions
Transactions are always initiated by the Host and therefore thought of
from the Hosts perspective
A Transaction consist of multiple packets and begin when the host
sends one of four Token Packets
OUT notifies the DC that data is being send out from the Host
IN requests that DC send data in to the Host
SOF signals the Start of Frame
SOF signals the Start of Frame
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Packet Formats
SOF Packet
8 bits
11 bits
PID
FRAME NUMBER
8 bits
Token Packet
Data Packet
PID
5 bits
7 bits
4 bits
ADDR
ENDP
CRC5
5 bits
CRC5
8 bits
0 1023 bytes
16 bits
PID
PAYLOAD
CRC16
8 bits
Handshake Packet
PID
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Endpoints in LPC2148
Maximum of 32 (16 logical) endpoints
Selectable Double Buffering for Bulk and
Isochronous Data Transfer
Any combinations of Endpoints allowed
Maximum buffer size supported for all endpoints
types
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
8K AHB
Memory
VPB Bus
DMA
Engine
ATX
PADS
USB Logic
Register
Interface
Endpoint ram
access control
Force SE0
TX D
OE
D+
D-
RX D
2K FIFO
Receivers
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Transfer Modes
Slave Transfer Mode
DMA Transfer Mode
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC2148 connections
3.3 volt system power
Vusb bus sense
Good Link
LPC2148
Soft connect_n
Logic level p
channel FET
Philips BSH203
1.5k
ATX
Pad
DD+
D-
Vusb supply
33
33
D+
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC2148 clocks
XTAL
Main
PLL
cclk
VPB
divider
USB
PLL
pclk
USB clk
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CAN
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CAN
Bus
Bus Interface
Bus Interface
CAN
Bus
Status/Control
Registers
CAN
Protocol
Controller
CAN
Protocol
Controller
Transmit
Transmit
Buffer
1
BufferTransmit
2
Buffer 3
Global Acceptance
Filter Table with up
to 1024 filters;
buffered in
Full CAN mode
Host
Interface
Host CPU
Transmit
Transmit
Buffer
1
BufferTransmit
2
Buffer 3
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Bus lines
assumed to be
an electrical
medium
(e.g.twisted
pair)
200
Bit Rate
[kbps]
100
50
20
10
5
0
10
40 100
200
1000
10,000
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
TIMERS
PWMs
RTC
WATCH-DOG
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Timer 0 and 1
32-bit Timer
32-bit Capture Registers and Capture Pins
Four on each timer
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Timer Capture
Control
Capture Input 0
Interrupt Register
Capture Input 1
Capture Input 3*
Load
Capture Register 1
Capture Register 2
ENABLE
Capture Register 0
RESET
Capture Input 2
32-bit Timer/Counter
Capture Register 3*
Interrupt
*: not available in 48-pin devices
32-bit Pre-Scaler
PCLK
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Timer Compare
Match Control Register
Control
Match Output 0
Match Output 1
Match Output 2
Match Register 3
Interrupt
Timer=MR3
*: not available in
48-pin devices
Timer=MR2
Timer=MR1
Timer=MR0
=
=
=
=
ENABLE
Match Register 2
Match Output 3*
32-bit Timer/Counter
32-bit Pre-Scaler
PCLK
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Latch Enable 0
Shadow Register 0
=
Interrupt
Control
R EN
S
PWM1
Enable
R EN
PWM2
Enable
PCLK
R EN
PWM6
Enable
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
er
m
i
T ue
l
Va
PWMx
PWMy
PWMz
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
PWM2
r
Time
e
Valu
PWM4
PWM5
(single-edge)
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Hands-On Index
1.
Tools Setup
2.
3.
ADC
4.
Interrupts / Timer
5.
UART / CAN
Hands-On
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Project: SerialRTC
Hands-On
Load Project
SerialRTC
Build and Debug
Simulation
Use Serial Window #2
Target Hardware
Use terminal program
set to 9600bps
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Watchdog Timer
Once activated, the Watchdog will reset the entire chip if it is
not fed regularly
Feed is accomplished by a specific sequence of data writes
Watchdog flag allows software to tell that a watchdog reset
has occurred
Selectable overflow time (s ... minutes)
Debug Mode generates an interrupt instead of a reset
Secure: watchdog cannot be turned off once it is enabled
Watchdog Timer value can be read in one cycle
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Watchdog Timer
PCLK
/4
WDFEED
Watchdog Timer
Constant
Sticky bits!
(cleared by WDT
underflow or ext.
reset)
WDEN
WDTOF
WDINT
WDRESET
RESET
INTERRUPT
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
NXP LPC2300/2400
Selected Peripherals
Clock tree
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1-24MHz
Main
Oscillator
PLL
system
clock select
4MHz
Internal
R/C
Oscillator
wdclk
pllclk
Fcco
CPU
Clock
Divider
Bypass
Synchronizer
usbclk
(48 MHz)
USB Block
cclk
ARM7TDMI-S
Ethernet
Block
25 or
50 MHz
External
Ethernet
PHY
Other AHB
Peripherals
Watchdog
Timer
Perpipheral
Clock
Generator
watchdog
clock select
pclk
APB
Peripherals
RTC
Prescaler
32.768kHz
rtcclk
RTC
Oscillator
Real Time
Clock
RTC clock
select
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
1..128
M = 132768
N = 1..256
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
LPC23/24 clocking
The LPC2300 has three clock sources
External oscillator 1Mhz 24 Mhz
External watch crystal 32.756 Khz
Internal RC oscillator approx 4 Mhz
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
NXP LPC2300/2400
Selected Peripherals
LPC2300 Peripherals SD/MMC
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
APB Bus
APB
Interface
Adapter
Registers
MCIPWR
Command
Path
Data Path
MCICMD
MCIDATA [3:0]
FIFO
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
SD/MMC/SDIO
CONFIDENTIAL 331
Subject/Department, Author, MMMM dd, yyyy
OR
CONFIDENTIAL 332
Subject/Department, Author, MMMM dd, yyyy
http://en.wikipedia.org/wiki/Secure_Digital_card
CONFIDENTIAL 333
Subject/Department, Author, MMMM dd, yyyy
I2S Features
The I2S input and output can each operate independently in both master and
slave mode.
Capable of handling 8, 16, and 32 bit word sizes.
Mono and stereo audio data supported.
The sampling frequency can range (in practice) from 16-48 kHz.
Word Select period in master mode is configurable (separately for I2S input
and I2S output).
Transmit and receive functions each have an 8 byte data FIFO.
Programmable FIFO level interrupts.
Two DMA requests, controlled by programmable FIFO levels.
Controls include reset, stop and mute options separately for I2S input and I2S
output.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
I2S Diagrams
SCK: serial clock
Transmitter
(master)
Receiver
(slave)
Transmitter
(slave)
Receiver
(master)
Controller
(master)
SCK
Transmitter
(slave)
WS
SD
Receiver
(slave)
SCK
WS
MSB
SD
Word n-1
Right Channel
LSB
Word n
Left Channel
MSB
Word n+1
Right Channel
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
NXP LPC2300/2400
Ethernet
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Typically 512, 256, and 128 MB parts with 4, 8, 16, or 32 bits per device.
A[23:0]
D[31:0]
Shared
Signals
AHB Bus
WEn
AHB slave
register
interface
AHB slave
memory
interface
OEn
Data
Buffers
Memory
controller
state
machine
BLSn[3:0]
Pad
Interface
Static
Memory
Signals
CSn[3:0]
DYCSn[3:0]
CASn
RASn
CLKOUT[1:0]
Dynamic
Memory
Signals
CKE[3:0]
DQM[3:0]
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
IntEnableClear
[31:0]
SoftInt
[31:0]
IntEnable
[31:0]
FIQStatus
[31:0]
IRQStatus
[31:0]
RawIntr
[31:0]
FIQ
FIQStatus
[31:0]
IRQStatus
[31:0]
IntSelect
[31:0]
VectPriority0
[4:0]
Vectored Interrupt 1
IRQStatus
[1]
SW PriorityM ask
[31:0]
Priority
Masking
Logic
VectAddr0
[31:0]
VectIRQ0
Vect Addr0
[31:0]
VectIRQ1
IRQ
Priority
Logic
Vector Select
for highest priority
interrupt
Vect Addr1
[31:0]
VectAddr
[31:0]
Vectored Interrupt 31
IRQStatus
[31]
Vect
AddrOut
VectIRQ31
Vect Addr31
[31:0]
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
DMA (1)
Two DMA channels, each with a four-word FIFO.
16 peripheral DMA request lines. Some of these are connected to peripheral
functions that support DMA: the SD/MMC, two SSP, and I2S interfaces.
One 32-bit AHB bus master interface.
Single DMA and burst DMA request signals. Each peripheral connected to the
GPDMA can assert either a burst DMA request or a single DMA request.
Memory-to-memory, memory-to-peripheral, peripheral-to-memory, and
peripheral-to-peripheral transfers are supported.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
DMA (2)
Scatter or gather DMA is supported through the use of linked lists.
Hardware DMA channel priority: channel 0 is higher priority than channel 1.
Incrementing or non-incrementing addressing for source and destination.
Programmable DMA burst size.
8, 16, and 32-bit wide transactions.
Big-endian and little-endian support. Little-endian is the default.
An interrupt can be generated on a DMA completion or error.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
GPIO Interrupts
APB
Bus
GPIO
Pin
Write 1 to
GPIOIntClr
1
APB
Bus
GPIOIntStat
R Register
(Read Only)
Rising Edge
Enable Register
(GPIOIntEnR)
GPIOIntStatus
Register
Port Int
D Q
Pin
Int
Port
Wakeup
Wakeup
D Q
Falling Edge
Enable Register
(GPIOIntEnF)
VIC
Interrupt
GPIOIntStatF
Register
(Read Only)
Other
Pin Ints
GPIOWake
(from IntWake
Register)
Other Port
Wakeups
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
512 KB
Flash
ARM7TDMI-S
Internal
SRAM
Controller
Internal
Flash
Controller
16 KB
SRAM
MII
or
RMII
AHB2
Ethernet
MAC with
DMA
16 KB
SRAM
AHB
Bridge
AHB
Bridge
AHB to
Master
Port AHB Bridge
APB
Divider
Slave
Port
RST
Xtal2
Xtal1
Trace
Signals
TDO
TDI
TCK
Test/Debug Interface
Emulation Trace
Module
64 KB
SRAM
TMS
TRST
PLL
System
Functions
System
Clock
Internal RC
Oscillator
Vectored
Interrupt
Controller
External
Memory
Controller
GP DMA
Controller
USB with
4KB RAM
& DMA
A[23:0],
D[31:0],
etc.
AHB1
D+, D-,
etc.
AHB to
APB Bridge
APB
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Transmit
DMA
Transmit
Retry
Receive
DMA
Receive
Buffer
RMII
MII or
RMII
MII
Ethernet PHY
Transmit
Flow
Control
RMII adapter
Host
Registers
Ethernet MAC
DMA
Interface
(AHB master)
Bus
Interface
Register
Interface
(AHB slave)
Bus Interface
AHB Bus
MIIM
Receive
Filter
Ethernet Block
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
MIIM Pin
# of Pins
Function
MDC
Clock
MDIO
Total:
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
MII Pin
# of Pins
Function
TX_EN
TXD[3:0]
TX_ER
Transmit error
TX_CLK
Transmitter clock
COL
Collision
CRS
Carrier sense
RX_DV
RXD[3:0]
RX_ER
Receive error
RX_CLK
Receiver clock
Total:
16
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
RMII Pin
# of Pins
Function
TX_EN
TXD[1:0]
RXD[1:0]
CRS_DV
RX_ER
REF_CLK
Total:
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
When using the filter tables, the numbering of CAN interfaces might vary
In some implementations CAN interfaces are numbered 1 and 2
In some implementations CAN interfaces are numbered 0 and 1
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Other Peripherals
USB with Device, Host, and OTG.
UARTs (4), one with modem control, one with IrDA.
CAN (2 channels).
SD / MMC Card Interface.
SPI (1) & SSP (2). SPI shares pins with SSP0.
Timers (4), each with capture/compare.
Watchdog Timer.
DAC output.
CONFIDENTIAL
Subject/Department, Author, MMMM dd, yyyy
Thank You!