LPC-P2148 User Manual

19
LPC-P2148 development board Users Manual All boards produced by Olimex are ROHS compliant Rev.D, November 2009 Copyright(c) 2010, OLIMEX Ltd, All rights reserved Page 1

Transcript of LPC-P2148 User Manual

LPC-P2148 development board Users Manual

All boards produced by Olimex are ROHS compliant

Rev.D, November 2009Copyright(c) 2010, OLIMEX Ltd, All rights reserved

Page 1

INTRODUCTION:

LPC-P2148 is prototype board for LPC2148 ARM7TDMI-S microcontroller with USB 2.0 Full-speed device, multiple UARTs, SPI, SSP to I2C-bus and on-chip SRAM up to 40 kB, produced by NXP Semiconductors.With LPC-P2148 you can explore the features of LPC21XX family on budged, the board has everything necessary to build simple applications: reset and oscillator circuits, JTAG port for programming and debugging, USB, RS232, SD/MMC, Buzzer, three status LEDs, potentiometer and two user buttons.There are plenty of GPIOs on extension headers and also a prototype area where you can connect your additional circuits.

BOARD FEATURES:

- MCU: LPC2148 16/32 bit ARM7TDMI-S™ with 512K Bytes Program Flash, 42K Bytes RAM, USB 2.0, RTC, 10 bit ADC 2.44 uS, 2x UARTs, 2x I2C, SPI, 2x 32bit TIMERS, 6x PWM, 8x CCR, 1x DAC, WDT, 5V tolerant I/O, up to 60MHz operation

- standard JTAG connector with ARM 2x10 pin layout for programming/debugging with ARM-JTAG

- USB connector, USB link LED

- Two channel RS232 interface and drivers

- SD/MMC card connector

- two buttons

- trimpot connected to ADC

- two status LEDs

- Buzzer

- UEXT - 10 pin extension connector for Olimex addition peripherals like MP3, RF2.4Ghz, RFID etc. modules

- 2x SPI connectors

- I2C connector

- on board voltage regulator 3.3V with up to 800mA current

- single power supply: 6V AC or DC required

- power supply LED

- power supply filtering capacitor

- RESET circuit with external control of Philips ISP utility via RS232

- RESET button

- DBG, BSL slide switch

- JRST jumper for enable/disable external RESET control by RS232

- 12 Mhz crystal on socket

- 32768 Hz crystal and RTC backup battery connector

Page 2

- extension headers for all uC ports

- PCB: FR-4, 1.5 mm (0,062"), soldermask, white silkscreen component print

- Dimensions: 110 x 100 mm (4.3 x 3.9 ")

ELECTROSTATIC WARNING:

The LPC-P2148 board is shipped in protective anti-static packaging. The board must not be subject to high electrostatic potentials. General practice for working with static sensitive devices should be applied when working with this board.

BOARD USE REQUIREMENTS:

Cables: The cable you will need depends on the programmer/debugger you use. If you use ARM-USB-OCD, you will need RS232 cable and 1.8 meter USB A-B cable, if you use ARM-USB-TINY, you will need 1.8 meter USB A-B cable and if you use ARM-JTAG, you will need LPT cable.

Hardware: Programmer/Debugger – one of the Olimex ARM Programmers: ARM-USB-OCD, ARM-USB-TINY, ARM-JTAG.

Software: ARM C compiler and JTAG programmer, the possible options are:- open source platform: GNU C compiler + OpenOCD and Eclipse

PROCESSOR FEATURES:

LPC-P2148 board use Single-chip 16-bit/32-bit microcontroller LPC2148 from NXP Semiconductors with these features:

– 16-bit/32-bit ARM7TDMI-S microcontroller

– 40 kB of on-chip static RAM and 512 kB of on-chip flash memory. 128-bit wide interface/accelerator enables high-speed 60 MHz operation.

– In-System Programming/In-Application Programming (ISP/IAP) via on-chip boot loader software. Single flash sector or full chip erase in 400 ms and programming of 256 B in 1 ms.

– EmbeddedICE RT and Embedded Trace interfaces offer real-time debugging with the on-chip RealMonitor software and high-speed tracing of instruction execution.

– USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM. In addition, the LPC2146/48 provides 8 kB of on-chip RAM accessible to USB by DMA.

– Two 10-bit ADCs provide a total of 14 analog inputs, with conversion times as low as 2.44 ms per channel.

– Single 10-bit DAC provides variable analog output

Page 3

– Two 32-bit timers/external event counters (with four capture and four compare channels each), PWM unit (six outputs) and watchdog.

– Low power Real-Time Clock (RTC) with independent power and 32 kHz clock input.

– Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus (400 kbit/s), SPI and SSP with buffering and variable data length capabilities.

– Vectored Interrupt Controller (VIC) with configurable priorities and vector addresses.

– Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package.

– Up to 21 external interrupt pins available.

– 60 MHz maximum CPU clock available from programmable on-chip PLL with settling time of 100 ms.

– On-chip integrated oscillator operates with an external crystal from 1 MHz to 25 MHz.

– Power saving modes include Idle and Power-down.

– Individual enable/disable of peripheral functions as well as peripheral clock scaling for additional power optimization.

– Processor wake-up from Power-down mode via external interrupt or BOD.

– Single power supply chip with POR and BOD circuits:

– CPU operating voltage range of 3.0 V to 3.6 V (3.3 V ± 10 %) with 5 V tolerant I/O pads.

Page 4

Block Diagram:

Page 5

MEMORY MAP:

Page 6

SCHEMATIC

Page 7

10K

100n

100n

100n

10p

10p

10uF

/6.3

V

470u

F/16

VD

C

100n

47uF

/6.3

V

10n

18p

18p

47uF

/6.3

V

100n

100n

100n

100n

100n

100n

39p

39p

SM

A1N

5819

1N4148

1N4148

1N41

48

1N41

48

BA

T54C

B-D

IL3

470n

H

12M

Hz

3276

8/6p

F

BC

807

10K

10K

10K

10K

10K

10K

470

10K

22K

10K

22K

NA

10K

10K

10K

2K2K

0

NC

240/

1%

390/

1%

2K

2K

33 33

330

330

330

1.5K

330

0

10K

10K

10K

10K

100K

33K

33K

2K

10K

10K

220

22K

10K

NA

SW

-TA

KT6

SD

-CA

RD

BC

846

BC

846

MC

P13

0T

MA

X32

32

LPC

214X

US

B_B

yello

w

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V 3.

3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

3.3V

LM11

17

P1.

[16.

.25]

,RTC

K,T

DO

,TD

I,TC

K,T

MS

,TR

ST

SC

K1,

MIS

O,M

OS

I,SS

EL1

+5V

_US

B

+5V

_US

B

AD

03

AD

03B

1

B1

B2

B2

BS

L

BS

L

BU

ZZ

1

BU

ZZ1

BU

ZZ

2

BU

ZZ

2

CO

NN

EC

T

MIS

O0

MIS

O0

MIS

O1

MIS

O1

MIS

O1

MIS

O1 M

ISO

1

MO

SI0

MO

SI0

MO

SI1

MO

SI1

MO

SI1

MO

SI1

P1.1

6P

1.16

P1.

17P

1.17

P1.

18P

1.18

P1.

19P

1.19

P1.

20P

1.20

P1.

20

P1.

21P

1.21

P1.

22P

1.22

P1.

23P1

.23

P1.2

4P1

.24

P1.

24

P1.

25P

1.25

P1.

25

RS

T

RS

T

RS

T

RT

CK

RT

CK

RX

0IN

RX

1IN

RX

1IN

RX

D0

RX

D0

RX

D1

RX

D1

SC

K0

SC

K0

SC

K1

SC

K1

SC

K1

SC

K1

SC

L0

SC

L0

SD

A0

SD

A0

SS

EL0

SS

EL0

SS

EL1

SS

EL1

SS

EL1

SS

EL1

TC

K

TC

K

TD

I

TDI

TD

OT

DO

TM

S

TM

S

TR

ST

TRST

TX0

OU

TT

X1O

UT

TX

1OU

T

TXD

0

TXD

0

TXD

1

TX

D1

TXD

1

VIN

VR

EF

3.3V

AD

03

AN

_TR

AO

UT

B1

B2

12B

AT

BS

L

BU

ZZE

R

C1

C2

C3

C4

C5 C

6

C7

C8

C9

C10

C11

C12

C13

C14

C16

C17

C18

C19

C20

C27

C28

D1

D2

D3

D4

D5

D6

12D

BG

_E

G1

GN

D

1234I2

C

12 3

4ICSP

12

34

56

78

910

1112

1314

1516

1718

1920

JTA

GL1

LED

1LE

D2

P0.

12P

0.13

P0.

21P

0.22

P0.

28P

0.29

P1.

16P

1.17

P1.

18P

1.19

P1.

20P

1.21

P1.

22P

1.23

P1.

24P

1.25

PW

R

PW

R_J

AC

K

Q1

Q2

Q3

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

R13

R14

R15

R16

R17

R18

R19

R20

R21

R22

R23

R24

R25

R26

R27

R28

R29

R30

R31

R32

R33

R34

R35

R36

R37

R38

R39

R40

R41

R42

R43

R44

R45

123

RS1/UEXT1 2 3 4 5

6 7 8 9

RS

232_

0/IC

SP

1 2 3 4 5

6 7 8 9

RS

232_

1

RS

T

CD

/DA

T3/C

S1

CLK

/SC

LK5

CM

D/D

I2

CP

113

CP

215

DA

T0/D

O7

DA

T1/R

ES

8

DA

T2/R

ES

9

VD

D4

VS

S1

3

VS

S2

6

WP

110

WP

214

SD

/MM

C

123456S

PI0

123456S

PI1

T1T2

3

12

GN

D

VC

CR

ES

ET

U1

C1+

1

C1-

3

C2+

4

C2-

5

R1I

N13

R1O

UT

12

R2I

N8

R2O

UT

9

T1IN

11T1

OU

T14

T2IN

10T2

OU

T7

V+

2

V-

6

U2

1516

GN

DV

CCU2P

WR

P0.

0/TX

D0/

PW

M1

19

P0.

1/R

XD

0/P

WM

3/E

INT0

21

P0.

2/S

CL0

/CA

P0.

022

P0.

3/S

DA

0/M

AT0

.0/E

INT1

26

P0.

4/S

CK

0/C

AP

0.1/

AD

0.6

27

P0.

5/M

ISO

0/M

AT0

.1/A

D0.

729

P0.

6/M

OS

I0/C

AP

0.2/

AD

1.0

30

P0.

7/S

SE

L0/P

WM

2/E

INT2

31

P0.

8/TX

D1/

PW

M4/

AD

1.1

33

P0.

9/R

XD

1/P

WM

6/E

INT3

34

P0.

10/R

TS1/

CA

P1.

0/A

D1.

235

P0.

11/C

TS1/

CA

P1.

1/S

CL1

37

P0.

12/D

SR

1/M

AT1

.0/A

D1.

338

P0.

13/D

TR1/

MA

T1.1

/AD

1.4

39

P0.

14/D

CD

1/E

INT1

/SD

A1

41

P0.

15/R

I1/E

INT2

/AD

1.5

45

P0.

16/E

INT0

/MA

T0.2

/CA

P0.

246

P0.

17/C

AP

1.2/

SC

K1/

MA

T1.2

47

P0.

18/C

AP

1.3/

MIS

O1/

MA

T1.3

53

P0.

19/M

AT1

.2/M

OS

I1/C

AP

1.2

54

P0.

20/M

AT1

.3/S

SE

L1/E

INT3

55

P0.

21/P

WM

5/A

D1.

6/C

AP

1.3

1

P0.

22/A

D1.

7/C

AP

0.0/

MA

T0.0

2

P0.

23/V

BU

S58

P0.

25/A

D0.

4/A

OU

T9

P0.

28/A

D0.

1/C

AP

0.2/

MA

T0.2

13

P0.

29/A

D0.

2/C

AP

0.3/

MA

T0.3

14

P0.

30/A

D0.

3/E

INT3

/CA

P0.

015

P0.

31/U

P_L

ED

/CO

NN

EC

T17

P1.

16/T

RA

CE

PK

T016

P1.

17/T

RA

CE

PK

T112

P1.

18/T

RA

CE

PK

T28

P1.

19/T

RA

CE

PK

T34

P1.

20/T

RA

CE

SY

NC

48

P1.

21/P

IPE

STA

T044

P1.

22/P

IPE

STA

T140

P1.

23/P

IPE

STA

T236

P1.

24/T

RA

CE

CLK

32

P1.

25/E

XTI

N0

28

P1.

26/R

TCK

24

P1.

27/T

DO

64

P1.

28/T

DI

60

P1.

29/T

CK

56

P1.

30/T

MS

52

P1.

31/T

RS

T20

RS

T57

RTC

X1

3

RTC

X2

5

US

BD

+10

US

BD

-11

VB

AT

49

VD

D3(

A)

7

VD

D3-

1(I/O

)23

VD

D3-

2(I/O

)43

VD

D3-

3(I/O

)51

VR

EF

63

VS

S1

6

VS

S2

18

VS

S3

25

VS

S4

42

VS

S5

50

VS

SA

59

X1

62

X2

61

U3

UE

XT-

1U

EX

T-2

UE

XT-

3U

EX

T-4

UE

XT-

5U

EX

T-6

UE

XT-

7U

EX

T-8

UE

XT-

9U

EX

T-10

1 2 3 4

US

B

US

B_L

INK

VIN

AD

J/G

ND

INO

UT

VR

1(3.

3V)

VR

EF

12V

RE

F-3.

3V

6VA

C9V

DC

LPC

-P21

48R

ev. D

CO

PY

RIG

HT(

C)

2009

, Olim

ex L

td.

http

://w

ww

.olim

ex.c

om/d

ev

+

+

+

+

12

ON

GN

D

USB SH

IEL

D

BOARD LAYOUT

POWER SUPPLY CIRCUITLPC-P2148 can take power from three sources:

– External power supply 9.0V DC or 6.0V AC.

– +5V_USB from USB connector

– Extension pins VIN and GND

RESET CIRCUITLPC-P2148 reset circuit includes pin 15 of JTAG connector, U1 (MCP130T), D4 (1N4148), R8 (10k), LPC2148 pin 57 (RST) and RESET button.

CLOCK CIRCUITQuartz crystal with name Q1 (12 MHz) is connected to LPC2148 pin 61 (X2) and pin 62 (X1).

Quartz crystal with name Q2 (32.768 kHz) is connected to LPC2148 pin 3 (RTCX1) and pin 5 (RTCX2).

Page 8

JUMPER DESCRIPTIONDBG_E

When this jumper is shorted – selects the microcontroller's debug mode.Default state is closed.

VREF-3.3VWhen this jumper is shorted – connects LPC2148 pin 63 (VREF) to 3.3V.

Default state is closed.

RS1/UEXTWhen this jumper is shorted in position RS1 – connects LPC2148 pin 34 (RXD1) to U2

(MAX3232) pin 9 (R2OUT); when this jumper is shorted in position UEXT - connects LPC2148 pin 34 (RXD1) to UEXT pin 4.

Default state is shorted in position RS1.SLIDE SWITCH

INPUT/OUTPUTUSB_UP_ LED (yellow) with name USB_LINK connected to LPC2148 pin 17 (P0.31/UP_LED/CONNECT).

Status LED1 (red) with name LED1 connected to LPC2148 pin 35 (P0.10/RTS1/CAP1.0/AD1.2).

Status LED2 (red) with name LED2 connected to LPC2148 pin 37 (P0.11/CTS1/CAP1.1/SCL1).

Power-on LED (red) with name PWR – this led shows that +3.3V is applied to the board.

User button with name B1 connected to LPC2148 pin 45 (P0.15/RI1/EINT2/AD1.5).

User button with name B2 connected to LPC2148 pin 46 (P0.16/EINT0/MAT0.2/CAP0.2).

Reset button with name RST connected to LPC2148 pin 57 (RST).

Trimpot with name AN_TR connected to LPC2148 pin 15 (P0.30/AD0.3/EINT3/CAP0.0).

BUZZER connected to LPC2148 pin 38 (P0.12/DSR1/MAT1.0/AD1.3) and pin 39 (P0.13/DTR1/MAT1.1/AD1.4).

Page 9

CONNECTOR DESCRIPTIONSJTAG:

The JTAG connector allows the software debugger to talk via a JTAG (Joint Test Action Group) port directly to the core. Instructions may be inserted and executed by the core thus allowing LPC2148 memory to be programmed with code and executed step by step by the host software.

For more details refer to IEEE Standard 1149.1 - 1990 Standard Test Access Port and Boundary Scan Architecture and LPC2148 datasheets and users manual.

Pin # Signal Name Pin # Signal Name

1 +3.3V 2 +3.3V

3 TRST 4 GND

5 TDI 6 GND

7 TMS 8 GND

9 TCK 10 GND

11 RTCK 12 GND

13 TDO 14 GND

15 RST 16 GND

17 NC 18 GND

19 NC 20 GND

Page 10

RS232_0/ICSP:

Pin # Signal Name

1 NC

2 TX0OUT

3 RX0IN

4 Slide Switch pin 3

5 GND

6 NC

7 Slide Switch pin 4

8 NC

9 NC

RS232_1:

Pin # Signal Name

1 NC

2 TX1OUT

3 RX1IN

4 NC

5 GND

6 NC

7 NC

8 NC

9 NC

Page 11

UEXT:

Pin # Signal Name

1 3.3V

2 GND

3 TXD1

4 Via JMP RS1/UEXT to RXD1

5 SCL0

6 SDA0

7 MISO0

8 MOSI0

9 SCK0

10 SSEL0

PWR_JACK:

Pin # Signal Name

1 Power Input

2 GND

BAT:

Pin # Signal Name

1 to 3.3V

2 GND

Page 12

SD/MMC:

Pin # Signal Name Pin # Signal Name

1 SSEL1 2 MOSI1

3 GND 4 +3.3V

5 SCK1 6 GND

7 MISO1 8 PULL-UP

9 PULL-UP 10 P1.24

11 Via R23 to GND 12 Via R22 to GND

13 P1.25 14 PULL-DOWN

15 PULL-DOWN

USB:

Pin # Signal Name

1 +5V_USB

2 USB_D-

3 USB_D+

4 GND

Page 13

EXT:

Page 14

I2CThe I2C-bus is bidirectional, for inter-IC control using only two wires: a serial clock line (SCL),

and a serial data line (SDA). Each device is recognized by a unique address and can operate as either a receiver-only device. Transmitters and/or receivers can operate in either master or slave mode, depending on whether the chip has to initiate a data transfer or is only addressed. The I2C-bus is a multi-master bus, it can be controlled by more than one bus master connected to it.

The I2C-bus implemented in LPC2148 supports bit rates up to 400 kbit/s (Fast I2C-bus).

Features:– Compliant with standard I2C-bus interface.– Easy to configure as master, slave, or master/slave.– Programmable clocks allow versatile rate control.– Bidirectional data transfer between masters and slaves.– Multi-master bus (no central master).– 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– Serial clock synchronization can be used as a handshake mechanism to suspend and

resume serial transfer.– The I2C-bus can be used for test and diagnostic purposes.

SPIThe SPI is a full duplex serial interface, designed to handle multiple masters and slaves

connected to a given bus. Only a single master and a single slave can communicate on the interface during a given data transfer. During a data transfer the master always sends a byte of data to the slave, and the slave always sends a byte of data to the master.

Features:– Compliant with SPI specification.– Synchronous, Serial, Full Duplex, Communication.– Combined SPI master and slave.– Maximum data bit rate of one eighth of the input clock rate.

Page 15

MECHANICAL DIMENSIONS

Page 16

AVAILABLE DEMO SOFTWARE

– USB mouse demo for EW-ARM 5.40

– board peripherials demo code for EW-ARM 4.42

– RF link with MOD-NRF24LR

– OpenSource USB stack for LPC

– BLINK-LED project with GCC+OpenOCD+Eclipse

– OpenOCD + Eclipse set of projects 1.00 include flash write make file for LPC-P2148.

Page 17

ORDER CODELPC-P2148 – assembled and tested (no kit, no soldering required)

How to order? You can order to us directly or by any of our distributors. Check our web www.olimex.com/dev for more info.

Revision history:

REV. D - create November 2009

Page 18

Disclaimer:

© 2010 Olimex Ltd. All rights reserved. Olimex®, logo and combinations thereof, are registered trademarks of Olimex Ltd. Other terms and product names may be trademarks of others.

The information in this document is provided in connection with Olimex products. No license, express or implied or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Olimex products.

Neither the whole nor any part of the information contained in or the product described in this document may be adapted or reproduced in any material from except with the prior written permission of the copyright holder.

The product described in this document is subject to continuous development and improvements. All particulars of the product and its use contained in this document are given by OLIMEX in good faith. However all warranties implied or expressed including but not limited to implied warranties of merchantability or fitness for purpose are excluded.

This document is intended only to assist the reader in the use of the product. OLIMEX Ltd. shall not be liable for any loss or damage arising from the use of any information in this document or any error or omission in such information or any incorrect use of the product.

Page 19