Home

Getting Started Guide for LPC ARM-core

image

Contents

1. 0 6 6 eeee Je OI O OOC The correct orientation of the dongle on the CM module Electrocomponents plc Page 4 EDP CM LPCxxxx Getting Started V3 11 RS 3 Build and run Hello World 3 1 Load the Project Plug the dongle into the CM module noting the orientation in the picture above Connect the dongle to a USB port on the host computer Turn on power to the Base Board Download the EDP LPCxxxx Hello World folder from the EDP web site to your C drive Run Keil uVision 4 on the host computer Click on Open Project from the Project menu and navigate to the EDP LPCxxxx Hello World folder Double click on Hello World to load the project files e The screen will now appear as below File Edit View Project Flash Debug Peripherals Tools SVCS Window Help mye PSPS SE E He Hs As Qecd lHlA4 a Hello World 01 HHKAAAAAKAA AAA AAA AA AAA AAA AA KAA KAAAAARAAAAAAAAAAAKAAAAAAARKAAAREEEE 2y Source 02 Hello World Test Program for EDP LPC1768 Module WGM 10 2010 startup_LPC17xx s 03 ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt delays c 04 2 Main c 05 include lt lpci7xx h gt Portst c eae ELOT ieee Use MISRA type definitions E include Portst h i itl Ge cad dee gE system_LPC17xx c include timeri h ee a ee ee eee ene Software delays Sg Header sint32_ t main SystemInit setup TIMER1 iu Set ims de
2. Please read this manual to get an understanding of the system Each of the Command Modules CM and Application Modules AM has its own user manual so again these documents must be read to get an understanding on how to use the modules Each of the boards comes with its own suite of software to fully exercise the EDP Application Modules and the peripherals available on the MCU device An EDP system usually consists of one Command Module and one or more Applications Modules plugged into a Base Board A minimum system just has a Command module and Base Board for example a simple web server operating through an Ethernet connection The Command Module dictates whether the whole system uses a supply voltage of 3 3V or 5 0V This particular CM module use a 3 3V microcontroller MCU and so the board is configured as such The user can check the Vcc_CM signal on the Base Board break out header to confirm the system voltage There are 100 pins on the MCU and these are connected via various link options to the Base Board The Base Board then routes these signals to the Application Modules thereby allowing the CM Module to communicate with the Application Modules As many of the MCU pins have more than one function it can make the mapping of the connections rather complex so there are additional support documents available to help you with this The first is the Pin Allocation Spread Sheet One spread sheet is available for each of the CM Modules T
3. E Build Output C Find in Files Browser Simulation 4 Build your own Project The procedure for building and programming your own project is exactly as outlined above using your own project folder containing source c and header h files The Hello World program does not use any EDP Application Module hardware but your projects probably will so the necessary drivers will need to be included in your folder Download these from the EDP web site Note that MCU specific drivers will also be required see example above Electrocomponents plc Page 6 EDP CM LPCxxxx Getting Started V3 11 RS 4 1 Creating a new Project 5 Click on New Vision Project from the Project menu and navigate to your project folder containing your source files Type in a project name and click on Save You will now be asked to select a target MCU device In this case select NXP and then the part number from the drop down list Right click on Source Group 1 in the Project pane expanded from Target 1 and then on Add Files to Group Select and Add all your source c files You can rename Target 1 and Source Group 1 and create other groups for other files by right clicking on Target 1 and then clicking on Manage Components Double click on file system _LPCxxxx c and select the Configuration Wizard tab Locate the Power Control for Peripherals Register and tick the boxes of peripheral systems used by your
4. requirements To build download and run your first program you will need to have a suitable Integrated Development Environment IDE running on a PC If necessary download Keil uVision 4 for ARM processors from the Keil website This is a full featured free trial version that is limited to 32Kbytes of output code You can upgrade to the full version later or try one of the alternatives discussed in an appendix to the User Manual The IDE handles all aspects of code production as it contains a source code editor assembler C compiler Flash programmer and debug tools 2 2 Hardware requirements The Keil IDE needs a hardware programming debug dongle which allows the CM module to be linked via USB to the IDE running on the PC If you already run Keil Vision then you should already have the interface in the form of a ULINK2 module If not then a suitable unit can be obtained from RS under the part no 703 9241 The software inside the dongle is upgraded automatically by Keil uVision when it is plugged in to the host computer It supports classic ARM7 ARM9 architectures as well as the later Cortex devices JTAG and SWD are both supported itil A HAN mee SS ua a wa BAR WRK BRR LEAR BRR ayy MER RRR 3 RNR kuy y a rs ors V F y Ae zi i igi i sa abe wa on t J Ay e e e o _ _ _ oe e o STHTTHTTLERLALL LLL EARLE LARP ER EED mi ee
5. Embedded Development Platform Getting Started Guide for LPC ARM core Command Modules EDP CM 1113 EDP CM 1343 EDP CM 1768 EDP CM 2368 Version 3 11 February 2011 RSEDP EMBEDDED DEVELOPMENT PLATFORM EDP CM LPCxxxx Getting Started V3 11 Contents 1 Introduction 2 Prepare to run the Hello World Program 2 1 Software requirements ccccceeesceeecceeeeeeeeeseeeeeeeeeseeeeeeeeesseeeeeeeeaas 2 2 Hardware reQuireMentts ccccccsssecccesseeeccesseeceeeseecseaseeessaneeesseess 3 Build and run Hello World 3 1 Load the Project ccccccccssssececcceeseceeeceeeeeeeeeeeeaeeeeeesseaeeeeeseaaaeeeess 3 2 Build the PFO S CU wiciatncwcaacicessenateatatacseceiuradnunciuesasnqeesieangivranenolardeaweaus 3 3 Download and program target Flash memory cccseeeeeeeeeeeees 4 Build your own Project 4 1 Creating a NEW PYOjeCt ccccceececcesseecceeseeeceeeseecseuseeeseuseesssaseeeses 5 Conclusion 6 Appendix 1 EDP I C Bus Device Addresses Electrocomponents plc Page 2 EDP CM LPCxxxx Getting Started V3 11 RS 1 Introduction To get the most out of the EDP platform it s important to understand the concept of the EDP system correctly This is detailed in the user manual for the Base Boards which can be downloaded as a pdf file RS EDP BB SystemBaseBoard User Manual Vx from the RS EDP website The base boards come in both 2 position and 4 position formats and share a common user manual
6. ebug Peripherals Tools SVCS Window Help Saye aA cE SE y i ap ha Q O H S 2 4 gg Hello World A a Hello World ay Source 02 Hello World Test Program for EDP LPC1768 Module WGM 10 2010 l A startup LPC17xx s 03 settee e eee eet eee eee tet e eee ete eet ee ee ee ete eee ete eetee eee eet eeeeeeeeeee f delays c 04 T 05 include lt lpc17xx h gt z Erga 06 include misra _ types h Use MISRA type definitions H LE 07 include Portst h I O port setup and driver 2 a 08 include timeri h Timer Ti driver delay E timerl c 09 include delays h Software delays H Header 10 11 sint32_t main 121 13 SystemInit 14 setup_TIMER1 iu Set ims delay increment 15 setup ports default Setup I O for EDP board 16 17 while 1u Main program loop 18 user led D402 toggle Toggle User LED D402 19 delay ms 200u Wait for 200ms i 20 211 22 zi E Pr FBo Fu Oy Te 4 gt Build target Hello World a assembling startup LPCi7xx s l compiling delays c compiling Main c compiling Portst c compiling system LPC17XX C compiling timeri c linking Program Size Code 5104 RO data 236 RW data 8 ZI data 608 Hello World axf 0 Error s 9 Warning s Load G EDP LPC1768 Hello World Hello_World AXF Erase Done Programming Done Verify OK 4 p
7. he one for the NXP family of ARM based modules is called Pin Allocation 100 pin NXP Command Module Rev xx This spreadsheet also forms part of the User Manual for the LPCxxxx CM module It details which pins are mapped to the Base Board backplane and the various link options which need to be configured to connect them accordingly To get an appreciation of how the Application Modules are mapped to the backplane and how the CPU Module can connect to them a Mapping Aid exists The one for the LPC1768 module is called Mapping Aid RS EDP NXP LPC1768 Rev xx Name may vary slightly for other NXP modules This mapping aid also forms part of the User Manual for the LPC Module and at a glance you can see what resources are required to get the best out of each Application Module Other useful documents you will need are the circuit diagrams for the modules you wish to use These are contained in the back of each user manual So before you start to use the RS EDP system make sure you have to hand the following documents e Base Board User Manual e Appropriate CM module User Manual e Application Module User Manuals as required Electrocomponents plc Page 3 EDP CM LPCxxxx Getting Started V3 11 RS 2 Prepare to run the Hello World Program Program development is performed on a PC running suitable software and a plug in hardware dongle is required as a programming debug interface between the PC and the CM module 2 1 Software
8. lay increment setup ports default Setup I O for EDP board while iu Main program loop user led D402 toggle Toggle User LED D402 delay ms 200u Wait for 200ms E Pr Bo 3 Fu Oy Te 4 E Build Output gd Find in Files Z Browser Simulation Note that the folder already contains all the necessary source code files together with the Build files produced by the IDE To demonstrate the procedure we will now perform the Build and Link operations 3 2 Build the Project e Click the Rebuild button on the Build toolbar see picture below The various files are compiled and linked progress being reported in the Build Output pane e If there are any compilation errors they will be reported here and linking will not take place Double clicking on a particular error message will take you to the offending line of source code in the edit pane above Electrocomponents plc Page 5 EDP CM LPCxxxx Getting Started V3 11 RS 3 3 Download and program target Flash memory e f zero errors are reported then the code can be downloaded to the target MCU and programmed into its Flash memory Click on the Download button on the Build toolbar e Press the Reset button on the EDP Base Board and one of the two yellow User LEDs on the CM module should begin flashing indicating a successful download and program Rebuild Project button Download to Target button sion4 anm File Edit iew Project Flash D
9. project Resave the file when finished There may be other settings that need changing but the defaults should get things running Build and load the project as before Conclusion This is only a basic introduction to the Keil IDE more complete information and a description of all the debugging features can be found on the Keil website Refer to the User Manual for these CM modules for details of alternative program development tools which can be used with EDP Electrocomponents plc Page 7 EDP CM LPCxxxx Getting Started V3 11 RS 6 Appendix 1 EDP I C Bus Device Addresses 8 bit address format is used the LSB is reserved as the read write bit These addresses are defined in file 12C Directory h BaseBoard BB_DIP 0x40 8 bit DIP Switch Address set by jumper link JP501 providing possible range of addresses 0x40 default 0x42 BB EEPROM OxA2 Serial 4KB EEPROM memory Address set by jumper links J601 to J603 providing possible range of addresses OxAO OxA2 default OxA4 OxA6 OxA8 OxAA OxAC OxAE Communications Module EDP AM CO1 CO1_RTC OxAO Real Time Clock and SRAM Address set by jumper link J304 providing possible range of addresses OxAO default OxA2 Digital I O Module EDP AM DIO54 DIO54 Out 0x46 Digital output latch Address set by jumper links B305 to B307 providing possible range of addresses 0x40 0x42 0x44 0x46 default 0x48 Ox4A Ox4C Ox4E DIO54_ In 0x44 Digital input latch Address se
10. t by jumper links B302 to B304 providing possible range of addresses 0x40 0x42 0x44 default 0x46 0x48 Ox4A Ox4C Ox4E Analogue Input Module EDP AM AN16 AN16_ADC Ox6A 12 channel 10 bit Analogue to Digital Converter AN16_Pot 0x58 Digital Potentiometer for setting filter cut off frequency of channels ANO and AN1 Address set by jumper links J305 amp J306 providing possible range of addresses 0x58 default Ox5A Ox5C Ox5E Note that jumper links J204 amp J205 select between CTRL_I2C default and I2C_GENO bus channels Dual BLDC Motor Module EDP AM MC2 MICROCHIP_MOTOR_DRIVER_BASE 0x80 dsPIC U201 Address set by jumper links J201 to J203 providing possible range of addresses Ox80 default 0x82 0x84 0x86 0x88 Ox8A Ox8C Ox8E dsPIC U202 Address set by jumper links J205 to J207 providing possible range of addresses 0x80 0x82 default 0x84 0x86 0x88 Ox8A Ox8C Ox8E Note that spare addresses allow up to four MC2 modules per base board Miscellaneous SRFO8 OxEO Daventech SRFO8 Ultrasonic Rangefinder module Electrocomponents plc Page 8

Download Pdf Manuals

image

Related Search

Related Contents

Configuraciones del Teclado y del Sonido  H3M-DP Installation Guide  Graco ISPA173AA User's Manual  D40    - SHS Web of Conferences  コンパクトボディに高速・高画質エンジン搭載。 ビジネスシーンを刷新する  APC 300 Power Supply User Manual    USER`S MANUAL • MANUALE D`USO www.proelgroup.com english  

Copyright © All rights reserved.
Failed to retrieve file