Rev 1.1
KSL Embedded
2007
LPC214x Development KIT User's Guide
Embedded Solution
www.kslemb.com Page 2
Copyright 2007 KSL Embedded. All rights reserved No part of this document may be used, published, reproduced, translated into any language or used in other articles, without the prior written permission of KSL Embedded. Information in this document is subject to change without notice. We appreciate any feedback you may have for improvements this document. Please send you comments to [email protected]. All referenced brands, products names, service names and trademarks are the property of their respective owners.
mailto:[email protected]
Embedded Solution
www.kslemb.com Page 3
Description Thank you for buying KSL Embedded LPC214x Development KIT. The LPC214x Development KIT is a complete development platform for NXP ARM7 LPC214x series processors. It is a cost effective, flexible and highly integrated board, useful for develop custom embedded applications and evaluate all features of the new powerful ARM7 processor. Board includes:
High performance LPC2148 ARM7TDMI-S device with 512KBytes Flash memory, 40KByte on-chip SRAM, USB 2.0 Full Speed Function, two independent UARTS, SPI, SSP, I2Cs.
10Mbit Ethernet controller ENC28J60 with SPI interface from Microchip. 500Kbps 430/860/915MHz wireless low power transceiver CC1100 from
Texas Instruments. 32.768 KHz RTC crystal and battery for time backup. RS-232 interface for Uart0 and selectable RS-232 or RS-485 interface for
Uart1 External 64KBytes I2C EEProm for board setting storage and WEB Server
applications. Silicon temperature sensor with I2C Bus TCN75 from Microchip. Graphical LCD 128x32 dots with I2C interface and blue backlight.
Contents The box received when ordering LPC214x Development KIT includes: LPC214x Development Board. USB A-B cable. Serial extension cable DB9-male DB9-femail for debugging and programming
purpose. An optional Wiggler JTAG adapter for debugging. CD-ROM that includes datasheet‟s, board schematic, software examples, useful drivers end etc.
Design and Product Service KSL Embedded provide design services for custom designs, either completely new or modification to existing boards. Specific peripherals and I/O can be added easily to different designs, for example, communication interfaces, specific analog or digital I/O.
Embedded Solution
www.kslemb.com Page 4
Getting around the LPC214x Development KIT
X2: USB X9: Ethernet X5:Uart1 RS-485
X4: Uart0 RS-232
A1: SMA-JR Antena connector
X3: Uart1 RS-232
J5: Uart0 RTS Boot
J4: Uart0 DTR Reset
X1: External power connector
J6: Uart1 RXD Switch
J3: USB powered
J2: External power
J7: JTAG enable
X6: JTAG connector
J1:RS-485 terminator enable
Expansion Slot 1 (X7)
Expansion Slot 2 (X8)
Embedded Solution
www.kslemb.com Page 5
The figure above shows the major parts of the LPC214x Development KIT. Diagrams and wiring descriptions for all connectors are provided in schematic.
Power Supply
There are two different ways of applying power to the LPC214x Development KIT: First method (factory default) involves using the USB power supply throw USB B jack. Second method applies DC power supply (+5V) from the lab power supply to X1 jack (External Power connector). Note that if multiple power sources are connected, the source with the highest voltage will power the board. Using the jumpers J2 and J1 you can choose what power supply will be used as a power source for the board.
Table 1. Power supply switches.
Switch Name Default position
Function
J2 Extern power supply OFF Enable extern power supply
J3 USB powered ON Enable USB power supply
The LPC214x Development KIT contains one regulated 3.3V power supply. It based on Motorola low drop fixed voltage regulator DA1 MC33269-DT3.3. The maximum output current of the voltage regulator is 800 mA. All elements of the board use the +3.3V power supply. There is the exception only the driver of the RS-485 interface use +5V power supply. Also +5V supply routed to the expansion socket‟s X7 and X8 and to the RS-485 RJ11 connector X5.
Processor and memory devices The NXP LPC214x processor (DD6) provided with the Development KIT is a high-end device with advanced ADC and DAC features, USB 2.0 Full Speed interface, PWM features, have SPI ,SSP and two I2C interfaces. An 12 MHz crystal provides the clock signal to the microcontroller. This crystal is used for develop USB applications. The maximum execution speed is 12.000*5 = 60 MHz. The crystal frequency may be changed to any desired value, see LPC214x datasheet for detail. The board also contains a 32.768 kHz crystal that is used by the on-chip real-time clock, and +3V backup battery for save time register values in power down mode. Diodes VD6 and VD7 are used for disable power consumption from battery in normal operation mode. Board comes with placed 512Kbytes I2C EEPROM DD4. IC connected to the MCU I2C0 bus (SCL pin 22, SDA pin 26).
USB interface LPC214x Development KIT support USB 2.0 12 Mbit Full Speed function. Pin P0.31 (Connect) is used for Soft Connect USB feature. The HL3 RED led will fire, when device configured and connected to the USB Bus. Standard USB B connector used for connect board to the PC Host.
Embedded Solution
www.kslemb.com Page 6
10 BASE-T Ethernet interface
LPC214x Development KIT comes with installed (DD7) Stand-Alone Ethernet Controller from Microchip ENC28J60. This is IEEE 802.3 compatible Ethernet controller with Integrated MAC and 10BASE-T PHY and 8-Kbyte transmit/receive packet dual port SRAM. For communicate with controller LPC214x SPI1 used. SPI1 initialized to:10Mbit data transfer, SPI Frame format, SCK Active Low with data is sampled on the first clock edge of SCK.
Table 2. ENC28J60 wiring table.
LPC214x PIN
Name ENC28J60
PIN Name Function
P0.17 (47) SCK1 SCK (8) SCK Clock for SPI™ interface
P0.18 (53) MISO1 SO (6) SO ENC28J60 Data out pin
P0.19 (54) MOSI SI (7) SI ENC28J60 Data in pin
P0.20 (55) SS1 CS (9) CS ENC28J60 chip select input
ENC28J60 is used in polling mode that is INT and WOL pins not connected to the LPC 214x MCU. The J00-0045 8-pin Integrated magnetics connector from Pulse is used as transformer and RJ45 jack. Integrated Green Led mounted in RJ45 jack connected to the LEDA pin of the Ethernet controller and the Orange Led is connected to the LEDB pin.
Wireless transceiver interface KIT contains 430/860/915MHz 500KBps wireless transceiver CC1100 (DD8). This transceiver was chosen from considering of low cost and small energy consumption. For communication with transceiver SPI0 bus is used. Additionally, the transceiver interrupt line GDO0 (6) is used for wake up the processor from a state of low energy consumption. It connected to the LPC214x interrupt EINT3. Resistors R37…R41 that mounted on the SPI bus lines together with CC1100 input pins capacitance, working as noise filters. As default, for great noise immunity transceiver CC1100 have own power supply – Microchip low drop, low question current regulator MCP1701. Inductor L9 (not mounted) is used to provide +3.3V power supply if linear regulator DA2 is not mounted on the board. Antenna match network calculated for use with band 800-928MHz. The board with transceiver for 430MHz band may be produced on demand.
Table 3. CC100 wiring table.
LPC214x PIN
Name ENC28J60
PIN Name Function
P0.4 (27) SCK0 SCLK (1) SCLK Clock for SPI™ interface
P0.5 (29) MISO0 SO (2) SO ENC28J60 Data out pin
P0.6 (30) MOS0 SI (20) SI ENC28J60 Data in pin
P0.7 (31) SS0 CS (7) CS ENC28J60 chip select input
P0.30(15) EINT3 GDO0 (6) GDO0 Digital out pin for general use
Embedded Solution
www.kslemb.com Page 7
Temperature sensor Board equipped with Microchip serial temperature sensor TCN75 (DD5). Main features of this sensor is: temperature sensing with 0.5°C accuracy, operating in wide range from -55°C to +125°C. For communication with sensor I2C0 interface is used.
LCD Graphical Display
All modern products need graphical user interface. LPC214x Development KIT has serial graphical display with low power feature. Display manufactured with COG technology, have 128 x 32 dots, I2C bus for control and refresh display contents, build in contrast control schematic and Blue backlight. The LPC2148x PWM output (P0.21) is connected to the LCD led backlight for control light intensity. The Philips PCF8531 is used as LCD pixel driver/controller for this display. For communicate with LCD LPC214x I2C0 bus is used.
RS-232 and RS-485 communication interfaces LPC214x has two „550 industry standard UART‟s. UART0 throw MAX3232 (DD2) RS-232 transceiver is connected to the DB9 male connector. This Uart used for debug and program purpose. Important note: there is an unfortunate error in the version 1.0 of the
board. The TXD and RXD signals of the RS232 interface have been switched. That is why you must use our supplied RS-232 cable for connect LPC214x board to the PC. The second UART1 routed to the RS-232 and RS-485 interfaces. You may connect other equipment to UART1 RS-232 lines throw X3 connector.
The table below shows X3 UART1 RS-232 signal description.
Table 4. UART1 RS-232 wiring table.
X3 PIN
Name Function
1 GND Ground
2 RX UART1 Rx line
3 +3.3V +3.3V power supply
4 TX UART1 Tx line
Embedded Solution
www.kslemb.com Page 8
If you want connect board to the RS485 line – you may use UART1 RS-485 interface (X5 connector). UART1 TX and RX signal routed to the Sipex SP485 (DD3) half-duplex RS-485 transceiver. LPC214x P0.10 line control the transmit/receive bus direction.The Table 5 below shows the X5 RJ11 connector signals.
Table 5. RS-485 wiring table.
X5 (RJ11) PIN
Name Function
1 GND Ground
2 GND Ground
3 A RS-485 “A” line
4 B RS-485 “B” line
5 +5V +5V power supply
6 +5V +5V power supply
Jumper J1 used for connect the termination resistor 120 Ohm between A and B lines of the RS-485 interface.The RX1 receive line of the UART1 is routed to the expansion slot X8. If you want use the RX1 line in expansion slot, you must disable UART1 RX1 line for RS-232 and RS-485 interfaces. By removing jumper J6 you will disable this connection. Two led‟s HL1 and HL2 is used for visualize the UART1 communication. HL1 is used for receive operation and HL2 used for transmit. The board has direct and automatic support for program downloading (via ISP) over the RS232 serial channel. The RS232 signal DTR controls the reset signal to the LPC214x microcontroller. The RS232 signal RTS is connected to pin P0.14 in the LPC214x microcontroller. This pin is sampled after reset and determines if the internal bootloader program shall be started, or not. A low signal after reset enters the bootloader mode. The RTS/DTR signals can be disconnected from the microcontroller via two jumpers on the board. J4 control DTR line. J5 control RTS line.
Embedded Solution
www.kslemb.com Page 9
JTAG interface
The LPC214x series of the microcontrollers contain an embedded JTAG interface, that can be used for debug and program purpose. A standard ARM 20 pin JTAG header is used for communicate with board (X6). The signal RTCK of the microcontroller is sampled during reset. Jumper J7 drives this signal low and enables JTAG interface.
Table 6. JTAG connector description
X6 JTAG
Name Function
1 +3.3V +3.3V power supply
2 +3.3V +3.3V power supply
3 JTRST Test Reset for JTAG interface
4 GND Ground
5 JTDI Test data input for JTAG interface
6 GND Ground
7 JTMS Test mode select for JTAG interface
8 GND Ground
9 JTCK Test Clock for JTAG interface
10 GND Ground
11 RTCK Returned Test Clock output
12 GND Ground
13 JTDO Test data out for JTAG interface
14 GND Ground
15 RST Reset
16 GND Ground
17 Not used Connected throw 10K to GND
18 GND Ground
19 Not used Connected throw 10K to GND
20 GND Ground
Expansion connectors Board has two standard 2.54mm (PLS) 20 pin expansion connectors X8 and X7.
Embedded Solution
www.kslemb.com Page 10
Table 7. Expansion connector X7
X7 Slot 1
Name Function
1 +5V +5V power supply
2 GND Ground
3 +3.3V +3.3V power supply
4 INT0 Interrupt line EINT0
5 SCK1 SPI1 serial clock
6 SS1 SPI1 slave select signal
7 MISO1 SPI1 Master input / Slave output
8 MOSI1 SPI1 Master output / Slave input
9 SS0 SPI0 slave select signal
10 MOSI0 SPI0 Master output / Slave input
11 MISO1 SPI0 Master input / Slave output
12 SCK0 SPI0 serial clock
13 SDA I2C0 data line
14 SCL I2C0 clock line
15 INT CPU EINT3 interrupt line
16 P0.29 GPIO
17 P0.28 GPIO
18 AOUT DAC analog output
19 P0.22 GPIO
20 PWM PWM5 output
Table 8. Expansion connector X8
X8 Slot 2
Name Function
1 +5V +5V power supply
2 GND Ground
3 +3.3V +3.3V power supply
4 P1.16 GPIO
5 P1.17 GPIO
6 P1.18 GPIO
7 P1.19 GPIO
8 P1.20 GPIO
9 P1.21 GPIO
10 P1.22 GPIO
11 P1.23 GPIO
12 P0.15 GPIO
13 P0.13 GPIO
14 P0.12 GPIO
15 P0.11 GPIO
16 P0.10 GPIO
17 RXD1 UART1 receive line
18 TXD1 UART1 transmit line
19 P1.25 GPIO
20 P1.24 GPIO
Embedded Solution
www.kslemb.com Page 11
Mechanical dimensions
The picture below contains a LPC214x board drawing with mechanical dimensions.
Board Schematic The picture below contains a LPC214x board schematic
Embedded Solution
www.kslemb.com Page 12
Embedded Solution
www.kslemb.com Page 13
Getting started with firmware development For software development you may need next software and hardware components: 1. Compiler/linker, editor and debugger: 1.1. Free 32K KickStart edition of IAR Embedded Workbench for ARM v4.30 or higher. 1.2. Rowley CrossWorks for ARM v1.5 or higher 30-day evaluation version. 2. JTAG for debugging/programming purpose: 2.1. H-JTAG Server with the version 0.3.1 or higher. 2.2. Wiggler JTAG or any other. 2.3. Parallel port on you PC for JTAG if need. 2.4. USB Port or external power supply source. 3. Getting started: Install KickStart IAR Embedded Workbench for ARM. Install H-JTAG Server. Connect JTAG 20-pin IDC cable to JTAG board connector. Short the JTAG enable J7 jumper. Connect USB AB cable to the PC or connect to the X1 HU-jack external +5V power supply (properly set the jumpers J2 and J3). Double click on H-JTAG desktop icon for start the JTAG driver. If the target was successfully detected you will see the next window:
If you don‟t see the ARM7TDMI signature in H-JTAG Server window you may use the detect button for start new scan of the ARM device. If target not detected even though you click on the “Detect target” button, check the JTAG setting by pressing “JTAG settings” button. KSL Embedded JTAG has the next settings:
Detect target
H-Flasher
JTAG Settings
Embedded Solution
www.kslemb.com Page 14
If the target detected successfully now we may minimize H-JTAG Server to the tray. Copy from received CD Getting Started project to you hard drive. Launch IAR Embedded Workbench KickStart. Open “LCD_project” workspace throw the main menu File-Open-Workspace:
Project has three versions: Debug RAM Debug FLASH and Release. Debug versions of the example is used for debug with C-SPY. Release version of the example, used for download to MCU and execute from flash memory. Debug RAM version differ from Debug FLASH version with program allocation.
Useful notes for debug settings: From menu choose Project-Options or simply press the Alt+F7. You will enter to the option menu for current project with configuration that you chose in workspace (Debug RAM, Debug FLASH or Release).
Embedded Solution
www.kslemb.com Page 15
Enter to the C/C++ Compiler inlay. In menu Optimizations choose None (Best debug support).
In menu Output check the Generate debug information box.
In Preprocessor menu you will see the pass to the project files and defined symbols window (“FLASH” keyword, for example, used for keep the vectors in flash memory).
Embedded Solution
www.kslemb.com Page 16
Next useful inlay is Linker. On the Output tab enable the Debug information for C-SPY and check the box C-SPY-extra output file (option useful for FLASH debug).
Embedded Solution
www.kslemb.com Page 17
If you use FLASH Debug configuration you will need to check the box “Generate the extra output file” (simple-code) file on the Extra Output tab. This simple-code file used for IAR Flash loader for program it to the internal microcontroller flash.
In the Config tab you must chose corresponding linker (xcl) file. For Debug RAM it is a Ram.xcl. For Debug FLASH and Release configurations it must be Flash.xcl. This files are located in the project Linker directory,
Embedded Solution
www.kslemb.com Page 18
The next step is a configure debugger. In the debugger inlay choose Setup tab. Use RDI driver and remember, check the Run to main box for directly jump to the main() start. Use appropriate macro file: „Flash.mac‟ for Debug FLASH configuration and „Ram.mac‟ for Debug RAM configuration. This macro files also resides in the Linker directory.
In Download tab set check boxes “Use flash loader(s)” and “Verify download” if you use Debug FLASH configuration. If you use Debug RAM configuration don‟t set any check box.
In the RDI inlay chose the H-JTAG.dll as a RDI driver.
Embedded Solution
www.kslemb.com Page 19
Now you are ready to Build and Debug with IAR C-SPY the “Getting started” application. For the Release configuration in the Linker tab you may choose Intel-extended output file format for downloading it to the board with Philips ISP utility or H-JTAG Flasher software.
Software Links IAR Embedded Workbench KickStart: for ARM www.iar.se Rowley Associates CroosWorks for ARM www.rowley.co.uk H-JTAG Server software www.hjtag.blogspot.com NXP documentation & ISP tool www.standardics.nxp.com/products/lpc2000/
http://www.iar.se/
Copyright 2007 KSL Embedded. All rights reservedNo part of this document may be used, published, reproduced, translated into any language or used in other articles, without the prior written permission of KSL Embedded. Information in this document is subject to change without notice. We appreciate ...DescriptionContentsDesign and Product ServiceGetting around the LPC214x Development KITPower SupplyProcessor and memory devicesUSB interface10 BASE-T Ethernet interfaceWireless transceiver interfaceTemperature sensorLCD Graphical DisplayRS-232 and RS-485 communication interfacesJTAG interfaceExpansion connectorsMechanical dimensionsBoard Schematic/Getting started with firmware development/Software Links