Home

LPC2129 CAN QuickStart Board User`s Guide

image

Contents

1. You must accept the terms of this agreement before continuing with the installation GNU GENERAL PUBLIC LICENSE Version 2 June 1991 Copyright C 1989 1951 Free Software Foundation Ire 9 Temple Place Suite 330 Boston Ma 02111 1307 USA Evemone i permitted to copy and distribute verbatim copies of this license document but changing itis not allowed Preamble The licenses for most software are designed to take away your accept the agreement CJ amp agreement AO Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Copyright 2005 Embedded Artists AB Toa Setup GWNUARM Select Destination Location Where should GNUARM be installed C Program ANUAR M Use the default installation directory Al least 58 2 MB of free disk space is required COON mE aoe s Setup G NUARM 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 4 ARM THUME Interworking THUMB 4 THUMB Libraries o ARM THUMB Intenworking Floating Point Unit FPU Libraries Current selection requires at least 215 2 MB of disk space fe Setup GNUARM Select Components Which components should be installed Select
2. lt InfraBed Blue Webbkurs Evaluation Board v1 0 0 0 zN gt lpc iisp ortable command line ISP for Philips LPCZ 0 0 Family and ersion 1 22 Analog Devices ABDUC 7Axx z Nov 2684 21 64 11 i 2663 2664 Email Martin Maurer clibb de ortions Copyright c by Aeolus Development 2664 httpi wwu aeo lusdeve lopment com IpeZlisp Options File comport baudrate Oscillator_in_kHz lpetlisp 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 termon ly for starting terminal without an upload de bug for creating a lot of debug infos control for controlling R232 lines for easier hooting Reset DIR EnableBootLoader RIE logfile for enabling logging of terminal output to lpce2lisp log DARM for downloading to an Analog Devices ARM microcontroller ADUCTAxx PHILIPSARM for downloading to a microcontroller from Philips LPC2660 family Cdefault gt Figure 6 LPC21ISP Portable Command Line ISP Screenshot A typical program download sequence may look like in Figure 7 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 LPC2129 CAN QuickStart Board As seen the program ends when ESC is
3. 3400k du00 WHET Od DOLNY Od Ver Od E Fld YAW Le Od SINID LIAS SE Levee Od TLD VIS OME LVL Od SLL LOSIVE Ld Sh Od TL LAY LNISIE bo VAL Od q TOANT OLAYOLINIJ IF Od ie ZINID Wa Od LINIJ 109 Ob Od OLY LYSOrZ1 Od neon hi EINIR Wid LO Od ZHWOOOOZL Ud LOX LS Od Lo Od IZOYBEW IN ZINID INANIS Ye Od ZOdYVOS OM Od PoOLvoosiws Od Od ONS Od OPIZOYSENAN ki Board Schematics LINIJO OLAVO SE Od z3 TOd IIIT Od OLN IS Wid OO ks Od MAAV OT XLO Od 4135349 DA IZOX BENIN LI 1 This chapter contains detailed information about the electrical and mechanical design of the LPC2129 CAN QuickStart Board A number of example circuits are also presented that will lower the threshold of start developing with the board 2 2 Board Design lt b Ss N T cob 2 e aa N oS O lt x O for N b og N O ou pn LPC2129 CAN QuickStart Board Schematic Figure 1 Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Besides the LPC2129 microcontroller from Philips the board contains dual CAN transceivers a dual voltage regulator with an internal reset generator a 256 Kbit I C EPROM and an ESD EMI protected RS232 serial channel A red LED is connected to the reset signal and lights when reset is active 1 e the signal is low The microcontroller crystal frequency is 12 0000 MHz This frequency has been s
4. LPC2129 CAN QuickStart Board User s Guide Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Get Up and Running Quickly and Start Developing on Day 7 Da Embedded Artists EA2 USG 0502 v1 1 Rev D LPC2129 CAN 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 disclaims 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 trademarks services marks regist
5. 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 JTAG interface consult the manual for the specific JTAG interface that is used e g J link from Segger Ulink from Keil or Wiggler from MacRaigor Connect jumpers J6 and J7 on the LPC2129 CAN QuickStart Board This will connect the RS232 channel to the LPC2129 microcontroller and active control over pin P0 14 and the reset signal After program download all 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 J6 and J7 are removed after program download 3 2 1 Philips LPC2000 Flash Utility Philips LPC2000 Flash Utility program looks like Figure 5 below Cues Pron Utility File Buffer Help PHILIPS gt Flash Programing Face r Blank BAR LPC2000 Flash Utility V2 2 0 Communication Filename l l Connected To Port ee Blank Check f Entire Device com i Selected Sectors Execute Code Meadhan Upload to Flash we aren liblcad Ree ro 115200 Erase BE Compare Flash Manual Reset End Sector bas Time Out sec 2 DENGE I Use DTRA ATS Device T for Reset and LPC21 06 Read Fart ID m i der TAL Freg kHz 14746 Device ID Boot Loader ID Selection Fig
6. I O can easily be added to the different designs for example communication interfaces specific analogue or digital I O and power supplies Embedded Artists has a broad and long experience in designing industrial electronics in general and specifically with Philips LPC2xxx microcontroller family e Prototype and low volume production takes place in Sweden for best flexibility and short lead times e High volume production takes place in China for lowest possible cost 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 T T 9894S UG6Z 97 2G GBGZ ET E 3 e0 T 2 S8 HIS F saquny yuaunsog P4eog WeEISAIND NYI EZtbZId1 FIL z9d ZISNISA TTNA s a1 B hi i A bod IaSNASA i SYOOL JYOOL du00 Botan iaa eZ 6L9 SLI C 5 TLNOA aiii mt LINDA b z 9 9I auooL auooL auooL LGZD Sdl LII INS q ANS S4OOL 4UOOL SYOOL o inas axs H A HNO OXL wa porwr a zi O2PIZOYBEM IN LLI fLSY VIE bd SMWOE Ld WILE bd IOL ST bd DALET bd HI L 9F bd NILI ST td gt AIDA IVY Vee bd Tid FSSA O2PIZOYBEM IN olJ tly LSIdIdV ET bd Liv LSadid2z td Oly LSadid LZ bd INASSIVYLOE Ld m m oko a p MAd ol bd m Nid inom 0 Od NELNII ENTHOE Od z TETI NIIH INOI E OLANE Ody NINIWGT Od TBA POLAE Ody ION ZZ Od VBA AT Indl NIL a a ZS
7. 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 Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Page 10 There are basically two ways of downloading a program into the LPC2129 microcontroller e ISP In System Programming The LPC2129 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 LPC2129 CAN 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 1s typically also used for displaying printing 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
8. number instead of vX_X X X bin It may for example be v2_1_0 0 bin Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Page 25 4 CD ROM and Product Registration The accompanying 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 in source code format and as a HEX file e The two different ISP download programs e Datasheets of all circuits on the LPC2129 CAN 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 A complete 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 pr
9. pressed This sequence illustrates the benefits from using the program as a terminal directly after program download No characters are missed after program start The used command is lpc2lisp term control test hex coml 115200 14746 Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide InfraBed Blue Webbkurs Evaluation Board v1 0 0 0 Ipc21isp term control test hex com gt lpce21lisp term control test hex comi 115266 14746 File test hex loaded onverting file test hex to binary format File test hex converted to binary format Position x14 patched ivt_CRC x99FFFF6F OM Port comi opened Synchronizing Pro gram Synchronized Synchronized 1 Setting oscillator Download Hear ea 4 h Rea ootcode version Read part ID P ase ECIN NE e a a E E fa aN ENT EE O pv ea page manage aioe OAE A ector B written ree beth fy fs Bers 1 1 A a Sr ee er ee Sector 1 written Finished erminal started Cpress Escape to abort Test program for LPC2616 QuickStart Board Version 1 Date 2665 61 12 lt C Embedded Artists 2605 EEPROM and I2C test est 1 write string String 1 to address 6x6000 done status code gt program cycle completed est 2 write string sTrInG 2 to address 6x 321 done status code OK progran cute conpiered didi est read string from address 6x6E s string is String 1 T
10. stop bit 1 e 8N1 The output from the test program will look something like in Figure 4 below Terminal lpc 1isp exe termonly control dummy com1 115200 14746 Test program for LPCG2H16 QuickStart Board Version 1 8 Date 2665 61 12 C gt Embedded Artists 2685 KEE K KE Ls Bel EEPROM and I2C test est Hi write string String 1 to address Axt done status code K program cycle completed est 2 write string sTriInG 2 to address amp x321 done status code OK gt program cycle completed est 3 read string From address 46H string is String 1 est H4 read string from address amp x6321 string is sTriInG 2 est 5 write string sTriInG 2 to address 4xbHH4 done status code OK gt program cycle completed est 6 read string from address 4xHHH string is StrisTriInG 2 Summary of tests Passed all tests I O and UART test Loop through all I O pins running 17 gt 5 P 4 to pl 31 P 2 to p 3 tested via EEPROM and 2C test PH 4 to p i tested via UART test RRR EEE Press any key on terminal and verify echo hack Received char 84 decimal T Received char e 181 decimal Received char s 115 decimal Received char t 116 decimal Received char i 1865 decimal Received char n 118 decimal Received char g 183 decimal Figure 4 Example Test Program Output 3 2 Program Download For now it is
11. the components you want to install clear the components you do not want to install Click Nest when you are ready to continue If you want to save space on Custom installation i Floating Foint Urit our harddisk e FPU Libraries 9 7 MB y j 7 No Fast Multiplier you can me SAM THUMB Interworking had deseclect the Big En tian PER Libraries Big Endian C No Fast Multiplier component O ARM THUMEB Interworking THUMB Current selection requires at least 137 7 MB of disk space a we com LPC2129 CAN QuickStart Board User s Guide Copyright 2005 Embedded Artists AB is Setup GMUARM Select Start Menu Folder Where should Setup place the program s shortcuts HH Setup will create the program s shortcuts in the following Start Menu folder To continue click Nest IF you would like to select a different folder click Browse Browse ZO lt Back Newt gt J de Setup GNUARM Select Additional Tasks 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 OLLs is Setup GNUARM Ready to Install Setup is now ready to begin installing GHUAAM on your computer Click Install to continue with the installation or click Back
12. to download executable program file into microcontroller s FLASH DOWNLOAD lpc2lisp exe Configurations for download program DL COMPORT coml DL BAUDRATE 115200 DL CRYSTAL 14746 Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStartBoard User sGuide Ht HHH TH HT EHH HE EE EE EH HH HE HE HH EE HH EEE EE EE EE EE EE EE OEE EEE EE EE EE include build files general mk FETE at at He at He He TE ae AE FE AE a AE a aE EAE EEE PEEP EEE Figure 10 Example 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 Ipc2 lisp The specific settings for using the ISP download program can be set with the DL XXX variables as seen at the end of Figure 10 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 a
13. GS LDFLAGS OBJS S LIBS o test elf arm elf gcc c S INCLUDE CFLAGS lt S O S arm elf gcc c S INCLUDE CFLAGS lt S O C arm elf gcc c INCLUDE CFLAGS lt hex arm elf objcopy 0 ihex lt elf clean rm f o test elf test hex Figure 13 Example GCC Makefile Copyright 2005 Embedded Artists AB LPC2129 CAN 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 3 c c Jjava_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 VA Setup GNUARM Welcome to the GNUARM Setup Wizard This wall install GHUAR M 3 4 3 on your computer Ik is recommended that you close all other applications before continuing Click Next to continue or Cancel to exit Setup Next gt Cancel i j5 setup GMHUARM License Agreement Please read the following important information before continuing Please read the following License Agreement
14. IONS OF THE LICENSE AGREEMENT E I accept the terms in the license agreement CO eGR Se afise agreement Installshield ff C eek C re cancel _ Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide is LPC2xxx gcc newlib InstallShield Wizard Destination Folder Click Next to install to this Folder or click Change to install to a different Folder Install LPC2scce gcc newlib bo C Program InfrabedievboardsiLPC2xxx gec newlib v2_0_0_ 0 Use the default installation directory Please note that in order For the QuickStart Board to work with InfraBeditmi you have to use the suggested path InstallShield i PG2xx ecc newlib InstallShield Wizard Ready to Install the Program The wizard is ready to begin installation Click Install to begin the installation TF vou want to review or change any of your installation settings click Back Click Cancel to exit the wizard Installshield 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
15. P printf should be used the following include file must be included into the source code file include lt printf P h gt 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 LPC2129 CAN QuickStart Board User s Guide 3 3 2 GCC This will be very similar to the InfraBed example except that you will have to set up all paths manually and create your own startup files The make files will also be a bit more complex An example make file is presented in Figure 13 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 Iinc specific specify include paths here ARMCC arm elf gcc OBIS main o eeprom o i2c o startup o LDFLAGS Wl1 Trom ld this file controls the linker all test hex test OBJS arm elf gcec CFLA
16. aximum execution speed and standard CAN bit rates Phase locked loop PLL multiplies frequency with five 5 x 12 0000 MHz 60 0000 MHz e Dual CAN channels with TJA1040 transceivers e ESD EMI protected RS232 channel with DSUB 9 connector e 256 Kbit C EPROM e Onboard low dropout voltage and reset generation Generates 3 3V and 1 8V from a single 5V supply Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide 3 3V available for external circuits up to 300 mA Power supply 5 VDC at least 150 mA e Simple and automatic program download ISP via RS232 channel Circuit that automatically controls the boot loader from RS232 channel e Easy to connect to JTAG signals e Dimensions 55 x 58 mm Four layer PCB FR 4 material for best noise immunity 1 3 Low Cost The LPC2129 CAN QuickStart Board is very low cost and can be used for prototyping development as well as for OEM production Modifications for OEM production can easily be done for volumes gt 1k Contact Embedded Artists for further information about design and production services Bulk orders gt 10 boards are delivered without pin rows DSUB 9 connector or JTAG connector soldered for easy integration with original equipment 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 or
17. build files link rom 1d 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 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 can pre emptive os List additional libraries to link with LIBS startup libea startup thumb a can can a 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 files 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
18. e stackSize IRQ 600 define stackSize FIQ 64 define STK SIZE stackSize SYS stackSize SVC stackSize UNDt stackSize ABT stackSize IRQ stackSize FIQ define STK_SADDR SRAM EADDR 1 STK SIZE Stack start address define CONSOL UART 0 define CONSOL BITRATE 115200 define USE NEWLIB O 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 0 0 none 1 simple own implementation of scanf endif config h Figure 11 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 basically 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 e A full ANSI printf Q 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 Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Page 18 The code size for the first two alternatives is
19. edges They are 1800 mil apart measured from outer edges Figure 3 below contains a drawing of the board that includes mechanical measures 00000000N p 0 J3 pinl cp P1 16 op o oo Ca o D g Gp L 58 1 mm n J 2290 mil dn cD ooonononan a ue Oooo ODLET i Gp GE on ha bre a ca ca ca co ca Ca tA 8 1 mm Ci ee tel tal ed 320 mil E about 12 mm s 2 54 mm 100 mil FOOSD 2 54 mm 100 mil 45 7 mm 1800 mil 55 2 mm 2170 mil Figure 3 LPC2129 CAN QuickStart Board Mechanical Dimensions Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide 3 Getting Started 3 1 Test program The LPC2129 CAN QuickStart Board comes preloaded with a test program This program can be used to verify that the board operates correctly The test program outputs a running one to port pins P0 4 P0 31 meaning that one LED at a time will light in a running one pattern Pins P0 0 P0 1 are tested via the serial channel and pins P0 2 P0 3 are tested via the I C bus The two CAN channels can be connected together to test the CAN channels Also a terminal program should be attached to the RS232 DSUB 9 connector The test program will output test information regarding the I C EPROM test and CAN test Also the UART RS232 channel can be tested by typing characters in the terminal program The settings for the terminal program are 38 4 kbps 8 data bits no parity bits and one
20. elected in order to allow close to maximum execution speed 5 x 12 0000 MHz 60 0000 MHz which is the maximum frequency as well as to provide standard CAN communication bit rates The crystal frequency can be changed to any desired value for OEM orders provided that the conditions in the LPC2129 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 e 10 25 MHz if the PLL is to be used The design 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 LPC2129 microcontroller The RS232 signal RTS is connected to pin P0 14 in the LPC2129 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 Both the RS232 receive and transmit signals as well as the RTS DTR signals can be disconnected from the microcontroller via four links jumpers on the board See Figure 2 below for details J8 JTAG enable CE In order from left to right J6 P0 14 J7 Reset TE Figure 2 LPC2129 CAN QuickStart Board Jumpers Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide 2 2 Mechanical Dimensions The board interface connectors are placed in two 2x16 pin rows along the board
21. ered trademarks or registered service marks of their respective owners and should be treated as such Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Table of Contents 1 Introduction 4 1 1 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 6 2 2 Mechanical Dimensions 8 3 Getting Started 9 3 1 Test program 9 3 2 Program Download 9 3 2 1 Philips LPC2000 Flash Utility 10 3 2 2 LPC21ISP 11 3 3 Program Development 12 3 3 1 QuickStart Build Environment 13 3 3 2 GCC 19 3 4 Installing QuickStart Build Environment 20 4 CD ROM and Product Registration 25 4 1 CD ROM 25 4 2 Product Registration 25 5 Further Information 26 Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide 1 Introduction Thank you for buying Embedded Artists LPC2129 CAN QuickStart Board based on Philips ARM7TDMI LPC2129 microcontroller This document is a User s Guide that describes the LPC2129 CAN 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 LPC2129 CAN QuickStart Board contains the following e The LPC2129 CAN QuickStart Board e CD ROM
22. erminal est 4 read string from address 6x 321 string is sTrInG 2 Phase est 5 write string sTrInG 2 to address 6x6004 done status code OK program cycle completed est 6 read string from address 6x6600 string is StrisTrInG 2 Summary of tests Passed all tests I O and UART test Loop through all I 0 pins running 1 gt P6 4 to pB 31 P 2 to p 3 tested via EEPROM and I2C test P 6 to p i tested via UART test KX KK KKK Press any key on terminal and verify echo back Figure 7 LPC21ISP Portable Command Line ISP Download Screenshot Another benefit with this program is that it runs under Linux 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 LPC213x 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 compiler 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 pr
23. if you want to review or change any settings Destination location C ProgramsGhlakh Setup type Custom installation Selected components Little Endian LE Libraries No Fast Multiplier ARM THUMB Interworking THUMB THUMB Libraries E OON ETEA am LPC2129 CAN QuickStart Board User s Guide e Now install the LPC2xxx gcc newlib vX X X X QuickStart Build Environment vX_X_X_X 1s the current version of the file The installation is also in this case very simple and straightforward Just follow the default installation steps Es LPC2xxx gcc newlib InstallShield Wizard Welcome to the InstallShield Wizard for LPC2sxx gcc newlib The InstallShield Ri Wizard will allow you bo modify repair or remove LPC2xxx gcoc newlib To continue click Next Pezz ecc newib Installshield Wizard License Agreement Please read the Following license agreement carefully 1 Terms and conditions This document serves as Embedded Artists 46 no nonsense license statement and limited warranty For the Infrabed License This license statement and limited warranty constitutes a legal agreement License Agreement between you feither as an individual or a single entity and Embedded Artists AB Embedded Artists AB For the 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 CONDIT
24. 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 mthumb interwork The files are compiled in ARM oka e e o mode with THUMB interworking CODE ARM see EFLAGS List C source files here Oea Gooh List all included C source files framework c List assembler source files here ASRCS Startups 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 tae at TE at AE at ae AE ae AE AE AEE AEE AE TE FE EA EAE aaa AE AE FE AE AE FE AE TE FE AE TE aaa Figure 9 Example QuickStart Build Environment Makefile from Startup Library As seen in Figure 9 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 li
25. led 1l partly enabled enabled for code prefetch but not for data 2 fully enabled define IRQ HANDLER 1 Q Jump to common IRQ handler 1 Load vector directly from VIC i e LDR PC PC OxFFO xinitialize the exception vector mapping define MAM MAP 1 1 exception vectors are in FLASH Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStartBoard User sGuide at 0x0000 0000 2 exception vectors are in SRAM at 0x4000 0000 Pp define SRAM EADDR SRAM SADDR SRAM SIZE 1 SRAM end address CHIP SRAM SIZE SRAM START ADDRESS LPC2104 16 1024 0x40000000 LPC2105 32 1024 0x40000000 LPC2106 64 1024 0x40000000 LPC2114 16 1024 0x40000000 LPC2119 16 1024 0x40000000 LPC2124 16 1024 0x40000000 LPC2129 16 1024 0x40000000 LPC2194 16 1024 0x40000000 LPC2131 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 A define SRAM SADDR 0x40000000 SRAM starting address define SRAM SIZE 16 1024 fe LPC2129 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 defin
26. minimal about 2k in program size for the entire framework When using printf from newlib the code size is 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 1s recompiled and linked with the final executable program You can find an example project under the QuickStart Build Environment installation See Figure 12 below for the path It is typically c program InfraBed evboards LPC2xxx gcc newlib vxX_ 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 2000 O InfraBed 3 docs T esics E evboards a LPC2xxex gcc newlib ve 0 0_0 9 bin sample project C build_files startup Figure 12 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 eaInit must be called before printf and the console can be used The following code segment illustrates this include lt ea_init h gt int main void eaInit Now the console printf can be used Also observe that whenever the BS
27. nce Manual Document identity DDIO029G http www arm com pdfs DDI0029G_7TDMI R3 trm pdf 5 ARM Architecture Reference Manual Document identity DDI0100E Book Second Edition edited by David Seal Addison Wesley ISBN 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 Ipc2000 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 LPC2129 CAN QuickStart Board are included on the accompanying CD ROM Copyright 2005 Embedded Artists AB
28. nd 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 11 below and can be found in file config h in the startup subdirectory KKK KKK KK KK KK KR IK I IK I IK IK I I IK KK KK KK KK KKK KK Copyright C 2000 2005 Embedded Artists AB Description Framework for ARM7 processor He KK KK IK IK I I KR I KK IK IK IK I I KK I IK I KK KK KK KK KK I ifndef config h_ define config h_ KKK KK KK KK KK IK I I I I IK I IK KK IK KK KK KK KK KKK KK Defines macros and typedefs KK KK KK IK KK KK KK KK OK I KK KK IK KK KK I KK KK IK KK KK KK KK KK KK KK KK KK KK define FOSC 14745600 External clock input frequency must be between 10 MHz and 25 MHz define USE PLL 1 Q do not use on chip PLL 1 use on chip PLL define PLL MUL 4 PLO multiplication tector 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 if FOSC PLL MUL lt 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 disab
29. nker invocation Also at the end the target must be decided either an executable program or a library Either PROGRAM MK or LIBRARY MK must be set to true 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 Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide 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 make file 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 10 below FETE at at He Ht Hee HE FE EA AE FE AE EAE AEE EEE EEE EEE General makefile for building executable programs and libraries for Embedded Artists QuickStart Boards C 2001 2005 Embedded Artists AB HH H tH HH tH HH EH HF HH EH HE H Ht EH HE EH EH ot EH HEH Ht EH ot EH HEH Ht EH Ht Name of target executable program or library NAME testprogram lpc2129 j Name of resulting program file Path and name of linker script file Only needed for executable program files LD SCRIPT
30. ograms environments o QuickStart Build Environment from Embedded Artists Embedded Artists have 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 is a 30 day fully functional evaluation version Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Page 13 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 with the LPC2129 CAN QuickStart Board 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 debugger 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
31. oject 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 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 LPC2129 processor e Access to the latest versions of all information and programs on the CD ROM Registering is 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 LPC2129 CAN QuickStart Board or on the package carrying the board along with your personal information Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Page 26 5 Further Information The LPC2106 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 LPC2129 Datasheet http www semiconductors philips com acrobat datasheets LPC2119 2129 03 pdf 2 Philips LPC2129 User s Manual http www semiconductors philips com acrobat usermanuals UM LPC21XX LPC22XX 2 pdf 3 Philips LPC2129 Errata Sheet http www semiconductors philips com acrobat erratasheets 2 129 pdf 4 ARM7TDMI Technical Refere
32. 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 this it is constantly updated e 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 is 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 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 8 below illustrate the general structure sample project O build Files Tam
33. startup Figure 8 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 simple makefile includes the general makefile that is placed in the build files subdirectory Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Figure 9 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 Ht HHH HHH EH EE HH EH EE EE HH EE EE HH EEE EH EEE EE EH HEE EH EEE HE General makefile for building executable programs and libraries for Embedded Artists QuickStart Boards C 2001 2005 Embedded Artists AB EEE FE AE HE HEH EH EE TE HE EH EE E EE HE FE HEE E EE E HE EE EH HE EE EH HE EH HE EE HE Name of target executable program or library NAME libea startup thumb i i Name of resulting library ELF file contains debug
34. ure 5 Philips LPC2000 Flash Utility Screenshot Copyright 2005 Embedded Artists AB LPC2129 CAN QuickStart Board User s Guide Configure the dialog as shown above The program will control the RS232 signals DTR and RTS if the appropriate checkbox is checked and hence provide fully automated program download Test connection with the LPC2129 CAN 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 LPC2129 CAN QuickStart Board is 12 0000 MHz In this case the value 12000 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 is 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 1xx isp index html Figure 6 below shows the command syntax for the program
35. 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 LPC2129 CAN QuickStart Board e ADC power supply 5 volt capable of providing at least 150 mA more if external circuits need power from the 3 3 volt supply Observe that the LPC2129 CAN QuickStart Board does not contain any reverse polarity protection If voltage is applied with wrong polarity the board will likely be damaged Also observe that 6 0 volt is the absolute maximum voltage that can be applied without damaging the on board voltage regulator TPS70251 and the CAN transceivers TAJ104x Consult the TPS70251 datasheet for exact details e A serial extension cable DB9 male to DB9 female DB9M DMO9FP for connecting the LPC2129 CAN QuickStart Board to a PC e An optional JTAG interface for program development debugging 1 2 Features Embedded Artists LPC2129 CAN QuickStart Board lets you get up and running quickly with Philips ARM7TDMI LPC2129 microcontroller The small form factor board offers many unique features that ease your development e Philips ARM7TDMI LPC2129 microcontroller with 256 Kbyte program Flash 16 Kbyte SRAM and 2 CAN communication channels e All LPC2129 I O pins are available on connectors e 12 0000 MHz crystal for m

Download Pdf Manuals

image

Related Search

Related Contents

Software Visualization in Prolog  Coastal Shower Doors NPQFR35.75ORB-C Installation Guide  14xxxx-000 dynasty Vlocity OM  ENSEMBLES DE MANTEAUX DÉCOR napoleonfoyers.com  Ayuda - Autoridad Portuaria de Ceuta  call toll free I-800-BUY-AIWA  VG 231 234 JP  Visualizza - Service, Support  Samsung МР3 плеер YP-W1AL Инструкция по использованию    

Copyright © All rights reserved.
Failed to retrieve file