lpc-p2138 development board - olimex€“ low power real-time clock with independent power and...

16
LPC-P2138 development board Users Manual All boards produced by Olimex are ROHS compliant Rev. B, July 2009 Copyright(c) 2010, OLIMEX Ltd, All rights reserved Page 1

Upload: dangtuong

Post on 06-May-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

LPC-P2138 development board Users Manual

All boards produced by Olimex are ROHS compliant

Rev. B, July 2009Copyright(c) 2010, OLIMEX Ltd, All rights reserved

Page 1

INTRODUCTION

LPC-P2138 is prototype board which uses LPC2138 microcontroller. With its two buttons, potentiometer, variety of interfaces such as RS232, JTAG, I2C, Dallas; extension connector for some of the microcontroller's pins and prototype area, this board is suitable for different embedded systems applications.

BOARD FEATURES

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

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

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

– single power supply: 6V AC or DC required

– power supply LED

– two status LED

– power supply filtering capacitor

– two channel RS232 interface

– Li-ion 3V battery holder

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

– RESET button

– two user buttons

– two RS232

– DBG jumper for JTAG enable

– BSL jumper for bootloader enable

– JRST jumper for enable/disable external RESET vontrol by RS232

– 14.7456 Mhz crystal on socket, allow easy communication setup (4x PLL = 58,9824 Mhz CPU clock)

– 32768 Hz crystal and RTC backup battery connector

– extension headers for all uC ports

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

– Dimensions: 114.81 x 79.86 mm (4.52x3.14")

Page 2

ELECTROSTATIC WARNING

The LPC-P2138 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: Depends on the used programming/debugging tool. It could be 1.8 meter USB A-B cable to connect ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY and ARM-USB-TINY-H to USB host on PC or LPT cable in case of ARM-JTAG or other programming/debugging tools. You will need a serial cable if not for programming, than for configuring the board.

Hardware: Programmer/Debugger – some of Olimex programmers are applicable, for example ARM-JTAG, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, ARM-USB-TINY-H or other compatible programming/debugging tool.

PROCESSOR FEATURES

LPC-P2138 board use LPC2138 microcontroller based on a 16/32-bit ARM7TDMI-S CPU with real-time emulation and embedded trace support, that combine the microcontroller with 512 kB of embedded high-speed flash memory. A 128-bit wide memory interface and a unique accelerator architecture enable 32-bit code execution at maximum clock rate. with these features:

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

– In-System Programming/In-Application Programming (ISP/IAP) via on-chip bootloader 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.

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

– Single 10-bit DAC provides variable analog output.

– 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 with independent power and dedicated 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 with configurable priorities and vector addresses.

– Up to forty-seven 5 V tolerant general purpose I/O pins

– Up to nine edge or level sensitive external interrupt pins available.

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

Page 3

– On-chip integrated oscillator operates with external crystal in range of 1 MHz to 30 MHz and with external oscillator up to 50 MHz.

– Power saving modes include Idle and Power-down.

– Individual enable/disable of peripheral functions as well as peripheral clock scaling down 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

LI_B

ATT

ER

Y_H

OLD

ER

100n

100n

100n

100n

470u

F/16

VD

C

100n

NA

NA

15p

47uF

/6.3

V

15p

100n

100n

100n

100n

100n

39p

39p

BA

T54C

1N4148

1N41

48

1N41

48

1N41

48

B-D

IL

14.7

4MH

z

3276

8/6p

10K

10K

10K

10K

10K

10K

1K

10K

22K

22K

22K

1K

10K

10K

240/

1%

390/

1%

0

560

560

33

4.7K

BC

846

LPC

213XM

AX

3232

MC

P13

0T

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

AIN

0

AIN

0

B1

B1

B2B2

BSL

BSL

DAL

LAS

DAL

LAS

LED

1

LED

1

LED

2

LED

2

RST

RST

RST

RTC

K

RTC

K

RX0

INR

X1IN

RX1

IN

RXD

0

RXD

0

RXD

1

RXD

1

TCK

TCK

TDI

TDI

TDO

TDO

TMS

TMS

TRST

TRST

TX0O

UT

TX1O

UTTX

1OU

T

TXD

0

TXD

0

TXD

1

TXD

1

3.3V

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

AN

_TR

B1

B2

12B

AT

+-

BA

T1

C1

C2

C3

C4

C5

C7

C8

C11

C12

C13

C14

C16

C17

C18

C19

C20

C27

C28

D2

D3

D4

D6

D7

1 2

DA

LLA

S

12D

BG

G1

GN

D

GR

EE

N

12 3

4ICSP/RUN

12

34

56

78

910

1112

1314

1516

1718

1920

JTA

G

12L1

12L2

P0.

0P

0.1

P0.

2P

0.3

P0.

4P

0.5

P0.

25P

0.26

P0.

27P

0.28

P0.

29P

0.30

P0.

31

P1.

16P

1.17

P1.

18P

1.19

P1.

20P

1.21

P1.

22P

1.23

P1.

24P

1.25

P1.

26P

1.27

P1.

28P

1.29

P1.

30P

1.31

PW

R

PW

R_J

AC

K

Q1

Q2

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11 R12

R13

R14

R20

R21

R22

R25

R29

R30

R31

1 2 3 4 5

6 7 8 9

RS

232

1 2 3 4 5

6 7 8 9

RS

232/

ICS

P

RST

T1

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.

2358

P0.

25/A

D0.

4/A

OU

T9

P0.

26/A

D0.

510

P0.

27/A

D0.

0/C

AP

0.1/

MA

T0.1

11

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.

3117

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

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

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

GND

VCCU

2PW

R

3

12

U5

GN

D

VC

CR

ES

ET

AD

J/G

ND

INO

UT

VR

1(3.

3V)

YE

LLO

W

6VD

C

LPC

-P21

38R

ev. B

CO

PY

RIG

HT(

C)

2009

, OLI

ME

X L

td.

http

://w

ww

.olim

ex.c

om/d

ev

+

+

+

12

ON

BOARD LAYOUT

POWER CIRCUITLPC-P2138 can is typically power supplied with 6 VDC from power jack.The programmed board power consumption is about 50 mA.

RESET CIRCUIT

LPC-P2138 reset circuit includes R8 (10k) pull-up, D4 (1N4148), U5 (MCP130T) and RST button.

CLOCK CIRCUIT

Quartz crystal Q1 14.7456 MHz is connected to LPC2138 pin 61 (X2) and pin 62 (X1).Quartz crystal Q2 32.768 KHz is connected to LPC2138 pin 3 (RTCX1) and pin 5 (RTCX2).

Page 8

JUMPER DESCRIPTION

L1Connects YELLOW Led to LPC2138 pin 38 (P0.12/DSR1/MAT1.0/AD1.3).Default state is closed.

L2Connects GREEN Led to LPC2138 pin 39 (P0.13/DTR1/MAT1.1/AD1.4).Default state is closed.

DBGEnables JTAG debug operations.Default state is closed .

INPUT/OUTPUT

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

User button with name B1, connected to LPC2138 pin 45 (P0.15).

User button with name B2, connected to LPC2138 pin 46 (P0.16).

Potentiometer with name AN_TR, connected to LPC2138 pin 11 (P0.27).

Status Led (yellow) with name YELLOW connected to LPC2138 pin 38 (P0.12).

Status Led (green) with name GREEN connected to LPC2138 pin 39 (P0.13).

Power-on Led (red) with name PWR shows that 3.3V is applied to the board.

Page 9

EXTERNAL CONNECTORS DESCRIPTIONJTAG

Pin # Signal Name Pin # Signal Name

1 +3.3 V 2 +3.3 V

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 Not Connected 18 GND

19 Not Connected 20 GND

EXT1

Pin # Signal Name Pin # Signal Name

1 TXD0 2 RXD0

3 P1.16 4 P1.17

5 P.18 6 P1.19

7 P1.20 8 P1.21

9 P1.22 10 P1.23

11 P1.24 12 P1.25

13 RTCK 14 TDO

15 TDI 16 TCK

17 TMS 18 TRST

Page 10

EXT2

Pin # Signal Name Pin # Signal Name

1 3.3 V 2 P0.2

3 P0.3 4 P0.4

5 P0.5 6 P0.6

7 P0.7 8 TXD1

9 RXD1 10 DALLAS

11 P0.11 12 P0.12

13 P0.13 14 BSL

15 P0.15 16 P0.16

17 P0.17 18 P0.18

19 P0.19 20 P0.20

21 P0.21 22 FREQ

23 P0.23 24 P0.25

25 P0.26 26 AIN0

27 AIN1 28 AIN2

29 AIN3 30 P0.31

31 GND

DALLAS

Pin # Signal Name

1 DALLAS(P0.10)

2 GND

BAT

Pin # Signal Name

1 VBAT

2 GND

Page 11

RS232

Pin # Signal Name

1 Not Connected

2 TX1OUT

3 RX1IN

4 Not Connected

5 GND

6 Not Connected

7 Not Connected

8 Not Connected

9 Not Connected

RS232/ICSP

Pin # Signal Name

1 Not Connected

2 TX0OUT

3 RX0IN

4 DTR

5 GND

6 Not Connected

7 Not Connected

8 Not Connected

9 NC

PWR:Pin # Signal Name

1 Power Input

2 GND

Page 12

MECHANICAL DIMENSIONS

Page 13

AVAILABLE DEMO SOFTWARE

• RS232 initialization demo code

• RTC initialization demo code • Blink LED and buttons demo code • OpenOCD + Eclipse set of projects 1.00 include flash write make file for LPC-P2138.

Page 14

ORDER CODE

LPC-P2138 - completely assembled and tested.

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. B - create July 2009

Page 15

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 16