Home

100/10M Ethernet LPC2138 QuickStart Board User`s Guide

image

Contents

1. Copyright 2005 Embedded Artists AB KRALJ GND ALT ALN N SW1 PUSHBUTTON GND 100 10M Ethernet LPC2138 QuickStart Board User s Guide 2 4 3 SPI The LPC2138 microcontroller has an on chip SPI serial communication channel actually two but only one of then is available on the expansion connector Figure 12 below illustrates how a SD MMC memory card can be connected to the 00 10M Ethernet LPC2138 QuickStart Board In this example pin P0 12 is used as chip select for the external SPI unit Pins P0 13 and P0 26 are used for checking if a memory card actually is inserted and if it is write protected or not Observe that one chip select signal 1s requires for each external chip that is connected to the SPI bus 3 IXD E RXD pas 7 ar 7 11 JQ 4 PO G MlC 20 NWO GND BO27 AINC P0 12 GND U 28 AIN U 290 AIN 2 AL PO 30 A LN 2u Z0 Zo e N co gt co T J9 MMC SD MOLEX 67781 CS DIN GND 1 VCC CLK GND 2 DOUT R15 RSV1 RSV2 CARD DETECT COMMON WRITE PROTECT GND 3 Figure 12 Example SPI Interface for SD MMC Connector Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Figure 13 below illustrates how serial EPROM chip and a shift register for I O expansion also can be connected to the SPI bus PO 4 560 amp Po MOSI Bo SSO 3ND PO AING EI elei ND PO SO AIN PD 28 AIM FO 4R ACILL PD 30 4A
2. 100M Ethernet QuickStart Board User s Guide Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Get Up and Running Quickly and Start Developing on Day 7 2 Embedded Artists EA2 USG 0511 v1 1 RevA 100 10M Ethernet LPC2138 QuickStart Board User s Guide Embedded Artists AB Friisgatan 33 SE 214 21 Malm Sweden info EmbeddedArtists com http www EmbeddedArtists com Copyright 2005 Embedded Artists AB All rights reserved No part of this publication may be reproduced transmitted transcribed stored in a retrieval system or translated into any language or computer language in any form or by any means electronic mechanical magnetic optical chemical manual or otherwise without the prior written permission of Embedded Artists AB Disclaimer Embedded Artists AB makes no representation or warranties with respect to the contents hereof and specifically disclaim any implied warranties or merchantability or fitness for any particular purpose Information in this publication is subject to change without notice and does not represent a commitment on the part of Embedded Artists AB Feedback We appreciate any feedback you may have for improvements on this document Please send your comments to support EmbeddedArtists com Trademarks InfraBed and ESIC are trademarks of Embedded Artists AB All other brand and product names mentioned herein are trad
3. 1024 0x40000000 Ju alc 8 1024 0x40000000 LPC2132 16 1024 0x40000000 LPC2134 16 1024 0x40000000 LPC2136 32 1024 0x40000000 LPC2138 32 1024 0x40000000 LPC2210 16 1024 0x40000000 LPC2214 16 1024 0x40000000 LPC2220 64 1024 0x40000000 LPC2290 16 1024 0x40000000 LPC2292 16 1024 0x40000000 LPC2294 16 1024 0x40000000 T define SRAM SADDR 0x40000000 SRAM starting address define SRAM SIZE 32 1024 LPO2LSB define SRAM TOP SRAM SADDR SRAM SIZE SRAM end address 1 define stackSize SYS 600 define stackSize SVC 64 define stackSize UND 64 define stackSize ABT 64 define stackSize IRQ 600 define stackSize FIQ 64 define STK SIZE stackSize SYS stackSize SVC stackSize UND stackSize ABT stackoize IROtstackSize FIO define STK SADDR SRAM EADDR 1 STK SIZE Stack start address define CONSOL UART 0 define CONSOL BITRATE 115200 define USE NEWLIB 0 0 do not use newlib save about 22k FLASH 1 use newlib full implementation of printf scanf and malloc define CONSOLE API PRINTF 1 0 printf sendString 1 simple own implementation of printf define CONSOLE API SCANF 1 0 none 1 simple own implementation of scanf endif config h Figure 24 Board Support Package BSP Configuration File There are three versions of the consol in order to best fit different situations e Avery simple version that ba
4. 3 docs e esics it evboards EE IL PC2xxx gec newlib v2 0 0 0 gt bin 3 E sample project C build Files c startup Figure 25 Sample Project Files under QuickStart Build Environment Installation The startup framework BSP is very simple and can best be understood by studying the source code files If using the console functionality printf and scanf like functions observe that the function ealnit must be called before printf and the console can be used The following code segment illustrates this include ea init h int main void eaInit Now the console printf can be used Also observe that whenever the BSP printf should be used the following include file must be included into the source code file include lt printf P h As a summary Embedded Artists QuickStart Build Environment is comprised of e A make build environment controlled by bash script A program or library build is started via the command make e A program download feature by using the LPC21ISP program A program build and download is started via the command make deploy e A Board Support Package BSP with startup code and console functions 1 e printf and scanf like functionality Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 3 3 2 GCC This will be very similar to the QuickStart Build Environment example except that you will have to set up
5. define USE PLL 1 0 do not use on chip PLL 1 use on chip PLL define PLL MUL 4 PLL multiplication factor 1 to 32 define PLL DIV 2 PLL division factor 1 2 4 or 8 define PBSD 4 Peripheral bus speed divider 1 2 or 4 initialize the MAM Memory Accelerator Module Tif FOSC PLL MUL 20000000 define MAM TIMING 1 number of CCLK to read from the FLASH elif FOSC PLL MUL lt 40000000 define MAM TIMING 2 number of CCLK to read from the FLASH else define MAM TIMING 3 number of CCLK to read from the FLASH endif define MAM SETTING 2 Q disabled l partly enabled enabled for code prefetch but not for data 2 fully enabled define IRQ HANDLER 1 Q Jump to common IRQ handler Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 1 Load vector directly from VIC i e LDR PC PC OxFFO initialize the exception vector mapping define SRAM EADDR SRAM SADDR SRAM SIZE 1 SRAM end address define MAM MAP I 1 exception vectors are in FLASH at 0x0000 0000 2 exception vectors are in SRAM at 0x4000 0000 ud CHIP SRAM SIZE SRAM START ADDRESS LPC2104 16 1024 0x40000000 LPC2105 32 1024 0x40000000 LPCZIUO 64 1024 0x40000000 LPC2114 16 1024 0x40000000 x DPOZLLS 16 1024 0x40000000 LPC2124 16 1024 0x40000000 LPC2129 16 1024 0x40000000 LPCZIO94 16
6. presented that will lower the threshold of start developing with the board 2 1 Board Schematics v1 1 TITLE 100M Ethernet LPC2138 QSB v1 1 Date 1 12 2086 11 86 19p Document Number 0 2 PO OTXDOPYWM PO VRADOPYVALVONTO PO 2 SCLOPCAPO 0 PO 4SCK CAPO t AIN PO 6MOSIO C APO VANS Po S5SELOPVM2 EONT2 PO BTXD1 PNMAIAINS PO WRXD1 FPVAETENT3 PO 4DCD EINTT SDA PO 154 UEINTZUAIN13 PO 29 AINZ CAPO YMATO 3 PO J0 ANJEINTIVCAPO 0 P122PPESTAT P1232 PESTAT2 Pt 24 TRACECLK P125S EXTINO Pt 20 RTCK 27 TDO ps 28 TDI P1 2WTCK Pt 30 TMS Pi 3t TRST PO 28 AINTICAPPO 2 MATO 2 PO 2T AINOICAPO VMATO 1 f PO ySDAGW4AT0 DENT XTAL2 PO SANSOOMATO AN7 SET XTAL1 RTCX AE Figure 1 100 10M Ethernet LPC2138 QuickStart Board Schematic v1 1 Page 1 Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide TITLE 100M Ethernet LPC2138 OSB v1 1 Date 1 12 2888 11 86 15 Document Number AGND C26 zzpF D xk 25MHz o3 Crs HE Pipa Ed Ee bee e dez I Figure 2 100 10M Ethernet LPC2138 QuickStart Board Schematic v1 1 Page 2 Copyright 2005 Embedded Artists AB lt b So e prem Cab e LI Oo 9 m T e lt 9 G e 9 b CN o au ET Cb em Cab f rum LLI gt q 2 gt gt 2 2 Board Schematics
7. 0 201 73719 1 Also available in PDF form on the ARM Technical Publications CD 6 ARM System Developer s Guide Designing and Optimizing System Software by A N Sloss D Symes C Wright Elsevier ISBN 1 55860 874 5 7 Embedded System Design on a Shoestring by Lewin Edwards Newnes ISBN 0750676094 8 GNU Manuals http www gnu org manual 9 GNU ARM tool chain for Cygwin http www gnuarm com 10 An Introduction to the GNU Compiler and Linker by Bill Gatliff http www billgatliff com 11 LPC2000 Yahoo Group A discussion forum dedicated entirely to the Philips LPC2xxx series of microcontrollers http groups yahoo com group 1pc2000 12 The Insider s Guide to the Philips ARM7 Based Microcontrollers by Trevor Martin http www hitex co uk arm Ipc2000book index html Especially observe document 3 There exist a number of bugs in the processor that is important to be aware of Observe that there can be newer versions of the documents than the ones linked to here Always check for the latest information version Datasheets for all circuits on the 00 10M Ethernet LPC2138 QuickStart Board are included on the accompanying CD ROM Copyright 2005 Embedded Artists AB
8. 24 via P1 25 Figure 5 100 10M Ethernet LPC2138 QuickStart Board LEDs The microcontroller crystal frequency is 14 7456 MHz This frequency has been selected in order to allow close to maximum execution speed 4 x 14 7456 MHz 58 9824 MHz which is very close to the maximum frequency 60 MHz as well as to provide standard serial communication bit rates The crystal frequency can be changed to any desired value for OEM orders provided that the conditions in the LPC2138 datasheet are met Current requirements are but consult the most current datasheet for latest details e 1 30 MHz if the on chip phase locked loop PLL is not used or Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide e 10 25 MHz if the PLL is to be used The board also contains a 32 768 kHz crystal that is used by the on chip real time clock on LPC2138 The LPC2138 microcontroller does not have an external data bus to connect to the Ethernet controller Instead a data bus must be simulated via general purpose digital I O pins on the microcontroller 14 pins are needed to connect the DM9000E Ethernet controller Figure 4 shows the exact connection which is also replicated in Table 1 below Interrupt request P0 15 LPC2138 input pin that can be connected to the internal interrupt controller Controller reset P0 31 LPC2138 output pin Memory cycle write P1 23 LPC2138 output pin Memory cycle read P1 22 LPC21
9. 3 c ctt java nl 1 12 0 gi 6 1 exe There is also a newer but less well tested version based on GCC v4 0 0 Only use this newer version if you are an experienced user The installation is very simple and straightforward It s just following the default installation steps as illustrated in the pictures below is Setup GNUARM Welcome to the GNUARM Setup Wizard This wall install GHUAR M 3 4 3 on pour computer It iz recommended that you close all other applications before continuing Click Next ta continue ar Cancel to exit Setup Next gt Cancel js Setup GNUARM License Agreement Please read the following important information before continuing Please read the following License Agreement You must accept the terms of this agreement before continuing with the installation GNU GENERAL PUBLIC LICENSE Version 2 June 1991 Copyright E 1383 1381 Free Software Foundation Inc 53 Temple Place Suite 330 Boston MA 02111 1307 USA Everuorie iz permitted to copy and distribute verbatim copies of this license document but changing it is not allowed Preamble The licenses for mast software are designed to take away your accept the agreement AK e agreement LUE Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Copyright 2005 Embedded Artists AB Toa Setup GNUARM Select Destination Location Where should GNUARM be in
10. HH EE EE EH HEE EH HEE EH HEE E E E EE EH HH EE HE Name of target executable program or library NAME testprogram 10m eth Name of resulting program file Path and name of linker script file Only needed for executable program files LD SCRIPT build files link rom ld Define linker script ELF file contains debug information or not possible values for DEBUG are 0 or 1 Extra debug flags can be specified in DBFLAGS DEBUG 1 DBFLAGS Optimization setting Os for small code size 02 for speed OFLAGS Os Extra general flags For example compile for ARM THUMB interworking EFLAGS mthumb interwork EFLAGS The files are compiled in THUMB mode Program code run in ARM or THUMB mode Can be ARM THUMB CODE THUMB List C source files here The root folder only contains one CSRCS main c file the main file t List assembler source files here ASRCS Three different subdirectories that contains different blocks of functions in the final application List subdirectories to recursively invoke make in SUBDIRS startup tepip Y pre emptive os List additional libraries to link with LIBS startup libea startup thumb a N tepip tepip k X pre emptive os pre emptive os a The three libraries that are created in the recursive invocation of make are included in the final application Add include search path for startup fi
11. RIC test string is 6 Embedded Artists 2685 EEPROM and IZC test est Hi write string String Hi done status code OK program cycle completed write string done status code OK program cycle completed read string from address string is String 1 read string from address string is sTrInG a write string done status code OK program cycle completed read string from address 68060 StrisTrinG 2 TrlnG 2 eTrIng 2 Passed all tests taking 3 seconds Test program for LPC213x QuickStart Board A KER KEE to address 6xHHHH to address 6x 8Bai BxBBBNB Axati to address 6x4 test program_lpce2idx_qsh hex to binary format to binary format padded padded padded padded padded Figure 20 LPC21ISP Portable Command Line ISP Download Screenshot Another benefit with this program is that it runs under Linux Program Download Phase Terminal Phase Use version 1 28 or later of LPC21ISP EXE since older versions must be recompiled with increased reset timeout when the program tries to synchronize to the 00 10M Ethernet LPC2138 QuickStart Board The timeout should be increased to at least 350 ms 3 3 Program Development There are many options when it comes to the actual application program development First of all you must select a development environment 1 e an editor preferably with project management capabilities a compiler package c
12. all paths manually and create your own startup files The make files will also be a bit more complex An example makefile is presented in Figure 26 below More complex examples than the makefile below also exist Example makefile that creates a program called test containing the C source code files main c eeprom c and i2c c plus the assembler file startup S LIBS DEBUG g CFLAGS Wall nostartfiles mthumb interwork mthumb INCLUDE Iinc linc specific specify include paths here arm elf gcc OBUS main o eeprom o i2c o startup o LDFLAGS Wl Trom ld this file controls the linker all test hex test S OBJS arm elf gcc CFLAGS LDFLAGS OBJS S LIBS o test elf arm elf gcc c S INCLUDE S CFLAGS lt oo arm elf gcc c S INCLUDE S CFLAGS lt ve arm elf gcc c S INCLUDE S CFLAGS lt hex arm elf objcopy O ihex S elf SQ oe O oe oe O ox ARMCC oe Clean rm f o test elf test hex Figure 26 Example GCC Makefile Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 3 4 Installing QuickStart Build Environment This section describes the necessary steps of program installation that is needed to get the QuickStart Build Environment ready for your use e Start with installing the GNUARM distribution that is included in the CD ROM The current version of the file is called bu 2 15 gcc 3 4
13. for Embedded Artists QuickStart Boards C 2001 2005 Embedded Artists AB HHH HHH Ht EH HHH EH HEH EH Ht HH EE HE HH ot EH HEH HE EH ot EH HEH HE HH Name of target executable program or library NAME libea startup thumb E x Name of resulting library ELF file contains debug information or not possible values for DEBUG are 0 or 1 Extra debug flags can be specified in DBFLAGS DEBUG 1 DBFLAGS Optimization setting Os for small code size O2 for speed OFLAGS Os Extra general flags For example compile for ARM THUMB interworking EFLAGS mthumb interwork EFLAGS mthumb interwork The files are compiled in ARM ict M nS mode with THUMB interworking CODE ARM see EFLAGS List C source files here CSRCS consol c List all included C source files framework c f List assembler source files here AROG star dps List all included assembler files List subdirectories to recursively invoke make in SUBDIRS Program code run in ARM or THUMB mode Select whether an executable program file or a library shall be created One of the lines is commented out List additional libraries to link with LIBS Add include search paths INC I Select if an executable PROGRAM MK true LIBRARY MK true include build files general mk tat it at ae aE ae aE He aE eae eae ae aA aa aaa aaa aaa aaa Figure 22 Example QuickStart Buil
14. v1 0 C i 199us egLiELL GOpZ 62 8 eeQ 01 p 149qunN ueuno2og T paeog 34EISADIND BETZIGT 18ua8u13 HOOT TUILL COND LIN Ode aii 1SH1A id ete MIIA Ld TIVIS3didt Ld SSA SSA SSA PSSA FSSA VSSA wA PEA z A ESA 338 1v8 0140196 Ld i O4 0 Od v OY 1NI3ANIVOC Od O1VIV amp GV DCN GZ Od ZOLVTOT Od VN YAZ Od L OLVTW Od v DVONWILZ Od SNIWIRE Od ANONA NGE Od EZ 04 001 VIVO Odv 2g I NIIT Od E LdvOPri N YAPIBAdE LE Od INIY113SSX L2VINOZ Od z INO LISONWE 11VINV 1 Od LLYW OSWUE Ldv21 Od CIL VIVILNOSE LdYOdi Od COdv Ort 0101 N 391 Od CIN YT NE IN SI Odi VYOS LINI 3M QOQ vl Od TINWE LLW HLO EI Od CLNI3 AMA S 1CICH6 Od ONMM LO 1 8 Od TLNG TINAA0138S4 Od SNIT Odv OG SOnV9 Od t O1 vWOOSWS Od Sti cOd TCEIZOd 1 in ERRRRRERRES 9i ITU e a iJ Niy 1nOlM inogzi NEL inoti NIU Figure 3 100 10M Ethernet LPC2138 QuickStart Board Schematic v1 0 Page 1 Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 8 29 2085 18 13 18a TITLE 100M Ethernet LPC2138 QuickStart Board Document Number Date 15121 I_ LLL LLLI L1 EN EEEEEEE nee a Midi TI all bebe of clo fs FT iii Figure 4 100 10M Ethernet LPC2138 QuickStart Board Schematic V1 0 Page 2 The board input power is 5 0V DC and is feed di
15. 00 10M Ethernet LPC2138 QuickStart Board lets you get up and running quickly with Philips ARM7TDMI LPC2138 microcontroller The small form factor board offers many unique features that ease your development Copyright 2005 Embedded Artists AB Philips ARM7TDMI LPC2138 microcontroller with 512 KByte program Flash and 32 KByte SRAM Proven DM9000E 100 10 Mbps Ethernet MAC Some LPC2138 I O pins are available on expansion connectors 14 7456 MHz crystal for maximum execution speed Phase locked loop PLL multiplies frequency with four 4 x 14 7456 MHz 58 9825 MHz 32 768kHz RTC crystal ESD EMI protected RS232 channel with DSUB 9 connector Signals available on expansion connector 100 10M Ethernet LPC2138 QuickStart Board User s Guide e RS422 RS485 interface e 2 Kbit I2C E2PROM for storing non volatile parameters like MAC address IP address subnet mask and default gateway e On board low dropout voltage and reset generation Generates 3 3V from a 5V supply 3 3V available for external circuits up to 300 mA Power supply 4 5 6 VDC at least 200 mA e Simple and automatic program download ISP via RS232 channel Circuit that automatically controls the bootloader from RS232 channel e Easy to connect to JTAG signals e Dimensions 50 x 100 mm Small form factor for easy integration 2x16 pins expansion I O connector Four layer PCB FR 4 material for best noise immunity 1 3 Low Cost
16. 100 10M Ethernet LPC2138 QuickStart Board design along with the accompanying software and program development tools The document contains information on how to use and integrate the board in your own designs including electrical and mechanical information 1 1 Contents The box received when ordering the 100 10M Ethernet LPC2138 QuickStart Board contains the following The 100 10M Ethernet LPC2138 QuickStart Board CD ROM which includes additional material and programs including complete and evaluation versions of different development environments Observe that bulk orders 10 or 100 boards only include one CD ROM In addition the following is needed in order to start developing applications with the 100 10M Ethernet LPC2138 QuickStart Board A DC power supply 5 0 volt capable of providing at least 200 mA more if external circuits need power from the 3 3 volt supply The 00 10M Ethernet LPC2138 QuickStart Board does not contain reverse polarity protection Observe that the 00 10M Ethernet LPC2138 QuickStart Board does not contain any reverse polarity protection If voltage is applied with wrong polarity the board will likely be damaged A serial extension cable DB9 male to DB9 female DB9M DMOF for connecting the 7 00 10M Ethernet LPC2136 QuickStart Board to a PC for example for downloading program code into FLASH An optional JTAG interface for program development debugging 1 2 Features Embedded Artists 7
17. 32 signal RTS is connected to pin P0 14 in the LPC2138 microcontroller This pin is sampled after reset and determines if the internal bootloader Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 13 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 links jumpers on the board See Figure 8 below for details Jumper J10 connects the RS485 receive signal to UART channel 1 Observe that the RS232 interface must not be connected to UART channel 1 at the same time as the RS485 interface 1s Jumpers J3 and J5 select if UART channel 0 or 1 shall be connected to the RS232 interface Jumper J10 enable RS485 interface to UART 1 In order from left to right J3 RxD J5 TxD Jumpers in lower position connects UART channel 0 to RS232 interface and in upper position to UART channel 1 In order from left to right J7 P0 14 J8 Reset for enabling automatic ISP program download Figure 8 100 10M Ethernet LPC2138 QuickStart Board Jumpers Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 14 There is an unfortunate error in the schematic for version 1 0 of the board The RTS and CTS signals of the RS232 interface have been switched The signal from pin 7 of U2 the RTS signal has bee
18. 38 output pin Table 1 DM9000E Connections to LPC2138 The extra delay that is added when simulating the data bus will be a bottle neck for the data throughput of the board However a continuous data throughput of 1Mbps can be achieved and few embedded systems have a greater need for data throughput The DM9000E has three LEDs connected Their use and interpretation can be controlled via registers in DM9000E The three LEDs are mounted in the RJ45 connector Version 1 0 of the board contains a 2x16 pin expansion connector that contains some not all of the LPC2138 I O pins Version 1 1 contains a 2x17 pin expansion connector e Version 1 1 has the I2C bus available on the expansion connector Version 1 0 does not have this feature e An ESD EMI protected RS232 serial channel Either UART channel 0 or channel 1 can be connected to the RS232 interface signals This is controlled by jumpers J3 and J5 see Figure 8 for more information about jumper setting The RS232 signals are connected to the female 9 pol DSUB connector and the expansion connector e A full duplex RS485 interface connected to UART channel 1 e The LPC2138 SPI channel MOSI MISO SCK signals plus three extra general purpose digital I O signals for chip select of external SPI interfaces P0 12 P0 13 and P0 26 A MMC SD card interface can for example easily be created e Four analog inputs and one analog output These signals can also be general purpose digita
19. BG a Norton Antivirus 9 Ethernet Developer s QuickStart Kit Demonstration Below is a number of sample applications that illustrates some of the functionality included in Embedded Artists Ethernet Developer s QuickStart Kit Applet This example demonstrates how a Java Applet can be used as a graphical user interface for an embedded system File System This example displays the content of the file system using an EGI which is called from a SSI Server Side Include Registry This is an example that illustrates how to interact with the registry persistent storage in e2prom using a number of EGIs Form Get This example contains an HTML Form which calls an EGI using a HTTP GET request The content of the request is displayed in the result page LED This example controls the two application controllable LEDs on the embedded system Form Post This example contains an HTML Form which calls an EGI using a HTTP POST request The content of the request is displayed in the result page SSI This example is using two SSI Server Side Include commands exec and include The exec command calls an EGI while the include command includes an html page in this case it includes itself Embedded Artists Legal Information Privacy Statement The Art of Embedded Systems Development made Easy D Internet http 192 168 1 230 ssi shtml Figure 16 Example Web Server Output The Applet exa
20. Programming The LPC2138 microcontroller provides on chip bootloader software that allows programming of the internal flash memory over the serial channel The bootloader is activated by pulling port pin P0 14 low during reset of the microcontroller The 100 10M Ethernet LPC2138 QuickStart Board contains circuits for automatically controlling pin P0 14 and the reset signal over the RS232 channel This allows the program download to be fully automated o Philips provides a utility program for In System Flash ISP programming called LPC2000 Flash Utility o Alternatively there is a program called LPC21ISP that can be used Source code is available This program also provides a terminal functionality which can be very helpful when developing your application program The same serial channel that is used to download the program is typically also used for printing out information from the running program The program immediately switch to terminal mode after program download and will hence not miss any characters sent on the serial channel directly after program start The installation files for both programs can be found on the accompanying CD ROM e JTAG For specific information about program download 1 e Flash programming with a Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 23 JTAG interface consult the manual for the specific JTAG interface that is used e g J link from S
21. Start Menu Folder Where should Setup place the program s shortcuts f Setup will create the program s shortcuts in the following Start Menu folder To continue click Nest IF vou would like ta select a different folder click Browse Browse pg 05 lt Back see J js Setup GNUARM Select Additional T asks Which additional tasks should be performed Select the additional tasks you would like Setup to perform while installing GHUARM then click Hest Additional icons Install the Cygwin DLLs Cygwin options Install Cygwin DEL is Setup GNUARM Ready to Install Setup is now ready to begin installing GNHUARM en your computer Click Install to continue with the installation or click Back if you want to review or change any settings Destination location L PragramsGNLIAR M Setup type Custom installation Selected components Little Endian LE Libraries No Fast Multiplier ARM THUMB Interworking THUMB THUMB Libraries p C ue am 100 10M Ethernet LPC2138 QuickStart Board User s Guide e Now install the LPC2xxx gcc newlib vX X X X QuickStart Build Environment vX X X X is the current version of the file The installation is also in this case very simple and straightforward Just follow the default installation steps E LPC2xxx gcc newlib InstallShield Wizard Welcome to the InstallShield Wizard for LPC2xxx gcc newlib The InstallShield R Wizard wi
22. The 00 10M Ethernet LPC2138 QuickStart Board is very low cost and can be used for prototyping development as well as for OEM applications Modifications for OEM applications can be done easily even for modest production volumes Contact Embedded Artists for further information about design and production services 1 3 1 Design and Production Services Embedded Artists 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 and power supplies Embedded Artists has a broad and long experience in designing industrial electronics in general and with Philips LPC2xxx microcontroller family in specific Our competence also includes wireless and wired communication for embedded systems For example IEEE802 11b g WLAN Bluetooth ZigBee ISM RF Ethernet CAN RS485 and Fieldbuses 1 4 Other QuickStart Boards and Kits Visit Embedded Artists home page www EmbeddedArtists com for information about other QuickStart boards kits or contact your local distributor Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 2 Board Design This chapter contains detailed information about the electrical and mechanical design of the 100 10M Ethernet LPC2138 QuickStart Board A number of example circuits are also
23. a library that can be used for non commercial applications e Access to a number of sample applications that demonstrated different peripheral functions in the LPC2138 processor e Access to the latest versions of all information and programs on the CD ROM Registering 1s easy and done quickly 1 Go to http www EmbeddedArtists com select Support and then Register 2 Type in the products serial number can be found on the 00 10M Ethernet LPC2138 QuickStart Board or on the package carrying the board along with your personal information Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 43 5 Further Information The LPC2138 microcontroller is a complex circuit and there exist a number of other documents with a lot more information The following documents are recommended as a complement to this document 1 Philips LPC213x Datasheet http www semiconductors philips com acrobat datasheets LPC2131 32 34 36 38 2 pdf 2 Philips LPC213x User s Manual http www semiconductors philips com acrobat usermanuals UMI0120 1 pdf 3 Philips LPC2138 Errata Sheet http www semiconductors philips com acrobat erratasheets 2138 pdf 4 ARM7TDMI Technical Reference Manual Document identity DDI0029G http www arm com pdfs DDI0029G_7TDMI R3 trm pdf 5 ARM Architecture Reference Manual Document identity DDIO100E Book Second Edition edited by David Seal Addison Wesley ISBN
24. benefits from using the program as a terminal directly after program download No characters are missed after program start The used command is lpc21isp term control testprogram lpc213x qsb hex coml 115200 14746 The picture below is just an illustration and not an actual output from the test program of the 100 10M Ethernet LPC2138 QuickStart Board Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide LPC2106 gcc newlib v1 0 n Menti a version 2 88 File A testprogram lpc2i13x qgsb hex loaded onverting file File testprogram lpc213x uysh Marning data Marning data Marning data Warning data Warning data Image address Read bootcode Read part ID I sector Wi izuliliziluzudwucda mcrceuuc o ems uvm ur XX eee Pee eee eee ee ee ees Download Finished not aligned to 4 not aligned to not aligned to not aligned to not aligned to 4 4 4 4 byte hyte byte hyte byte hex converted address address address address address Bx AHHH 16688 bytes Suyunchronizing OK vers ion address HxiHdWHBHHiE55 address 6xHGQHH1E56 address 6xQ681E57 address HxiHdWBBHBH262f address BxBBBB262B 2 4 8 LPC2132 64 kiB ROM 16 kiB SRAM 51963627 Now launching the brand new code erminal started Xpress Escape to abort i Version Date 2005 07 12 est HZ est H3 Test 4 est 5 Test H6 Summary of tests
25. bugger An evaluation version can be downloaded from Keils homepage One version of the development environment is based on the GCC compiler currently version 3 3 1 of GCC e Programmers notepad This is a very good editor and project manager that is increasing in popularity The program can easily be integrated with the GCC compiler e Eclipse CDT This is a very good development environment editor and project manager with specific support for C C code development It does not contain a compiler but can easily be connected to one for example GCC e GCC distribution GNUARM A complete distribution of GCC specifically for ARM processors Current version of GCC is 3 4 3 and the new 4 0 0 and it is constantly updated WinARM This is another distribution that not only contains GCC but also Programmers Notepad LPC21ISP a terminal program and JTAG drivers 3 3 1 QuickStart Build Environment The QuickStart Build Environment 1s a complete build environment for GCC including program downloading via ISP The build environment is built around a bash script This script sets up all necessary paths When installing the QuickStart Build Environment you will automatically get shortcuts to this bash script A practical feature is that there can be different scripts for different hardware platforms for controlling different hardware specific details of the platforms There can also be many different compilers including different versions of
26. d Environment Makefile from Startup Library As seen in Figure 22 above the makefile ends with the command include build files general mk This is a general make file that is part of the complete build environment This part contains all specific details of compiler and linker invocation Also at the end the target must be decided either an executable program or a library Either PROGRAM MKor LIBRARY MK must be set to true Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide The example makefile above is quite simple to its structure It is possible to create more complex project structures that contains many subprojects A typical example is to have an application project in a root folder Under this root folder a number of subdirectories exist containing different blocks of functionality For example this can be a Real Time Operating System and a TCP IP stack This calls for a recursive makefile structure The makefile in the root filer will create an executable program It also includes the makefile in each of the subdirectories The makefiles that exist in subdirectories will create libraries An example of a root make file is presented in Figure 23 below FE TE a at He He AE He a FE eA aE AEP aE AE AEP EE EEE it General makefile for building executable programs and libraries for Embedded Artists QuickStart Boards C 2001 2005 Embedded Artists AB Ht TH HH HEH EH EE HH
27. e RS232 DSUB 9 connector The test program will output test information regarding the 32 678 kHz crystal test the EPROM registry test and the RS485 test The settings for the terminal program are 115 2 kbps 8 data bits no parity bits and one stop bit 1 e 8N1 The output from the test program will look something like in Figure 15 below BEE ali LPC xxx gcc newlib v2 0 0 0 make deploy Welcome to the 166716N Ethernet LPGC2138 Quickstart Board test program Version 1 H fc 2665 Embedded Artists X x K o K EE StartupzInitializing File System Registry Ethernet driver est Hi Registry test OKt Current values IP address 172 168 1 23H Subnet Mask 255 255 255 zzi Default Gateway 172 168 1 1 H C address 21 6 152 1 114 15 Startup board Change IP address Change Subnet Mask Change Default Gateway Change M C addrezss Heset to default values LT x n2 Isa m IS Press any key within 3 seconds to change setting TCP IP Meh Server Server started Test H2 RIC initializing test K Running LED and R 485 tests are now started Observe that the H amp 5485 test will fail if not TH gt RH and TL RL are connected to each other tthe H5485 test is a loopback test umper Ji must also be inserted connects the R 485 interface to UART Hi he web server sample applications can also be checked hy opening a web browser to the board s IP addr
28. e the suggested path Installshield ie LPC2xxx gcc newlib InstallShield Wizard Ready to Install the Program The wizard is ready to begin installation Click Install to begin the installation IF vou want to review or change any of your installation settings click Back Click Cancel to exit the wizard Installshield p Observe that if the compiler is not installed on the default location c Program GNUARM the new path must be set in the files build sh and build environment sh Both files can be found in C Program InfraBed evboards LPC2xxx gcc newlib vxX X X X bin It is the variable COMPILERDIR2 that must be set can be found on line 13 in both files The compiler path must be to the GNUARM bin directory Observe that the path above must contain the correct version number instead of VX X X X bin It may for example be v2 1 0 0 bin 3 5 Sample Ethernet Driver The sample driver project is very simple Both a polled and an interrupt driven implementation is presented The driver consists of two or three C source code files main c ethdrv dm9000 c and ethisr c if interrupt implementation e The file ethdrv dm9000 c is the actual sample Ethernet driver that connects the DM 9000E Ethernet controller to the I O pins of the LPC2138 processor It also Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 3 5 1 contains all send and receive functions t
29. egger Ulink from Keil or Wiggler from MacRaigor Connect all two jumpers links J7 J8 on the 00 10M Ethernet LPC2138 QuickStart Board This will connect the RS232 channel to the active control over pin P0 14 and the reset signal After program download both jumpers links can be left connected or removed if needed If for example the PC end controls the RS232 signals DTR and or RTS during normal program execution then it might be required that jumpers links J7 and J8 are removed after program download 3 2 1 Philips LPC2000 Flash Utility Philips LPC2000 Flash Utility program looks like Figure 18 below 9i lves uy Fron Utility File Buffer Help LPC2000 Flash Utility V2 2 1 r Hash Pregramming r Erase Bak a 4 r Eemmunicatian Filename Connected To Park C testprogram 100m eth Ipc2138 hex is Blank Check f Entire Device COM1 gt Selected Sectors Unload to Flash iv Execute Code Use Baud Rate pload to Flas w fuo e after Upload start Sector J Erase Compare Flash Manual Reset End Sector 14 Time Clut sec 2 Device prz130 496299 for Reset and ee Head m V Boot Loader ATAL Freg kHz 14746 Device ID Bot Loader pj c Selection O p Use DTH RTS Head Part ID Successfully Figure 18 Philips LPC2000 Flash Utility Screenshot Configure the dialog as shown above The program will control the RS232 signals DTR and RTS if
30. emarks services marks registered trademarks or registered service marks of their respective owners and should be treated as such Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Table of Contents 1 Introduction 4 1 4 Contents 4 1 2 Features 4 1 3 Low Cost 5 1 3 1 Design and Production Services 5 1 4 Other QuickStart Boards and Kits 5 2 Board Design 6 2 1 Board Schematics v1 1 6 2 2 Board Schematics v1 0 8 2 3 Mechanical Dimensions 15 2 4 Examples 15 2 4 4 JTAG 15 2 4 2 Reset 16 24 3 SPI 17 2 4 4 RS485 Interface 19 3 Getting Started 20 3 1 Test program 20 3 2 Program Download 22 3 2 1 Philips LPC2000 Flash Utility 23 42 2 LPC21ISP 23 3 3 Program Development 25 3 3 1 QuickStart Build Environment 26 3 3 2 GCC 32 3 4 Installing QuickStart Build Environment 33 3 5 Sample Ethernet Driver 37 3 5 1 Build and Download Ethernet Driver 38 3 6 Developer s QuickStart Kit QuickStart Your Development 39 3 Typical Usage 40 4 CD ROM and Product Registration 42 4 1 CD ROM 42 4 2 Product Registration 42 5 Further Information 43 Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 1 Introduction Thank you for buying Embedded Artists 700 10M Ethernet LPC2138 QuickStart Board based on Philips ARM7TDMI LPC2138 microcontroller and Davicoms DM9000E Ethernet controller This document is a User s Guide that describes the
31. ess It is also possible to ping the hoard est H3 R5485 interface ERROR failed to receive a lou signal bd Figure 15 Example Test Program Output Observe that the RS485 test will indicate failure if the receive and transmit lines are not connected with each other TH and RH TL and RL Jumper J10 must also be inserted It is hence normal to get the message RS485 interface ERROR when you power up the board for the first time Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide The test program also contains a TCP IP stack and a small web server application It is possible to PING the board and also surfing to it using for example Internet Explorer The IP address settings can be set via the UART during the first three seconds after the board is started The default settings are e P address 192 168 1 230 e Subnet mask 255 233 235 0 e Default gateway 192 168 1 1 e MAC address 21 6 152 1 114 15 Figure 16 below shows the first web server page and the contents 1s an illustration or expose if you like of what our Ethernet Developer s QuickStart Kit can help you to quickly create A Embedded Artists AB Ethernet Quickstart Developers Kata Microso internnet ESpIorTen Arkiv Redigera Visa Favoriter Verktyg Hj lp Q sat z ix a JD 38k YZ Favorite B iw h L 9 J e X Adress EE cst L nkar norton internet Securty E
32. hat are needed for sending receiving Ethernet frames The file main c contains a sample application that implements ARP and PING functionality This simple application illustrates how the Ethernet driver can be interfaced The main program uses polling to check if any Ethernet frame has been receive but it can easily be changed to an fully interrupt driven solution The file ethisr c contains the interrupt handler that must be compiled in ARM mode Since all other files are compiled in THUMB mode the interrupt driver must be compiled as a separate library Build and Download Ethernet Driver The following simple steps will guide you through the build and download process Copyright 2005 Embedded Artists AB Copy and unzip the sample Ethernet driver zip file into a suitable project directory Select if you want to work with the polled or the interrupt implementation by changing to suitable working directory i rq or polled Open the file main c in your favorite editor Search for the variable TocalIP The default value is 192 168 1 230 Change this if you need You can easily check if you need to change the IP address or not Open a DOS prompt command shell Type ipconfig Then you will get information about your computer s IP address You must make sure that the IP address of the Ethernet board is on the same subnet as your computer Open the LPC2xxx gcc newlib QuickStart Build Environment You will find it under the program sta
33. he board and works for many JTAG interfaces on the market including J link from Segger Ulink from Keil and Wiggler from MacRaigor The signal RTCK on the LPC2138 microcontroller is sampled during reset Jumper J6 drives the signal low If the signal is found low the JTAG interface is enabled Pin P1 26 P1 31 then changes from being general I O pins to dedicated JTAG pins Note that many Wiggler JTAG interfaces do not work with a processor crystal frequency above about 10 MHz If this is the case the crystal frequency can be changed by desoldering the 14 7456 MHz crystal and replace it with another suitable one Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 2 4 2 Reset The on board FC E7PROM CAT1025 also contains a reset generator The reset signal will be held active 1 e low until the supply voltages 3 3V is within margins The reset duration is typically 200 mS consult the CAT1025 datasheet for exact details The output reset signal is an open collector open drain output An external reset source can also control the reset generator Figure 11 below illustrate how an external push button can generate a reset Observe that an external driver should be an open collector open drain driver XI 4 a M0 G N O 2 h hM GND lt AING Pt PU AIN PO 26 AC A 3 PU 76 a rT I I ae LESSE Figure 11 Example External Reset Push button
34. l I O signals e Anactive low reset input as well as the reset output from the reset controller CAT1025 e Power to the board 4 5 6V DC can be feed via the expansion connector e The internal 3 3V voltage regulator is also connected so external circuits can be feed Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide The board expansion connector is a standard 2 54mm 2x16 or 2x17 pin row Figure 6 below illustrates the expansion connector and the signals it carries AJ L 2X16B Figure 6 100 10M Ethernet LPC2138 QuickStart Board Expansion Connector Version 1 1 of the board has an additional two pins pin 33 and pin 34 Pin 33 is C SCL P0 2 and pin 34 is C SDA P0 3 See Figure 7 below for an explanation of pin positions New pin 34 SDA Expansion connector pin 1 K epp N 208 8 R TTET m a o N Li diis ES JTAG d S m p y XI D S 5 5 s I ios n So 1 e dd fas k 13 3 anf ea Du 999 z n C C L1 Ua E 3 u m 32 s A og ma ad KDH FE es 1 ELE l L1 i walla Li v Ci Toni amp Figure 7 100 10M Ethernet LPC2138 QuickStart Board Expansion Connector PCB View v1 1 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 LPC2138 microcontroller The RS2
35. lM P EL 2m PES OL RES Ih Br 6 5 PEMO P amp CPIMISOC Bn 4 SpISCK PL 15 1 2 el A P026 5 6 T a GND 4HC595D Figure 13 Example SPI Interface with E PROM and I O Expansion Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 2 4 4 RS485 Interface The RS485 interface can either be full duplex sending and receiving at the same time or half duplex either sending or receiving The full duplex interface requires four signals while the half duplex interface only requires two signals In the latter case the transit and receive signals shall be connected as illustrated in Figure 14 below Also a 120 ohm termination resistor 1s required on the receiving end m F XI Ht S Ni EIE GND U 28 AIN D SOAK 26 E Connect if RS485 1 X1 1 l 20 X1 2 X1 3 X1 4 X1 5 GND Figure 14 Example RS485 Interface Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide 3 Getting Started 3 1 Test program The 00 10M Ethernet LPC2138 QuickStart Board comes preloaded with a test program This program can be used to verify that the board operates correctly LEDs can be connected to the signals on the expansion connector The test program outputs a running zero to the port pins meaning that one LED at a time will light in a running one pattern Also a terminal program should be attached to th
36. les and othe Note the startup library INC I startup Select if an executable program or a library shall be created PROGRAM MK true LIBRARY MK true Output format on hex file if making a program can be srec ihex HEX FORMAT ihex Program to download executable program file into microcontroller s FLASH DOWNLOAD lpc2lisp exe Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Configurations for download program DL COMPORT coml DL BAUDRATE 115200 DL CRYSTAL 14746 Ht HH HH HT HH EHH HE EE EE EH HE EE HH HOH EE EOE EEE EE EE EE EE HE EH EE EE EEE EEE EE EE include build files general mk it aE at at eat He E TE ae He AE AE E aE SAE EEE EEE EEE Figure 23 Example QuickStart Build Environment Root Makefile and Recursive Invocation To build the application program start a command prompt the bash script change directory to the project root and type make Depending on the make file content either an executable program or a library will be created To also download the executable program type make deploy instead of just make A final note about the make file make clean will erase all object files and make depend will recreate dependency files this 1s also always done when typing just make Finally make terminal will just start the terminal function in the download program Ipc211sp The specific settings for using the ISP download pr
37. ll allow you bo modify repair or remove LPC2xxx gcc newlib To continue click Next T3 ELSE ciere ne wii Installshield Wizard License Agreement Please read the Following license agreement carefully 1 Terms and conditions This document serves as Embedded Artists AB no nonsense license statement and limited warranty For Ehe InfraBed License This license statement and limited warranty constitutes a legal agreement License Agreement between vou either as an individual or a single entity and Embedded Artists AB Embedded Artists AB For Ehe software product Software identified above including any software media and accompanying on line or printed documentation BY INSTALLING THE SOFTWARE YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THE LICENSE AGREEMENT E I accept the terms in the license agreement CO eGR Se eise agreement Installshield 42 Bk C re J ces Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide i5 LPC2 xxx gcc newlib InstallShield Wizard Destination Folder Click Next to install to this Folder or click Change to install to a different Folder Install LPC2xxx gec newlib bo CPragramInfFrabedYevboards PC2xxx gec newlib z OQ 0 0l Use the default installation directory Please note that in order For the QuickStart Board to work with InfraBediEm vau have to us
38. mple illustrate how to control the system in real time both sending data and receiving real time data With the help of Applets it is easy to create advanced and professional looking user interfaces Figure 17 below shows how the applet looks like The two LEDs that are under application program control can be controlled via simple push buttons in the applet interface A slider also illustrates how to send user input data to the system The slider position is printed on the console output The temperature bar graph illustrates to an Applet can receive real time data and display the information When pressing the Start button a process in the system starts sending real time data to the applet Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 22 e Applet Sample Application Microsoft Internet Explorer Orkiy Redigera Visa Favoriter Verktvg Hj lp Q sse i e ig Le yo S k SIP Favoriter idl Adress E http 192 168 1 230 applet htral Temperature LED Control Le ee Data Control Connected Figure 17 Applet User Interface Example 3 2 Program Download For now it is assumed that the program to be downloaded is already developed and there exist a HEX file to be downloaded This HEX file represents the binary image of the application program There are basically two ways of downloading a program into the LPC213x microcontroller e ISP In System
39. n as viewed in the picture e Type make deploy and verify that the program actually is downloaded into the 100 10M Ethernet LPC2138 QuickStart Board Also verify that the phrase Detected DM900O0E is printed lpc21isp exe hex term control sample eth driuer hex comi 115208 14746 4 llpc21isp version 1 28 File sample eth driuer hex loaded converted to binary format image size B4165 Synchronizing OK Read bootcode version 2 4 8 Read part ID LPC2136 512 kiB ROM 32 kiB SRAM 41763897 er CRESS SSMS u tsb e e Download Finished taking 3 seconds Now launching the brand new code Terminal started Cpress Escape to abort Welcome to the 166716MN Ethernet LPC2138 Quickstart Board sample Ethernet driver polled impl gt Uerzion 1 8 c 2665 Embedded Artists X X Xx KEE he MAG address is H 6 78 1 16 34 and the IP address is 192 168 1 23H FY pinging the hoard Detected DM9BBBE e Now it s time to test if it is possible to ping the board Open a DOS prompt command shell Type ping 192 168 1 230 or whatever IP address you have selected Verify that the board 1s actually responding to the ping requests Now all you have to do is start integrating the Ethernet driver into your favorite TCP IP stack or you can have a look at the next section and get a QuickStart 3 6 Developer s QuickStart Kit QuickStart Your Developme
40. n cut and disconnected from its erroneous connection to the RS232 DSUB connector The problem does not exist in boards after v1 0 The problem can also be fixed for v1 0 boards as seen in Figure 9 below Already cut on solder side Cut here and connect EMI filter to U2 pin 7 Connect EMI filter to U2 pin 8 DSUB 9 Connector Note that this error does not appear on version I 1 of the board Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 15 2 3 Mechanical Dimensions Figure 10 below contains a drawing of the board that includes mechanical measures 2 z act 8 EE GEIL C 50 mm 00 Ethernet QuickStart Board v1 8 uuu Embeddedhrtistg com 9 L3 ARTISTS 2885 BOG i Fo N 100 mm Figure 10 100 10M Ethernet LPC2138 QuickStart Board Mechanical Dimensions The board is 100x50 mm in dimension and the mounting holes are places 90x40 mm apart as seen in the drawing above 2 4 Examples This section contains a few sample illustrative circuit examples that will help you to quickly get up and running with the board interface design Detailed information about the on chip peripheral units can be found in the LPC2138 User s Manual 2 4 1 JTAG The LPC2138 microcontroller contains a JTAG interface that can be used for debug purposes during program development A standard ARM 20 pin JTAG connector is mounted on t
41. nt The Developer s QuickStart Kit contains a pre designed software platform with all necessary infrastructure functionality for using the 100 10M Ethernet LPC2138 QuickStart Board in industrial applications The kit allows you to quickly evaluate the applicability of Ethernet in YOUR application Extensive documentation is included in order to lower the threshold of start using the kit even further You can start to develop and include your own application on day 1 The Developer s QuickStart Kit includes a pre designed software platform that integrates a mayor part of the needed infrastructure for advanced Ethernet applications By using the platform you avoid the long and narrow do it yourself way when start using new technology with all these typical activities Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 40 e Researching RTOS Compiler IDE TCP IP Stack Web Server File System e Hardware design this is of course not part of the software platform but an activity that is typically also required if you don t buy an off the shelf hardware board e Configuration RTOS Compiler IDE TCP IP Stack Web Server File System Board Support Package e Testing hardware each individual software component integrating the platform The included components in the Developer s QuickStart Kit are e TCP IP stack e Web Server e Pre emptive RTOS e Static File System f
42. nying CD ROM contains a lot of information and programs that will QuickStart your program development Observe that there may be newer versions of different documents and programs available than the ones on the CD ROM See Section 4 2 for information about the product registration process which allows you to always have access to the latest versions 4 1 CD ROM The following is included on the CD ROM e The preloaded test program as a HEX file e The two different ISP download programs e Datasheets of all circuits on the 00 10M Ethernet LPC2138 QuickStart Board e QuickStart Build Environment from Embedded Artists which contains a complete setup of a build environment for GCC e A complete development environment Rowley Associates CrossWorks for ARM 30 day evaluation version e Acomplete development environment IAR Embedded Workbench for ARM Kickstart Edition with 32 Kbyte program size limit e Another complete development environment GCC GNUARM distribution including compiler linker make and debugger e The program Programmers Notepad which is a very good program development editor and project manager e The Eclipse development environment including the CDT C C Development Tools project 4 2 Product Registration By registering as a customer of Embedded Artists you will get access to more valuable material that will get you up and running instantly e Access to a Real Time Operating System RTOS in the form of
43. ogram can be set with the DL XXX variables as seen at the end of Figure 23 above As already mentioned the startup files form a configurable startup framework This is often called a Board Support package or BSP for short It contains the very basic startup and initialization code as well as a console with printf and scanf like functionality The BSP is very configurable and can be changed according to your specific needs Each project can have its specific settings The configuration file is listed in Figure 24 below and can be found in file config h in the startup subdirectory KKK KK KK KK kk K KOK kk Ck K K K K K K K K K K k Ck K k k k k K KC ck kCkCk ck ck KOK ck k ck ck k K k ck k ck k k kc k k k k K K ck ko Copyright C 2000 2005 Embedded Artists AB Description Framework for ARM7 processor o HK KK I KK I kc kckckckck ck k ck ck ck kc k ck k k K k k ck ck ck kc k ck kc kc k ck kc k ck k kc k ck kc k ck OK k ck kc KK k k k k KK KK ifndef config h define config h KKK KKK KK Ck 1 1 1 1 k Ck K K OK kk Ck K K K K K K K SK K k Ck Kk k k k kCkCkck ck kk kckck ck ck k ck ck K K K ck k ck ckck k ck ck k k k K kc ko Defines macros and typedefs KK kCkCk k kk k k Ck ck kk kk Ck k ck ck kk kCk Ck ck ck k kk Ck Ck k ck ck k kk kc k ck ck k ck KK ck ck k kk Ck kc kckckck ck k ck ckckck ck ck k kk kk define FOSC 14745600 External clock input frequency must be between 10 MHz and 25 MHz
44. ompiler plus linker and a debugger Fortunately there are many different choices for ARM program development each with its pros and cons The list below is far from complete but gives a general overview The accompanying CD ROM see Section 4 1 for more details contains many of these programs environments e QuickStart Build Environment from Embedded Artists Embedded Artists has created a complete GCC build environment for all QuickStart boards This will ease program development for novel users By installing the QuickStart Build Environment you will automatically get a complete setup of the build environment e Rowley Associates CrossWorks for ARM A complete development environment from Rowley Associates including an editor project manager a complete compiler build environment and a debugger The version included on the CD ROM is a 30 day fully functional evaluation version Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 26 e TAR Embedded Workbench A complete development environment from IAR Systems including an editor project manager a complete compiler build environment and a debugger The version shipped on the CD ROM has a 32 Kbyte program size limit but is fully functional in all other aspects e Keil uVision This is another complete development environment but from Keil It includes an editor project manager a complete compiler build environment and a de
45. or storing web server static data HTML pages pictures etc e Registry for storing application parameters like IP address etc The pre installed test program is built around the Ethernet Developer s QuickStart Kit and demonstrates some web server possibilities 3 Typical Usage The 00 10M Ethernet LPC2138 QuickStart Board can be used to easily create advanced MMI Man Machine Interfaces based on Internet technologies e Use the web server to expose information and parameters that can be controlled e Use the file system to store HTML files and picture files e Use the serial channel to communicate expose information or control parameters with ANY System e Access the system directly via a local area network or indirectly via wireless bridges WLAN or Bluetooth Figure 27 below illustrates how the 00 10M Ethernet LPC2138 QuickStart Board can be connected to any embedded system and expose internal variables in this system or alternatively controls internal parameters in the system Communication with the arbitrary embedded system can be done via the RS232 or RS485 serial channel Ethernet QuickStart Kit ANY System an Expose Application Control Stationary F Sots Ethernet WWW Figure 27 Typical Ethernet QuickStart Application Scenario Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide In the scenario above the 100 10M Etherne
46. rectly to a 3 3V low dropout voltage regulator Power can be feed to the board via a 2 1 mm circular connector or via the expansion connector Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 10 The board contains a 2kbit EPROM CAT1025 which also contains a reset generator The E PROM can be used to store non volatile parameters that are needed in a system for example IP address subnet mask default gateway and MAC address The EPROM is connected to the LPC2138 via the C bus A red LED is connected to the reset signal and lights when reset is active 1 e the signal is low The board also contains two more LEDs that can be controlled by the application program Digital I O pin P1 24 controls LED 1 yellow for version 1 0 and green for version 1 1 and pin P1 25 controls LED2 green for version 1 0 and yellow for version 1 1 see schematic in Figure 3 for exact details Figure 5 below illustrates the different LEDs and their meaning ll UJ ug a E m E a m ta o E 205 3 E oog vag una cu m EI 35 ox u xov ci FO lt c U 320 o Tu E 1 E a E E 5 3 E i 3 3 C2 oM ARTISTS 2005 100M Ethernet Q Yellow Red Green Green a oe _ J Controlledby Reset Controlled by LED on 100M LED on Ethernet application via application LED off 10M full duplex activity P1 24 via P1 25 Controlled by Controlled by application application via P1
47. rt menu Embedded Artists LPC2xxx gcc newlib fap Embedded Artists Fi GNUARM FT Python 2 4 Fi Xilinx ISE 7 1i Ff LPC2106 gec udibc du LPC2106 gcc newlib 1 0 0 0 Aum LPC2129 gec newlib v1 0 0 0 e ug LPCZxxx gcc newlib Y id Y de LPC2xxx gec newlib 2 0 0 0 Change the working directory to where you unzipped the sample Ethernet driver project Type make and view the result It should look something like in the picture below You can study the sizes of the program code that you have just built LPC2xxx gcc newlib v2 0 0 0 make deploy Code size DATA Initialized data ESS Uninitialized data ROM Size in non volatile program memory TERT DATA RAM Size in volatile data memory CDATA H552 TERT DATA BS 3128 16 3144 16 startup lihea startup thumh a Total size amp includingy external libraries Code compiled with optimization switch Os Cother settings may produce different sizes Cexternal libraries may be compiled with different settings i TERT DATA B55 ROM RAM FILEMAME 711 928 1516 8637 2444 zample eth drivuer elf 100 10M Ethernet LPC2138 QuickStart Board User s Guide e Make sure that power is connected to the 100 10M Ethernet LPC2138 QuickStart Board a serial cable to the PC and that all four jumpers on the board is inserted on the correct place for automatic ISP program download All four jumpers in upper positio
48. s LPCZHHH family and erzion 1 22 Analog Devices ADUC 7Axx ompiled for Windows Mov 8 28084 21 64 11 opyright c gt by Martin Maurer 2663 2664 Email Martin MaurerBclihh de Portions Copyright lt c hy Aeolus Development 2064 httpi wwu aeo lusdeve lopment com lpc2iisp Options file comport baudrate Oscillator in kHz lpc21isp test hex comi 115208 14746 z hin for uploading binary file hex for uploading file in intel hex format default term for starting terminal after upload termonly for starting terminal without an upload de bug for creating a lot of debug infos control for controlling R5232 lines for easier hooting CHeset DIR EnableBootLoader RIS logfile for enabling logging of terminal output to lpc211isp loygy A Dh RM for downloading to an Analog Devices ARM microcontroller ADUCTAxx PHILIPSARM for downloading to a microcontroller from Philips LPC2660 family Cdefault Figure 19 LPC21ISP Portable Command Line ISP Screenshot A typical program download sequence may look like in Figure 20 below Here the test program is downloaded As seen the first part is the actual program download phase Then this is done the program switches to being a terminal the second part and the messages from the test program is displayed It also sends anything typed on the keyboard back to the 100 10M Ethernet LPC2138 QuickStart Board As seen the program ends when ESC is pressed This sequence illustrates the
49. sically only supports printing strings without any formatting parts and printing numbers decimal or hexadecimal e A simple printf implementation that supports the simplest formatting tags The implementation has been designed for lest possible stack usage about 40 bytes Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 31 e A full ANSI printf implementation from newlib part of the compiler environment that comes with GNUARM This routine requires about 600 bytes of stack space and should normally not be used in resource constraint systems The code size for the first two alternatives is minimal about 2k in program size for the entire framework When using printf from newlib the code size 1s about 30 k for the entire framework including a large part of the newlib library Just edit the configuration file above and recompile your project The recursive nature of the makefiles will make sure that the startup library is recompiled and linked with the final executable program You can find an example project under the QuickStart Build Environment installation See Figure 25 below for the path It is typically c program InfraBed evboards LPC2xxx gcc newlib vX X X X The beginning of the path can be specific for your installation and the ending of the path is specific for the version of the build environment The figure below illustrates version 2 0 O0 0 C InfraBed
50. stalled C Program ANUAR M Use the default installation directory Al least 58 2 MB of free disk space is required COON jS Setup GNUARM Select Components Which components should be installed Select the components you want to install clear the components you do not want to install Click Next when you are ready to continue Full installation Little Endian 3 LE Libraries No Fast Multiplier v ARM THUMB Interworking v THUMB v THUMB Libraries 0 v ARM THUMB Intenworking Floating Point Unit FPU Libraries Current selection requires at least 215 2 MB of disk space c Setup GNUARM Select Components Which components should be installed Select the components you want to install clear the components you do not want t install Click Nest when you are ready to continue If you want to save space on Custom installation Floating Point Ll nit our harddisk i vw FPU Libraries 9 7 MB y i i 7 Ma Fast Multiplier you Can me SAM THUMB Interorking MB deseclect the Big En tian I C nas Libraries Big Endian No Fast Multiplier component L ARM THUMB Interworking THUMB Current selection requires at least 137 7 MB of disk space a EUN mcum 100 10M Ethernet LPC2138 QuickStart Board User s Guide Copyright 2005 Embedded Artists AB js Setup GMUARM Select
51. t LPC2138 QuickStart Board is used to create an advanced user interface to the embedded system It is also possible to embed a complete application into the 00 10M Ethernet LPC2138 QuickStart Board Relatively large applications can be added to the pre designed software platform and the hardware can be expanded with necessary I O Figure 28 below illustrates this scenario Ethernet QuickStart Kit b 1 a ANY System a a ua Application aay Stationary Ethernet Sot WWW Figure 28 Integrating a Complete Application into the Ethernet QuickStart Board There is a trend towards more integrated system solutions especially in industrial applications Driving factors are more cost effective solutions 1n many cases also increased performance and better possibilities for surveillance diagnostics and maintenance There are many interesting business possibilities when integrating diagnostic functions in a system like better maintenance and a profitable after market Remote administration and remote control gives the prerequisites of lower working expenses lower total system costs and a profitable after market The Developer s QuickStart Kit and the 100 10M Ethernet LPC2138 QuickStart Board allows you to experiment and develop these kinds of applications Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide Page 42 4 CD ROM and Product Registration The accompa
52. the appropriate checkbox is checked and hence provide fully automated program download Test connection with the 00 10M Ethernet LPC2138 QuickStart Board by pressing the Read Device ID button The text fields for Part ID and Boot Loader ID will then contain uploaded information from the microcontroller Observe that the XTAL Freq must be set to appropriate value The default mounted crystal frequency on the 00 10M Ethernet LPC2136 QuickStart Board is 14 7456 MHz In this case the value 14746 shall be written in the text box If the crystal frequency has been changed make sure the appropriate value is set If no connection can be established test with a low Baud Rate for example 1200 bps Also verify that the correct COM port has been selected under Connected to Port Select the HEX file to be downloaded and then press the Upload to Flash button The downloaded program will immediately start after the download 1 e the Upload to Flash operation is ready is the option Execute Code after Upload 1s checked 3 2 2 LPC21ISP The LPC21ISP program is made publicly available by Martin Maurer Source code 1s also available at http engelschall com martin Ipc2 1 xx 1sp index html Figure 19 below shows the command syntax for the program Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide zu InfraBed Blue Webbkurs Evaluation Board v1 0 0 0 w gt lpc2lisp Portable command line ISP for Philip
53. the same compiler without conflicting with each other The use of the bash script is optional but is recommended for non experienced users A typical project has two subdirectories build files and startup Figure 21 below illustrate the general structure 3 E sample project O build files mn startup Figure 21 Typical Project Directory Structure The subdirectory build files contains a general makefile and linker script files The subdirectory startup contains a configurable startup framework for QuickStart Board projects The startup files form a library that is linked to the main application The makefiles have a hierarchical structure Each project either an executable program file or a library has a simple makefile that just describe the specifics of the project This Copyright 2005 Embedded Artists AB 100 10M Ethernet LPC2138 QuickStart Board User s Guide simple makefile includes the general makefile that is placed in the build files subdirectory Figure 22 below illustrates the simple makefile The example comes from the startup library found under the startup subdirectory The name of the resulting library is libea startup thumb a Two C source code files are listed consol c and framework c An assembler file called startup S is also included in the library FE FE a at He He He TE FE AE FE TE AE PAE AE aE AE FE TE FE EEE aE it General makefile for building executable programs and libraries

Download Pdf Manuals

image

Related Search

Related Contents

Tool Flyer  Guide méthodologique à télécharger  Strait-Flex TT-50-S Instructions / Assembly  Model 221 User Manual  Camping-Car  2014年6月 公開  ROOM AIR CONDITIONER  Controlling ATOM Devices - Norsat International Inc  KitchenAid YKGRT500 User's Manual  IAI Centennial Conference - International Association for Identification  

Copyright © All rights reserved.
Failed to retrieve file