Home

Developing code for the element14/Freescale XL_STAR

image

Contents

1. Save in Ji DebugS08 ex Ev Name Date modified Accelerometer Info 14 12 2010 16 0t J Board Photos 17 01 2011 11 1 J DebugS08Demo 09 02 2011 11 3 Historic 25 01 2011 13 1 JL Open Source BDM 24 01 2011 14 5 H I File name SimpleProject mcp Save as type Project Files mep Cancel Figure 31 Use a writeable directory for the new project 46 4 Inthe next step Figure 32 you have the option to add existing files to the new project We will not add any for this demonstration Remove IV Copy files to project J CodeWarrior for Microcontre 7 v Create main c main asm fie r files to be added to the new project and press Add o copy the added files to the project folder select Copy Files to Project o have the wizard generate default main c and or main asm files select Create sme Tie ome ces Figure 32 Don t add any existing files 47 5 The demonstration does not make use of the Processor Expert or Device Initialization wizards Figure 33 code is generated it is necessary to write device ialization code manually Project contains startup only Figure 33 Don t use a Rapid Application Development wizard 48 6 Accept the default C C options Figure 34 Which level of startup code do you want to use is will perform an ANSI compliant Select minimal startup code for best code density code it initializes global Which me
2. Start Using Code warrior freescale As V Display on Startup Figure 28 CodeWarrior startup dialog 44 2 This will launch a New Project wizard Select MC9S08MM128 as the derivative and HCS08 FSL Open Source BDM as the connection method Choose your default connection HCSO8LC Family Connections HCSO8LG Family Full Chip Simulation HCSO8LL Family P amp E Multilink Cyclone Pro HCS08MM Family HCS08 FSL Open Source BDM MC9S08MM32 MC9S08MM128 MC9508MM32A MC9S08MM64 HCS08MP Family nnect to the new HCS08 FSL Open J HCS08Q Family urce BDM based on the MC9S08JM6O HCSOSR Family H HCSO8SC Family HCSO8SE Family 1 HCSORSG Family CNN Figure 29 CodeWarrior New Project wizard 3 In the next step Figure 30 specify the name to give to the CodeWarrior project and its location using the Set button 45 Please choose the set of languages to be Project name You can make multiple SmpleProjectmep Location Absolute assembly As DebugS08 SimpleProject Relocatable assembly we ce language support will be included in A ie project Figure 30 Specifying the project name and location Make sure that the directory where the new project is placed is writeable for example place itin Documents rather than C Program Files Figure 31 Note that CodeWarrior will automatically add the file extension mcp to the name of the project file
3. again later Windows will ask again the next time you plug in your device or log on Don t show this message again for this device Your device will not function until you install driver software Cancel Figure 7 Installing the OSBDM Debug Port driver 18 Windows will look for a suitable driver in a number of locations but fail to find one You will then be given the option of specifying the driver location manually Figure 8 Specify the folder in which you installed the P amp E Drivers in Step 4 above e g C Program Files PEMicro G i Found New Hardware OSBDM Debug Port Browse for driver software on your computer Search for driver software in this location C Program Files PEMicro Y Browse 7 Include subfolders Figure 8 Specifying the location of the OSBDM Debug Port driver After successful installation of the OSBDM Debug Port driver you will be prompted to repeat the steps for the OSBDM Virtual Serial Port Finally disconnect the cable install jumper JP3 and then reconnect the cable You will be prompted once more to complete the steps for the OSBDM Bootloader Port After installing the last driver remove jumper JP3 and reconnect the board once more ready for normal operation 4 4 Checking that the XL STAR board is recognised by Windows You can check that the board is recognised by Windows using the Device Manager With the board connected to
4. servicepack Processor Expert v3 09 Service Pack Do you want to continue with the installation anyway Figure 6 Ignore the warning about Processor Expert 17 Step 5 allows you to install a demonstration CodeWarrior project for use with the XL_STAR board Install this in a folder that is easily writable for example use the Documents folder not C Program Files which is protected under Windows Vista and later OS versions Using the demonstration project is described in detail in Section 5 4 3 Installing the USB Drivers The XL_STAR board requires a number of USB drivers Although the drivers were partially installed in Step 4 above you may need to carry out some additional configuration depending on the version of Windows you are using When doing this you should note that there are three drivers in total and the process will need to be repeated for each The three drivers are as follows OSBDM Debug Port OSBDM Serial Port OSBDM Bootloader Port To install the first two drivers make sure that jumper JP3 on the XL_STAR board is not fitted Then connect the board to the PC using a USB cable You should see a dialog similar to the following Figure 7 57 Found New Hardware Windows needs to install driver software for your OSBDM Debug Port Locate and install driver software recommended i Windows will guide you through the process of installing driver software for your device i gt Ask me
5. with the demo project supplied 5 5 Editing and compiling a File You can edit an individual source file by double clicking on its name in the project window which brings up an editor window like this Figure 14 25 Click here to get a pop up list of header files used by this source file Right click on a symbol to get various context specific options Click here to get a pop up list of functions declared in this file 26 do gt ML B of gt Path C Users Simon Desktop DebugS02 Depa S08Demo Sources main lt Del cocco soos af cse ooo main Program main entry point void main void int count ring Initialise syst initialise_hardw clocks GPIO etc e Delay about 2 seconds to indicate that board is OK leds_all_on millisecond_delay 2000 Show that we re live leds_pulse 60 Force main loop to initially select DEMO_ORIENTATION 14 bit accuracy 2g sensitivity NewDemo DEMO ORIENTATION NewReadMode READ MODE 14BITS NewRange FULL SCALE 2G CurrentDemo NewDemo Loop forever to run demos for 55 Check for button press events Did user press one of the buttons SW1 SW3 Requested new sensitivity by pressing g Sel button SW1 Requested new read mode by pressing DataW button SW2 Request new demo mode by pressing Chan button SW3 nA if NewRange CurrentRange NewReadMode Current
6. you can double click on the file install all htatorunthe wizard Initial installation requires the completion of six install steps Figure 4 the first five of which launch a separate installer Follow the on screen instructions to complete each step A XL STAR Starter Kit Installation Wizard EI x 2 freescale semiconductor Welcome to the XL_STAR Starter Kit This wizard will help guide your through the installation of the XL_STAR Starter Kit software First you need to install the CodeWarrior development environment Then there are a couple of important CodeWarrior patches to be installed Next install the XL STAR sample project Finally take a look at the documentation which tells you how to get started exploring the fascinating world of XL STAR programming To proceed click on the six buttons below in the order shown Each of the first five buttons will launch one of the five installers you need to run Follow the on screen instructions for each installer and wait for each installer to finish before launching the next one The last shows the documentation Caution Some of the installers are quite big and may take a while to start up so there may be quite a delay before anything happens after you click on one of the buttons Please be patient Step 1 Install CodeWarrior Don t choose Check for updates at the end Step 2 Install Patch 1 Step 3 Install Patch 2 Ignore warning that Processor Expert v3 09 Se
7. your PC Also make sure that the board connects directly to the PC not through an external USB hub You can verify that the XL STAR board has been recognized by checking the Windows Device Manager whilst the board is connected You should an entry for Open Source BDM Debug Port LibUSB Win32 Devices or similar see Figure 22 33 r 12 Device Manager File Action View Help gt 5 B HEBG S B RG Gg DELL SIMON H E Acronis Devices H E Computer H Disk drives H E Display adapters H DVD CD ROM drives t ce Floppy drive controllers tz on Human Interface Devices Ig IDE ATA ATAPI controllers H E Jungo H 2 Keyboards a LibUSB Win32 Devices t n Mice and other pointing devices i Monitors H E Network adapters c Dl Processors H a Sound video and game controllers H Storage controllers Hq System devices H Universal Serial Bus controllers Figure 22 Open Source BDM Debug Port in Windows Device Manager If Windows can detect that the XL_STAR board is attached but warns that it cannot locate the appropriate drivers see Section 4 3 5 9 Problems debugging at high clock speeds You may find that debugging works perfectly with the example project but that you encounter problems when writing your own code which runs the MM128 MCU at a higher bus clock speed The bus clock provides the clock source for the MM128 s Background Debug Controller BDC so if the bus clock is too fast
8. Component Memory Window Help CNUsersNSimonDesktopXD ebugS08ND ebugS 08D emo Sources main c Line 209 static byte last xyz values 6 Last values of X Y and Z JXEAARRERERRRERERERREERAARRERERRRARARERRERERARERAXERARXERARERRAR A ERE EERE DCEA JSR main Program main entry point DCED LDEX 0x07D0 mI M P G DCFO JSR OxE1D4 DCF3 LDX 0x3C B DCF5 CLRH int count ring DCF6 JSR OxESSD DCF9 CLRA Initialise system clocks GPIO etc DCFA STA 0x0101 initialise hardware Delay about 2 seconds to indicate that board is OK HCSOB A o mx e700 se 31 SR 64 Status vBINZC hon 0 sc DCES LAP 0 IP y DCES PPASE 2 Auto Symb CurrentDemo unsigned char NewDemo CurrentRange NewRange CurrentReadMode NewReadMode unsigned char unsigned char unsigned char unsigned char unsigned char main Auto Symb Local done cmd HCS08_FSL_OpenSourceBDM_postload cmd count 16255 int ring 258 int Postload command file correctly executed main OxDCES P T STARTED RUNNING d Automatic triggers breakpoints watchpoints and trace possible For Help press F1 MC9S08MM128 Breakpoint Figure 19 Hiwave Debugger The close up in Figure 20 shows the most useful buttons in the debugger s tool bar Reset Target Halt break into Start Continue executin
9. Developing code for the element14 Freescale XL_STAR board Document Revision 1 04 07 2011 elementiu ey 2 freescale Please note when using the XL_STAR for USB device development via J1 the USB connector on the top side of the XL_STAR the XL_STAR must be powered via a USB cable connected to J6 the USB connector on the underside of the XL_STAR before a USB cable is connected to J1 If USB cables are not connected in this order the USB regulator on U1 will be over loaded and permanent damage to U1 may occur For those of you who wish to permanently modify the XL_STAR board so that this damage will not occur the picture below details a relatively simple modification In summary a via next to capacitor C1 on the top side of the board must be drilled out breaking the connection of the 3 3V supply to C1 and C2 The break in connectivity can be confirmed by placing a multi meter set for resistance measurement between the 3 3V supply top left plated through hole and the left hand pad of C2 which should show high impedance E N ak AO V 42 ae ar et on Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document Freescale Semiconductor reserves the right to make chan
10. H1 PTF2 TPM2CHO 40 By driving a pin with a PWM signal which has a duty cycle of less than 100 the LED can be illuminated less intensely The orientation demo uses this effect to illustrate the direction in which gravity is pulling relative to the board s orientation 7 3 Communicating with the Accelerometer The MCU is connected to the accelerometer using an industry standard connection known as Inter Integrated Circuit or IIC The accelerometer s IIC address is OX1D determined by a pull up resistor on the board Typically IIC is used to read or write a single 8 bit register location within the accelerometer for example software reads the PULSE_SRC register to get information about the latest tap pulse event that the accelerometer has detected In the case of the accelerometer s data registers which are used to obtain the most recent readings on the X Y and Z axes the full readings are 14 bits each split into an MSB LSB pair of registers This means that the software must read a total of six registers to obtain a full XYZ readout This is done with a single IIC command capable of transferring multiple sequential bytes in one go Alternatively the accelerometer can be reconfigured to only return the MSB part of each X Y and Z value i e the most significant 8 bits This means that the IIC command must only read three bytes making it faster for applications which don t require full 14 bit accuracy
11. ReadMode NewDemo CurrentDemo Lie219 Col20 m 1 bio Figure 14 CodeWarrior Editor window If you right click within the editor window you will get a context sensitive popup of useful options including the option to compile the file If there are any error or warning messages when compiling a source file the error window is displayed Figure 15 27 Show hide error messages Show hide warnings Show previous next error Show hide notes E Errors and warnings for DebugS08D emo mcp Al al 2 PETS n Errors amp Warhings missing e r 4 gt M B it Path CA Users Simon Desktop DebugS08 DebugS08Demo Sources main c o Initialise system clocks GPIO etc n initialise hardware i Delay about 2 seconds to indicate that board is OK leds_all_on gt millisecond_delay 2000 10 Show that we re live leds_pulse 60 Force main loop to initially select DEMO_ORIENTATION 14 bit accuracy 2g sensitivity DEMO ORIENTATION Mode READ MODE 14BITS FULL SCALE 2G Nex Nev Nev CurrentDemo NewDemo Loop forever to run demos Line223 Coll Normal editor area Figure 15 CodeWarrior Errors amp Warnings window Note that you can correct errors by typing directly within the error window which behaves like a normal edit wi
12. To demonstrate how to write code using either 8 bit or 14 bit sensitivity the demo program uses the SW2 switch labelled DataW to allow the user to reconfigure the accelerometer for either mode 7 4 Interrupt Handling In order to conserve power both the accelerometer and the MCU are configured to switch to low power sleep modes when no events of interest are occurring The MCU is woken from sleep mode when an interrupt occurs either from the accelerometer or caused by one of the push buttons SW1 SW3 In the case of the accelerometer the interrupt is signalled when the accelerometer drives its INT1 pin low This is connected to the MCU s Keyboard Interrupt KBI2P4 which is configured to detect a falling edge When INT1 goes low the falling edge triggers the interrupt to the MCU Note that although INT1 remains low until software has cleared the source of the interrupt by reading data from the accelerometer this will not cause a further interrupt to the MCU because no further edges occur This means that the interrupt service routine can be kept as short as possible being used only to wake the MCU from sleep 41 7 5 Low Power mode The demo software is designed so that the accelerometer will detect when there has been no event of interest for 20 seconds or more This will depend on the demo mode selected for example in freefall detection mode only dropping the board will cause an event After 20 seconds of inactivity the accel
13. bit data Select 2g 4g or 8g sensitivity Freefall demo selected Transient demo selected Orientation demo selected Shake demo selected Tap demo selected Figure 3 Demo mode selection 3 2 Changing sensitivity The accelerometer sensitivity can be changed by pressing button SW1 labelled G sel This selects which multiple of normal gravity corresponds to a full scale accelerometer reading The options are 2g 4g and 8g as indicated by the green LEDs D3 D5 Note that changing the sensitivity only affects the Orient demo because the other accelerometer functions used here don t depend on the sensitivity setting 13 3 3 Selecting 8 or 14 bit data The accelerometer can return 8 bit or 14 bit data to the MM128 MCU Applications requiring more accuracy can use 14 bit data otherwise it is faster to read 8 bit data You can select between the two options by pressing the SW2 button labelled DataW see Figure 3 The current selection is shown on the green LEDs D1 D2 Changing between 8 bit and 14 bit data only affects the Orient demo but although the data width setting is honoured you probably won t notice the difference See Section 7 3 for more information 3 4 Low Power Mode When the accelerometer doesn t detect any interesting events i e acceleration or deceleration for around 20 seconds software will put the board into a power saving mode So that you can see this happening an X pattern is displayed brie
14. ble from the Freescale website www freescale com e ANAO68 Embedded Orientation Detection Using the MMA8451 2 3Q e AN4069 Offset Calibration of the MMA8451 2 30 e AN4070 Motion and Freefall Detection Using the MMA8451 2 3Q e AN4071 High Pass Data and Functions Using the MMA8451 2 30 e AN4072 MMA8451 2 3Q Single Double and Directional Tap Detection 42 AN4073 Using the 32 Sample First In First Out FIFO in the MMA8451Q AN4074 Auto Wake Sleep Using the MMA8451 2 3Q AN4075 How Many Bits are Enough The Trade off Between High Resolution and Low Power Using Oversampling Modes AN4076 Data Manipulation and Basic Settings of the MMA8451 2 3Q AN4077 MMA8451 2 3Q Design Checklist and Board Mounting Guidelines 43 8 Writing your own code for the XL STAR Board In this final section we will walk through the steps for creating your own CodeWarrior project for the XL_STAR board In brief the steps are as follows e Create a new project e Write some code to do something interesting with the XL_STAR board e Compile and link e Download code to the board e Debug and test 8 1 Creating a new project 1 When CodeWarrior is launched you should see the following dialog Figure 28 which includes the option to create a new project Alternatively you can use the New Project option in CodeWarrior s File menu n Startup Load Example Project Load Previous Project Run Getting Started Tutorial
15. cuit on the bottom side of the board is not powered The only thing in use is the battery The bottom side of the board Figure 2 is required when downloading a new program from the PC to be stored in the flash on the MC9S08MM128 and when debugging the program Battery charger 2 Lithium lon x Coin Cell battery Oo o a s RAOR m Q CECEVECHROESA NE e p Mc9S08JM60 microcontroller 9 O o WED Ltd 4 4 info w e design co uk oo px 2000 A s a freescale ml ciem ee A El ij o USB connector for debugging Figure 2 XL_STAR Board Bottom Side The bottom side of the board includes the following major components e The Li lon battery A secondary 8 bit microcontroller a Freescale MC9S08JM60 which accepts debugging commands from the PC and forms the Open Source Background Debug Mode OSBDM interface The JM60 then controls the main MCU on the top side of the board using its BDM interface e The USB port used to connect the JM60 to a PC e A Freescale MC34673 battery charger for the Li lon battery 10 When a USB cable is plugged into the underside USB port the power for both sides of the board is taken from the PC and regulated down to 3 3V using a Freescale MC34727CFC The battery charger will top up the battery using power drawn from the USB connection NB If you have used other Freescale development systems you may be familiar with a setup in which the target board t
16. debugging Figure 1 XL_STAR Board Top Side On the top side of the board Figure 1 is the main microcontroller MCU a Freescale MC9S08MM128 This is an 8 bit MCU based on the HCSO8 family architecture with the following specification e 128 KB of Flash e 12KBof RAM e Processor speed configurable up to 48 MHz Also on the top side is a Freescale accelerometer the MMA8451Q This can detect both its orientation through the static pull of gravity and any movement of the board which causes acceleration or deceleration There is a set of 48 orange LEDs arranged in an 8 pointed star with the accelerometer at its centre The LEDs are used by the demo program to indicate information such as how the board is tilted Three small push buttons SW1 SW3 allow the user to select different accelerometer demos tilt tap shake freefall detection etc and to configure the accelerometer The accompanying green LEDs are used by the demo program to indicate status information There is an On Off switch connected to a Lithium lon Coin Cell battery which is mounted on the underside of the board Finally there is a spare USB connector next to the On Off switch You will not need to use this USB connector unless you are writing your own application which includes a USB interface It is not the USB port which is used to debug the board 2 2 Bottom Side In normal use when the XL STAR board is not connected to a PC for debugging most of the cir
17. e code of the Demo program eese an ananasas een 38 y REMIS O ATREA o UTR ER ERE MM ED 38 7 2 Lighting the orange LEDs esses enne nnne aaa aaa aaa aaa aaa 38 7 8 Communicating with the Accelerometer esses eene eene enne 40 7 4 Interrupt Handling 1 niei aka aa saaa si ia Lebanese iai 40 TiS Cow Power mode ret er a a a e E i a aaa 41 7 6 Floating Point Coders niiina innad ias a o i aa sa ais saaa 41 7 7 Freescale Application Notes for the MMA8451Q Accelerometer csccccssssteeeessteeeeees 41 Writing your own code for the XL STAR Board cscsssseseescsesecececececeeececececceceeeenenceeeeeeeee 43 8 1 Creating a new PLOjeCt 0 0 eeeeeeesssneecececccseesesseesececeeeecsseseeeaaaaeececeseeesseeeaaeeeeceeeeeseseeeeeneees 43 8 2 Finding your way around the CodeWarrior Project Window eese 49 8 3 Writing some simple source COCE ccccsseccccessseceeeseeeeesceeeeeccesaseceesaseeeeeseeseeceesaaeeceesaea 50 8 4 Building the new project sssssseeeseseeeeeeee eene nnne nnne enne nennen nnne enne 53 8 5 Downloading the project to the XL STAR board aaa aaa aa aaa aaa aaa 53 8 6 gt Running the code edu E aaa ata a a da aa i i sucede den PORE ERR ias sa ae oa kana 53 1 Introduction This document describes the process of developing code for Freescale s XL_STAR a low cost development board featuring one of t
18. eeeeeeeeeeee eese e eee eene een nne nena aa anao nation nues sense sees osos nasa koss 14 42 Easy lgclee E 14 4 3 Installing the USB Drivers csssssccssssscccssssseccessseeseessseeeeceseaeceeesseseesesseeeeceeeaeeseseseeeeeess 17 4 4 Checking that the XL STAR board is recognised by Windows esee 18 4 5 Installing CodeWarrior 6 3 SE manually seen enne 19 Developing code for the XL STAR Board eeeeeeeeeeseseeeeee eene nenne nnn nnn 21 Eie 21 5 2 Sample CodeWarrior Project ccccsssscccsssseccesssseccccsneeeeecseeeeeeseeeeeecessaeeeeeeeneseesseesaeeeeesees 21 5 3 Turning off Multi Document Interface MDI mode Optional esses 22 5 4 The CodeWarrior Project window cccsscccccsssssccccsseececcseeeeccessaeeceesaeeeeeseneeeeceessaeeseesaea 24 5 5 Editing and compiling File eos sandas eene sin asi aed do oor ino rne uaa rra aa noe aka eoa ia 25 546 Building To PR 27 5 72 Debugging code inse ine ni a ida i ia eec oae Da a nir Mea ji ARR CRAT a MUR a HA TR ARRA FERRE 28 5 8 Problems connecting to the board aaa saaa aaa aaa aaa aaa aaa aaa aaa en nnne nene 31 5 9 Problems debugging at high clock speeds enne 33 Updating the OSBDM JM60 Firmware on the board eeeeee eee eene 34 Understanding the sourc
19. erometer will switch to a low power sleep mode This causes an interrupt allowing the MCU to be put into a low power mode too In the case of the demo software the board can be woken again by picking it up To achieve this the accelerometer is reconfigured at the moment when the MCU is about to sleep In the new configuration the accelerometer runs in Sleep mode and is set to detect any transients which would indicate that the board has been moved Once the accelerometer detects movement it will wake up and also signal to wake the MCU The MCU then reconfigures the accelerometer restoring its normal wake mode configuration 7 6 Floating Point code The sample program is unusual because it makes use of floating point data types like double and maths support routines like atan2 Most embedded software only uses integer data types The CodeWarrior compiler includes complete support for floating point data types implemented in software The HCSO8 family of microcontrollers don t support floating point instructions in hardware In order to link to floating point support routines the CodeWarrior project includes a library ansifs lib For integer only routines this can be replaced by ansiis lib which may result in a slightly smaller program size 7 7 Freescale Application Notes for the MMA8451Q Accelerometer You may find the following Freescale application notes useful when writing code for the accelerometer all of which are availa
20. ferent demos by repeatedly pressing button SW3 labelled Chan as shown in Figure 3 The current demo mode will be indicated by the green LEDs D6 D10 The available demo modes are Orient Try tipping the board and watch the orange LEDs indicate the direction and magnitude of tip Shake Try flicking the board in a direction either up or down left or right or forward or back You need to use a sharp flick like striking a ball in a game of table tennis The orange LEDs will point in the direction of the initial flick re setting after a couple of seconds If the initial flick is not fast enough the accelerometer may instead detect the rebound event as your hand stops the board s movement In this case the reverse direction will be illuminated Tap Hold the board loosely and tap it once with your finger the LEDs will show a pulse pattern Tap twice in quick succession double tap to get a different animated pattern Freefall Drop the board from the height of a few centimetres or more The freefall event will be detected and displayed on the LEDs for a couple of seconds Transient The orange LEDs will all illuminate if the board is moving strictly if it is accelerating or decelerating and turns off after a short while if the board is stationary MJ J 1 2 R5 m IL m E n7 Q iar Tr ans DB TT rmm ih Op jUr ien D KAT TRS 5 L S Ga rap 12 Select Demo 2 1 Select 8 bit or 14
21. fly before almost all the LEDs turn off To wake the board up just pick it up A pattern is displayed briefly to indicate that the board is awake again and the current demo mode is then resumed See Section 7 5 for more information 14 4 Installing CodeWarrior NB Do not connect the board to a PC until you have installed CodeWarrior because the PC won t recognise the board until a USB driver has been installed The XL STAR development kit includes a copy of CodeWarrior for Microcontrollers V6 3 Special Edition CodeWarrior is an integrated development environment for editing compiling and debugging code The Special Edition is free but the C compiler is limited to a maximum of 32KB of object code In later releases of CodeWarrior for Microcontrollers V6 3 Special Edition this was increased to 64KB of object code please check the Freescale website for the latest release http www freescale com webapp sps site overview jsp codezCW SPECIALEDITIONS amp tid 4 1 System Requirements e 1 0 GHz Pentium compatible processor or better e Microsoft Windows XP or later e 512 MB RAM 1 GB recommended e 2GB hard disk space on Windows system disk e CD ROM drive for installation e USB port for communications with target hardware 4 2 Easy Install The software for the XL_STAR development kit is supplied on CD When you insert the CD the auto run feature should launch the XL_STAR Starter Kit Installation Wizard Alternatively
22. formation Click this link for more information on this hardware 2 Select Device Embedded OSBDM OSJTAG Device Bootloader Mode Refresh list of devices Identify unit by blinking LED 3 Select Architecture to Support sog 4 Firmware File Selection c osbdmens_s08 2900 Choose Firmware Update File or S Record Select XL STAR osbdm jm60 s08 abs s19 Update Firmware Figure 24 PE Firmware Updater used to update the bootloader r Uin mare stim O Interface hardware detected with old firmware Updating Please Wait a Update Firmware osbdmens s08 2900 Erasing Address S0000CE00 Figure 25 OSBDM update in progress 7 When the update completes you will see a warning similar to Figure 26 Unplug the USB cable remove the JP3 jumper and finally reconnect the USB cable to return to normal operation 37 The embedded OSJTAG OSBDM needs to enter run mode to start the debug programming session Please unplug the USB cable remove the jumper from the 2 pin bootloader header and reconnect the USB cable Figure 26 Last stage of updating OSBDM firmware 38 7 Understanding the source code of the Demo program You may want to explore the source code of the demo program and develop it further The following remarks may be helpful when looking at the source code 7 1 Orientation The MMA8451Q is a three axis accelerometer It can measure the acceleration in three inde
23. g program Single Step Step Out steps steps into out of subroutine subroutines Step Over steps over subroutine calls Figure 20 Hiwave debugger Toolbar 31 To set a breakpoint use the debugger Source window to right click on the line where you want the breakpoint to be set A context sensitive popup menu Figure 21 includes Set Breakpoint BB Toe Time Simulator amp Real Time Debugger_C Wsers Simor Desttop DebugSO8 DebugS08Demo HCSOS FSLOpersowcesOMini ae Figure 21 Context sensitive menu available through right click 5 8 Problems connecting to the board File View Run HCS08 FSL Open Source BDM Component Source Window Help niea e 2x2 e toeea A Assembly terere Line 210 Imai j M AA n E OxDE44 main Program main entry point La OxE62F Y 7e 2 0x07D0 void main void OxE1D4 8 0x3C int count ring OxESSD Initialise system clocks GPIO etc initialise_hardy 0x0101 S Set Breakpoint J Delas about Run To Cursor leds all on m a Show Breakpoints Show Location Lusia Set Trigger Address A Set Trigger Address B main x ICFFAP P Triggers Settings gt Open Trigger Settings Dialog Trigger Mod
24. ges without further notice to any products herein Freescale Semiconductor makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typical parameters that may be provided in Freescale Semiconductor data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Freescale Semiconductor does not convey any license under its patent rights nor the rights of others Freescale Semiconductor products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application Buyer shall indemnify and hold Freescale Semiconductor and its officers employees subsidiaries affiliates and distributors harmless against al
25. hat you re writing code for is connected to the PC via special debug hardware such as a P amp E USB BDM MULTILINK Such devices typically have a USB connection to connect to the PC and a 6 pin BDM cable to connect to the target board In the case of the XL_STAR board this separate debug interface is not required this functionality is provided by the electronics on the bottom of the board 2 3 Jumpers Also on the top side of the board are four jumpers For normal use they should be configured as follows JP1 Fitted Access point for measuring SO8MM128 MCU current JP2 Not fitted When fitted the JM60 acts as a USB to Serial converter Requires additional software JP3 Not fitted When fitted the JM60 runs a bootloader out of reset allowing updating of the OSBDM debug firmware See Section 0 JP4 Fitted Access point for measuring MMA8451Q accelerometer current 11 3 The Sample Application The XL_STAR board comes with a sample application already programmed into the on chip Flash of the MM128 MCU The program is designed to show some of the things that can be done with the on board MMA8451Q accelerometer When first powered on the board will go into an orientation demo mode Try picking the board up and tipping it in different directions You should see that the orange LEDs illuminate to indicate the direction of the tip and its magnitude 3 1 Demo Selection You can select between five dif
26. he most recent members of the HCSO8 family of 8 bit microcontrollers the MC9S08MM128 The document will look at the following topics e An introduction to the XL STAR hardware e How to use the sample application pre programmed onto the board e How to install Freescale s CodeWarrior for Microcontrollers V6 3 Integrated Development Environment IDE on a Windows PC e How to compile and build a sample HCSO8 project e Programming the code into the Flash memory on the HCS08 e Debugging e Writing your own code for the XL STAR board If you are keen to experiment before reading this manual just switch on the board and try the pre programmed application It features a number of demos designed to show some of the things you can do with the on board accelerometer You can find details about the available demo modes in Section 3 NB Do not connect the board to a PC until you have installed CodeWarrior because the PC won t recognise the board until a USB driver has been installed 2 XL_STAR board hardware The XL_STAR is a double sided board It may be simplest to imagine that the two sides are separate circuit boards that are stuck together As a developer you will mainly be concerned with the top side 2 1 Top Side SW2 USB connector for application use SW3 Sw1 On Off Switch Tarot c M doe MC9S08MM128 3 D ti a e jTr microcontroller MCU Green LEDs Jumpers JP1 4 Orange LEDs Accelerometer USB connector for
27. iner window Figure 11 This is the default mode when you first install CodeWarrior 23 File Edit View Search Project Processor Expert Device Initialization Window Help BES EOCxRGAARESR BAB i gt Hes02 FSL Open Source BDM GF ID B B db OU gt M B al Path G curent DebugS08 SimpleProject Sources main c Fi include lt hidef h gt for EnableInterrupts macro ies Link Order Targets include derivative h include peripheral declarations DER Sources v E c Includes v 9C void main void EnableInterrupts enable interrupts 74 C Libs 3 m Project Settings include your code here tor __RESET_WATCHDOG feeds the dog loop forever please make sure that you never leave main Figure 11 CodeWarrior in MDI mode Some programmers really like to work this way but other people prefer the ability to have independent windows that can be placed anywhere on the screen and are not constrained by the container If you want to turn MDI mode off you can do so through the Preferences option in the CodeWarrior s Edit menu Figure 12 You need to restart CodeWarrior for this change to take effect 24 IDE Preferences 2 IDE Preference Panels General Build Settings Menus Menu bar layout windows IDE Startup Plugin Settings Recent projects 5 Recent documents Shielded Folders Recent symbo
28. ke unsigned short Ae Configure write once System Options Register SOPT STOPE 1 Stop Mode enabled COPE 0 Disable watchdog BKGDPE 1 Background Debug Mode Pin Enable hop SOPT1 0x23 Configure all GPIO pins connected to orange LEDs as outputs y PTCDD Ox3f PTDDD 0x3c PTEDD 0x80 PTFDD Oxc7 Port C pins must be high to turn on LEDs PTCD 0x3 Loop forever for for spoke 0 spoke lt 8 Delay for i 0 i lt 20000 i All LEDs off PTDD 0x3c PTED 0x80 PTFD Oxc7 Turn on a spoke of LI switch spoke case 0 amp K amp K amp K amp K amp K amp K amp K lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt spoke i EDS Spoke Spoke Spoke Spoke Spoke Spoke Spoke Spoke D62 D61 D60 D59 D58 D57 D56 D63 on on on on on on on on ai y n i 53 8 4 Building the new project To build the project use the Make button in the CodeWarrior project window Figure 36 8 5 Downloading the project to the XL STAR board To test the project first make sure that a USB cable is connected between
29. l claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2011 All rights reserved Table of Contents 1 2 Introductio M emere 6 XL STAR board hardware sssssessssesseeesseeeeseseeeeeeeseeeneceneececeeesesesececeeeseeeseeeeeeeeeeeeeeees 7 VS MEE Ic 7 2 2 Bottom Side E Dre EE e even beca rm exea ee Gorge ai E Ea 8 23 UNI ae M 10 The Sample Application ree eee er ss ks sine ne n n ao nn nan sasas ks sia i n aa Y na sa ss naa nana anna m i na Rene 11 ze MEE Tu DEI uec 11 PEG ITE ASTSIUZIAERRROTEROROTITTIETDTM 12 3 3 Selecting 8 or 14 bit d ta ce cecinere rote Red FIR i a onere uua aa nte cB Pa e Rug 13 3 4 LowPowerMoOQUe orantes id case tid Geta rosea p PR OE a i lash FR Exe See VIDE edd 13 Installing CodeWartiOr rere Fuere reete s sa neon ea ee van eaae chap a es e a n ena 14 4 1 System Requirements e
30. lics an Recent workspaces Source Trees Editor Use Third Party Editor Code Completion launch adkor Os Code Formatting Editor Settings Launch editor w line Font amp Tabs ettings Use Multiple Document Interface MDI Text Colors Use text based projects Factory Settings t Import Panel Export Panel OK Cancel Appl Figure 12 Turning off MDI mode 5 4 The CodeWarrior Project window All development work in CodeWarrior requires the creation of a Project which specifies which source files and libraries are required to build a specific executable Figure 13 shows a screen shot of the demo project open in the CodeWarrior IDE with the some of the most useful options labelled Note that you can access many more project specific options through the Edit Project Settings button For example you can configure compiler and linker options here Make Edit project settings Debug Ea Sources ff MC9S508MM12E E3 Project Settings HE3 Startup Code 8l Start08 c H Linker Files n m m zi m a a m zi n m mM m 10 files Double click to open source file Figure 13 CodeWarrior Project window When using CodeWarrior you will also see references to Processor Expert and Device Initialization These are expert wizards aimed at helping you to write code for embedded targets Although sometimes useful for new projects you don t need to make use of them when working
31. mory model shall be used C Tiny Small C Banked Select the floating point format supported Select None for best code density None float is IEEE32 double is IEEE32 float is IEEE32 double is IEEE64 sme Tie ome emen Figure 34 Use the default C C options 49 7 Don t enable the use of the PC lint source code checker Figure 35 Do you want to create a project set up for PC4int TM gs gt Cdint TM is a product from Gimpel E the PC4int TM software from Gimpel installed in to use the CodeWanior plugin ou can enable PCJint TM later by manually cloning target and changing the linker to PCJint linker lt Back Next gt Finish Cancel Figure 35 Don t use PC lint for this project 8 2 Finding your way around the CodeWarrior Project Window The steps outlined in Section 8 1 will create a CodeWarrior project suitable for use with the XL_STAR board and open the main project window Figure 36 Make Edit project settings j SimpleProject mcp Fi ZTS Files Link Order Targets J6 Sources BG ag Includes Double click to open source file Figure 36 CodeWarrior Project Window 8 3 Writing some simple source code At the moment our sample application code doesn t actually do anything interesting although you could build it and download it to the XL STAR board if you wanted to Shown below is the listing of a simple replacement f
32. ndow 5 6 Building code The whole build process of compiling the individual source files and then linking them together with any libraries can be performed in a single step using the Make button in the project window or by selecting Make in the Project menu Compilation proceeds as described above and if there are no compilation errors in the individual source files the linker is invoked Figure 16 W Building XL STAR Demo mcp Project XL STAR Demo mcp Target Standard Stop File Task File Count Line Count XL STAR Demo abs Linking Totals 0 Figure 16 CodeWarrior Build Progress window 28 5 7 Debugging code To download code to the XL_STAR board first ensure that the board is connected to the PC using a USB cable see Figure 17 Note that the USB cable needs to be plugged into the USB port on the underside of the XL_STAR board as shown below Don t be confused by the other USB port which is for use when developing applications for the SO8MM128 which need their own USB interface This USB port is not used X for debugging Ik sr el kt SESS a ai freesc Connect USB cable here for debugging Figure 17 Connecting a USB cable for debugging 29 To download code to the board click the Debug button in the project window or select Debug from the Project menu This will cause the Hiwave debugger to launch in a separate window The Hiwave debugger will automatically program
33. or the code in the file main c which does the following e Turns off the COP Watchdog timer The Computer Operating Properly COP watchdog timer is useful for applications which need to monitor whether software is functioning correctly When the COP watchdog is enabled the application must service it periodically using a specific 50 51 sequence If the servicing does not occur within a set time period the COP will timeout and cause the processor to reboot To keep our example as simple as possible the COP watchdog is disabled Uses the default internal clock The XL_STAR board includes an external 16MHz crystal which can be used to give an accurate processor clock To keep this demo as simple as possible the external crystal is not used and the processor remains in its boot up clocking mode For an example of reconfiguring the processor to use the external crystal see the accelerometer demo code Note that the OSBDM module can only be used for debugging if the MM128 processor s bus clock is slow enough See Section 5 9 Initialises the GPIO pins connected to the orange LEDs so that they are all outputs See Section 7 2 Enters an endless loop to flash the LEDs using a pattern in which the spokes light in turn giving the effect of a rotating finger of light include lt hidef h gt for Enablelnterrupts macro include derivative h include peripheral declarations void main void unsigned char spo
34. pendent directions X Y and Z Holding the board so that the On Off switch is at the top and the word Freescale is at the bottom the accelerometer is oriented as follows Y Z axis out of page towards reader This is referred to in the MMA8451Q documentation as the Portrait Down PD orientation mode In this orientation the reading for the Y axis would be 1g and X and Z would be Og 7 2 Lighting the orange LEDs The orange LEDs are arranged in an 8 pointed star as shown in Figure 27 Each of the 8 spokes of the star is connected to a GPIO pin For example LEDs D62 D54 D46 D38 D30 and D22 are all connected to Port D Pin 4 PTD4 Similarly each of the 6 concentric circles is connected to another GPIO pin For example the outer circle D56 D63 is connected to Port C Pin 5 PTC5 Thus to illuminate D62 you would drive PTD4 low and PTC5 high 39 PTD4 PTD5 6604 6466 PTF 948646 9 v 66 6 9 PTD2 99 9 PTFO Figure 27 Relationship between GPIO pins and LEDs For one of the demo modes the Orientation demo the LEDs are driven in a more sophisticated way This takes advantage of the fact that each of the GPIO pins connected to a spoke can be reconfigured so that it is controlled by one of the MCU s Timer PWM TPM modules GPIO pin TPM module channel PTDS TPM1CH3 PTD4 TPM1CH2 PTD3 TPM1CH1 PTD2 TPM1CHO PTE7 TPM2CH3 PTFO TPM2CH2 PTF1 TPM2C
35. rom Freescale s website see Figure 24 e Select OSBDM OSJTAG as the hardware type e Select Embedded OSBDM OSJTAG Device Bootloader Mode as the device e Select S08 as the architecture to support e Select the Choose Firmware Update File or S Record option NB Don t choose the Automatic option e Select the file containing the new OSBDM firmware e Press the Update Firmware button You should get a progress dialog similar to Figure 25 r 1 Multilink Osbdm Firmware Update and Architecture Selection Utility Version 1 01 A Ps New versions of P amp E s software products automatically update the firmware of the different hardware interfaces as necessary This application allows updating configuration of the hardware for use with older applications which do not have this capability C opyright 2011 P amp E Microcomputer Systems Inc miero http www pemicro com 1 Select Hardware Type OSBDM OSJTAG Embedded debug circuitry in Freescale Tower boards Freescale embeds an open source debug processor in many of it s Tower cards and Demonstration boards P amp E has taken a leading role along with the open source community in maintaining and updating the firmware of this hardware This utility allows updating of the firmware of these boards The Multilink Universal is a much higher speed more fully featured interface designed to work either with the tower cards or the user s own target hardware In
36. running code with a newer OSBDM version You do not need to update the OSBDM firmware in normal operation unless Freescale issues an update to the code If you do need to update the OSBDM firmware make sure that you use a version that s specifically intended for the XL_STAR board The following steps should help you 1 Disconnect the board from the PC 2 Install a jumper in position JP3 to select Bootloader mode 3 With the On Off switch set to the Off position connect the board to the PC using a USB cable plugged into the board s normal debugging port on the underside of the board 4 If you wish you can check that the board has been recognised by the PC by using the Windows Device Manager Device Manager File Action View Help gmitIHB aimi ss Sg DELL SIMON H E Acronis Devices H Computer lq Disk drives H E Display adapters Si DVD CD ROM drives E Floppy drive controllers 5 Human Interface Devices cj IDE ATA ATAPI controllers Jungo ZL Keyboards LibUSB Win32 Devices A Mice and other pointing devices Ki Monitors amp Network adapters Dl Processors Xj Sound video and game controllers lt gt Storage controllers System devices L Universal Serial Bus controllers E E E E E E D H 0 0 0 0 Figure 23 The board shows up as Open Source BDM Bootloader Port in Windows Device Manager 5 Use the PE Firmware Updater program version 1 01 available f
37. rvice Pack must be installed first Step 4 Install Latest Drivers Step 5 Install Sample Project Step 6 View Documentation Copyright 2011 Freescale Semiconductor Inc Figure 4 XL_STAR Starter Kit installation wizard Note that there may be a long delay between clicking on one of the buttons and the individual installer starting up Please be patient Make sure you wait for each install step to complete before going on to the next step At the end of Step 1 which installs the base CodeWarrior software you will see a dialog asking whether you want to check for on line updates Figure 5 Do not check for updates at this time 16 E 15 CodeWarrior Development Studio for Microcontrollers V6 3 InstallShield Wizard InstallShield Wizard Completed 4 Z freescale semiconductor The InstallShield Wizard has successfully installed CodeWarrior Development Studio for Microcontrollers V6 3 Click Finish to exit the wizard No Don t check for program updates ae check for program updates Recommended lt Back Cancel Figure 5 Do not check for updates when the first installer completes During Step 3 you will see a warning message that Processor Expert v3 09 Service Pack is not installed Figure 6 Ignore this warning and continue with the installation anyway r cwos8 V6 3 HCS08 MM128 JE128 Service Pack Setup The following servicepack must be installed before installing this A
38. the PC and Jumper JP3 not installed the board will show up twice Figure 9 19 e Open Source BDM Debug Port in the section LibUSB Win32 Devices e PEMicro USB Serial Port i1 in the section Jungo r ay Device Manager File Action View Help e lt gt 5 HEB R N G A Display adapters 44 DVD CD ROM drives Floppy drive controllers 5 Human Interface Devices ca IDE ATA ATAPI controllers im Jungo E PEMicro USB Serial Port i1 I USB Multilink 2 0 V WinDriver amp Keyboards LibUSB Win32 Devices n Mice and other pointing devices Ki Monitors amp Network adapters D Processors Sound video and game controllers A Storage controllers L System devices E E E 8 8 e 1 E E E E ER EH Figure 9 Windows Device Manager showing USB connections to XL STAR board 4 5 Installing CodeWarrior 6 3 SE manually Instead of using the installation wizard described in Section 4 2 above you can also proceed manually using the individual installers supplied on the CD in the following order 1 Install CodeWarrior for Microcontrollers V6 3 CW MCU V6 3 SE exe 2 Install the CodeWarrior for Microcontrollers V6 3 1 update CWMCUV631 exe 3 Install the MM128 specific patches CW08 V6 3 HCS08 MM128 JI E128 SP exe 4 Install the latest USB drivers need when debugging code on the board PEDrivers install exe 5 Install the sample XL STAR CodeWa se
39. the application into Flash memory on the XL_STAR board as shown in Figure 18 IB True Time Simulator amp Real Time Debugger _C Users Simon Desktop DebugS08 DebugS08Demo HCS08 FSL OpenSaurceBDMini em x File View Run Connection Component Memory Window Help Dps m sele 22 gt al 9 E Source OxDE44 Ir DCEA JSR OxE62F DCED LDEX 0x07D0 DC OxE1D4 0x3C OxESSD 0x0101 ACE Executing Command File B Procedure executing HCS08 FSL penSourceBDM startur x xn Status VBINZC IXDCES P E Data Global Auto Symb SCENIC El command Auto Symb Local E Data 2 At startup the commands written below will be execu Startup command file correctly executed Target Ready For Help press FL Automatic triggers breakpoints watchpoints and trace possible MC9S08MM128 Target Ready Figure 18 Hiwave Debugger with code download in progress Following successful programming the application will be executed automatically up until the point where the main procedure is about to start Figure 19 below The point at which code execution halts can be changed through the Configuration menu option in the debugger s File menu if required IB True Tere Simulator amp Real Time Debugger ChUseriSimorlDesktoglDebugSOB DebugSORDemolHCSUR FSL_OpenSourceBDMini I File View Run HCS08FSLOpenSourceBDM
40. the debug information sent on the BGND pin will be too fast for the OSBDM module on the bottom side of the board to handle For applications which require a high bus clock speed e g 24MHz for the USB port you will need to use an external debug device such as a P amp E USB Multilink Interface connected to the BDM header labelled Target BDM 34 6 Updating the OSBDM JM60 Firmware on the board WARNING You will not normally need to update the OSBDM firmware on the XL_STAR board and doing so wrongly can render the board unusable To fix this situation you would need to be able to reprogram the JM60 using a separate programming device like the P amp E Micro HCS08 USB Multilink cable The XL_STAR board includes two microcontrollers On the top side of the board is the main MM128 MCU This is the processor you will normally target when writing new programs You update the code for this MCU every time you change your program and programming mistakes shouldn t cause lasting problems The other processor on the underside is the JM60 MCU This runs firmware which allows the CodeWarrior debugger to control the MM128 via its Background Debug Mode BDM module The firmware is known as Open Source BDM or OSBDM It is responsible for USB communications with the debugger on the PC controlling the MM128 via the BGND debug pin and configuring the on board battery charger It also includes a Bootloader to allow you to update the
41. tup sample project ex rrior project 20 21 5 Developing code for the XL_STAR Board 5 1 Introduction In this section we will look at how to use the CodeWarrior IDE to develop programs to run on the XL STAR board The material is a brief introduction aiming to cover the following e Editing files e Compiling and linking e Programming the application into Flash memory on the MCU e Debugging For further information the reader is referred to the CodeWarrior documentation 5 2 Sample CodeWarrior Project A sample CodeWarrior project is supplied with the XL_STAR development kit and you can use it to try things out The project builds the same demo code which is supplied pre installed on the board and described in Section 3 Installation of the sample project was described in Section 4 2 above To open the project launch CodeWarrior and if the startup dialog in Figure 10 is shown select the option Start Using CodeWarrior Then use the Open option from the File menu to navigate to the installed project and select the project file XL_STAR_Demo mcp 22 Create New Project Load Example Project Load Previous Project Run Getting Started Tutorial freescale Sitar IV Display on Startup Figure 10 CodeWarrior Startup dialog 5 3 Turning off Multi Document Interface MDI mode Optional CodeWarrior includes support for MDI mode in which individual CodeWarrior windows are all children of a single conta
42. ule Usage ELLE Set Markpoint zr Memory EEB Show Markpoints Auto Symb Global Auto Paged CurrentDemo E 00080 P 00 76 00 00 00 00 06 00 ssi NewDemo Set Program Counter ug 00088 P 04 FB 33 00 00 00 00 00 i CurrentRange 00090 P 20 00 00 00 00 00 00 00 NewRange Open Source File 00098 P 00 oo 00 00 00 00 00 00 CurrentReadMode 000AO P 00 00 00 00 00 00 00 OO NewReadMode Copy Ctrl C 000A8 P 00 00 00 00 00 00 00 00 r Go To Line Ctrl G E Data 2 x Ces Cs 88 El Command rere Find Ctrl F m gt Alna an Auto Symb Local main OxDCES P T 2 x count 16255 a bakia m rin 255 i i nune g Folding D Breakpoint m Freeze in gt Marks a D For Help press Fl ToolTips gt Bakpoints watchpoints and trace possible MC9508MM128 Breakpoint In rare circumstances the debugger may have problems connecting to the board e g 32 r No Communication There is currently no communication with the hardware Please try to connect before loading an executable file One possible cause is that Windows has failed to recognise that the board is connected to the PC The first thing to try is to disconnect the USB cable and then reconnect it This should cause Windows to see the board NB Make sure that you are connecting to the USB port on the underside of the board not the one near the On Off switch on the top of the board If this doesn t work try using another USB port on
43. your PC and the XL STAR board as described in Section 5 7 Note that the USB cable connects to the port on the underside of the board not the one near the On Off switch Use the Debug button in the CodeWarrior project window Figure 36 to launch the Hiwave debugger in a new window This will program the new application into Flash memory on the MM128 MCU erasing any existing application Figure 37 LOADER WARNING The debugger is going to mass erase the non volatile memory eeprom and flash of the current device then program the application Aer Do not display this message anymore for this project Figure 37 Loading code to the MM128 MCU 8 6 Running the code Hit the green Start arrow in the Hiwave debugger window to start the program executing Figure 38 You should see a rotating pattern on the board s orange LEDs 54 a x 8s r x Reset Target Halt break into Start Continue executing program Step Out steps out of subroutine Single Step steps into subroutines Step Over steps over subroutine calls Figure 38 Hiwave debugger Toolbar For more information about debugging see Section 5 7

Download Pdf Manuals

image

Related Search

Related Contents

MP45-DR  Samsung ME83X Uživatelská přiručka  - Janitza  ZUO 98238 Installation Guide  Portable Electrotherapy      S-120横乗り取扱説明書をダウンロード  ORION+ / MANUALE DELL`OPERATORE  Virtual Machine Mobility Planning Guide  

Copyright © All rights reserved.
Failed to retrieve file