Developing code for the element14/freescale XL_STAR board

Size: px
Start display at page:

Download "Developing code for the element14/freescale XL_STAR board"

Transcription

1 Developing code for the element14/freescale XL_STAR board Document Revision: /2011

2 2

3 3 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 changes 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 all 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 All rights reserved

4 4 Table of Contents 1. Introduction XL_STAR board hardware Top Side Bottom Side Jumpers The Sample Application Demo Selection Changing sensitivity Selecting 8- or 14-bit data Low Power Mode Installing CodeWarrior System Requirements Easy Install Installing the USB Drivers Checking that the XL_STAR board is recognised by Windows Installing CodeWarrior 6.3 SE manually Developing code for the XL_STAR Board Introduction Sample CodeWarrior Project Turning off Multi-Document Interface (MDI) mode (Optional) The CodeWarrior Project window Editing and compiling a File Building code Debugging code Problems connecting to the board... 31

5 Problems debugging at high clock speeds Updating the OSBDM-JM60 Firmware on the board Understanding the source code of the Demo program Orientation Lighting the orange LEDs Communicating with the Accelerometer Interrupt Handling Low Power mode Floating Point code Freescale Application Notes for the MMA8451Q Accelerometer Writing your own code for the XL_STAR Board Creating a new project Finding your way around the CodeWarrior Project Window Writing some simple source code Building the new project Downloading the project to the XL_STAR board Running the code... 53

6 6 1. Introduction This document describes the process of developing code for Freescale s XL_STAR, a low cost development board featuring one of the most recent members of the HCS08 family of 8-bit microcontrollers, the MC9S08MM128. The document will look at the following topics: An introduction to the XL_STAR hardware How to use the sample application pre-programmed onto the board How to install Freescale s CodeWarrior for Microcontrollers V6.3 Integrated Development Environment (IDE) on a Windows PC How to compile and build a sample HCS08 project Programming the code into the Flash memory on the HCS08 Debugging 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.

7 7 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 Top Side Figure 1: XL_STAR Board - Top Side

8 8 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 HCS08-family architecture, with the following specification: 128 KB of Flash 12 KB of RAM 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 Ion 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 Bottom Side In normal use, when the XL_STAR board is not connected to a PC for debugging, most of the circuit 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.

9 9 Figure 2: XL_STAR Board - Bottom Side The bottom side of the board includes the following major components: The Li Ion 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. The USB port used to connect the JM60 to a PC A Freescale MC34673 battery charger for the Li Ion battery.

10 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 that you re writing code for is connected to the PC via special debug hardware such as a P & 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 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 S08MM128 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 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 Demo Selection You can select between five different 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: Shake: Try tipping the board and watch the orange LEDs indicate the direction and magnitude of tip 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, resetting 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: Freefall: Transient: 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. 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. 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.

12 12 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 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 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 briefly 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 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 - =CWH 4.1. System Requirements 1.0 GHz Pentium compatible processor or better Microsoft Windows XP or later 512 MB RAM (1 GB recommended) 2 GB hard disk space on Windows system disk CD-ROM drive for installation 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 you can double-click on the file install_all.hta to run the 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.

15 15 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 16 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. Figure 6: Ignore the warning about Processor Expert

17 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 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): Figure 7: Installing the OSBDM Debug Port driver

18 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 & E Drivers in Step 4 above, e.g. C:\Program Files\PEMicro 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 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 the PC and Jumper JP3 not installed, the board will show up twice (Figure 9):

19 19 Open Source BDM Debug Port in the section LibUSB-Win32 Devices PEMicro USB Serial Port (i1) in the section Jungo 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

20 20 (3) Install the MM128-specific patches CW08_V6_3_HCS08_MM128_JE128_SP.exe (4) Install the latest USB drivers need when debugging code on the board PEDrivers_install.exe (5) Install the sample XL_STAR CodeWarrior project setup_sample_project.exe

21 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: Editing files Compiling and linking Programming the application into Flash memory on the MCU Debugging For further information the reader is referred to the CodeWarrior documentation 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 preinstalled 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 22 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 container window (Figure 11). This is the default mode when you first install CodeWarrior.

23 23 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 24 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.

25 25 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 with the demo project supplied 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):

26 26 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 27 Figure 15: CodeWarrior Errors & Warnings window Note that you can correct errors by typing directly within the error window, which behaves like a normal edit window 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): Figure 16: CodeWarrior Build Progress window

28 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 S08MM128 which need their own USB interface. Figure 17: Connecting a USB cable for debugging

29 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 the application into Flash memory on the XL_STAR board, as shown in Figure 18. 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.

30 30 Figure 19: Hiwave Debugger The close up in Figure 20 shows the most useful buttons in the debugger s tool bar: Figure 20: Hiwave debugger Toolbar

31 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 Figure 21: Context-sensitive menu available through right-click 5.8. Problems connecting to the board In rare circumstances the debugger may have problems connecting to the board, e.g.

32 32 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 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 33 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 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 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 & E USB Multilink Interface, connected to the BDM header labelled Target BDM.

34 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&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 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:

35 35 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 from Freescale s website (see Figure 24): Select OSBDM/OSJTAG as the hardware type Select Embedded OSBDM/OSJTAG Device - Bootloader Mode as the device Select S08 as the architecture to support Select the Choose Firmware Update File or S-Record option. NB: Don t choose the Automatic option. Select the file containing the new OSBDM firmware Press the Update Firmware button. You should get a progress dialog similar to Figure 25

36 36 Figure 24: PE Firmware Updater, used to update the bootloader 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 Figure 26: Last stage of updating OSBDM firmware 37

38 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 Orientation The MMA8451Q is a three axis accelerometer. It can measure the acceleration in three independent 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: X 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 0g 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 39 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 PTD5 PTD4 PTD3 PTD2 PTE7 PTF0 PTF1 PTF2 TPM module/channel TPM1CH3 TPM1CH2 TPM1CH1 TPM1CH0 TPM2CH3 TPM2CH2 TPM2CH1 TPM2CH0

40 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 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 0x1D, 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. 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 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 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 accelerometer 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 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 HCS08 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 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 available from the Freescale website AN4068, Embedded Orientation Detection Using the MMA8451, 2, 3Q AN4069, Offset Calibration of the MMA8451, 2, 3Q AN4070, Motion and Freefall Detection Using the MMA8451, 2, 3Q AN4071, High Pass Data and Functions Using the MMA8451, 2,3Q AN4072, MMA8451, 2, 3Q Single/Double and Directional Tap Detection

42 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 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: Create a new project Write some code to do something interesting with the XL_STAR board Compile and link Download code to the board 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. Figure 28: CodeWarrior startup dialog

44 44 2) This will launch a New Project wizard (). Select MC9S08MM128 as the derivative and HCS08 FSL Open Source BDM as the connection method: 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 45 Figure 30: Specifying the project name and location Make sure that the directory where the new project is placed is writeable - for example, place it in 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. Figure 31: Use a writeable directory for the new project

46 46 4) In the next step (Figure 32) you have the option to add existing files to the new project. We will not add any for this demonstration. Figure 32: Don't add any existing files

47 47 5) The demonstration does not make use of the Processor Expert or Device Initialization wizards (Figure 33): Figure 33: Don't use a Rapid Application Development wizard

48 48 6) Accept the default C/C++ options (Figure 34): Figure 34: Use the default C/C++ options

49 49 7) Don t enable the use of the PC-lint source code checker (Figure 35): 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)

50 50 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 for the code in the file main.c which does the following: 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

51 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 <hidef.h> /* for EnableInterrupts macro */ #include "derivative.h" /* include peripheral declarations */ void main(void) { unsigned char spoke; unsigned short i; /* Configure write-once System Options Register (SOPT) STOPE=1 : Stop Mode enabled COPE=0 : Disable watchdog BKGDPE=1 : Background Debug Mode Pin Enable */ SOPT1 = 0x23; /* Configure all GPIO pins connected to orange LEDs as outputs */ PTCDD = 0x3f; PTDDD = 0x3c; PTEDD = 0x80; PTFDD = 0xc7; /* Port C pins must be high to turn on LEDs */ PTCD = 0x3f;

52 52 /* Loop forever */ for (;;) { for (spoke = 0; spoke < 8; spoke++) { /* Delay */ for (i = 0; i < 20000; i++) ; /* All LEDs off */ PTDD = 0x3c; PTED = 0x80; PTFD = 0xc7; /* Turn on a spoke of LEDs */ switch (spoke) { case 0: PTDD &= ~ (1 << 4); /* Spoke D62 on */ break; case 1: PTDD &= ~ (1 << 3); /* Spoke D61 on */ break; case 2: PTDD &= ~ (1 << 2); /* Spoke D60 on */ break; case 3: PTED &= ~ (1 << 7); /* Spoke D59 on */ break; case 4: PTFD &= ~ (1 << 0); /* Spoke D58 on */ break; case 5: PTFD &= ~ (1 << 1); /* Spoke D57 on */ break; case 6: PTFD &= ~ (1 << 2); /* Spoke D56 on */ break; case 7: PTDD &= ~ (1 << 5); /* Spoke D63 on */ break; } } } }

53 Building the new project To build the project, use the Make button in the CodeWarrior project window (Figure 36) Downloading the project to the XL_STAR board To test the project, first make sure that a USB cable is connected between 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) 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 54 Figure 38: Hiwave debugger Toolbar For more information about debugging, see Section 5.7.

Controller Continuum. for Microcontrollers V6.3. Quick Start

Controller Continuum. for Microcontrollers V6.3. Quick Start Controller Continuum for Microcontrollers V6.3 Quick Start CodeWarrior Development Studio for Microcontrollers V6.x Quick Start SYSTEM REQUIREMENTS Hardware Operating System Disk Space PC with 1 GHz Intel

More information

CodeWarrior Development Studio for Freescale 68HC12/HCS12/HCS12X/XGATE Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System 200

CodeWarrior Development Studio for Freescale 68HC12/HCS12/HCS12X/XGATE Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System 200 CodeWarrior Development Studio for Freescale 68HC12/HCS12/HCS12X/XGATE Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System 200 MHz Pentium II processor or AMD-K6 class processor,

More information

for Freescale MPC55xx/MPC56xx Microcontrollers V2.10 Quick Start

for Freescale MPC55xx/MPC56xx Microcontrollers V2.10 Quick Start for Freescale MPC55xx/MPC56xx Microcontrollers V2.10 Quick Start CodeWarrior Development Studio for MPC55xx/MPC56xx Microcontrollers, version 2.xx Quick Start SYSTEM REQUIREMENTS Hardware Operating System

More information

Quick Start Guide for TWR-S08MM128-KIT TOWER SYSTEM MC9S08MM128. The industry s most complete solution for portable medical applications

Quick Start Guide for TWR-S08MM128-KIT TOWER SYSTEM MC9S08MM128. The industry s most complete solution for portable medical applications Quick Start Guide for TWR-S08MM128-KIT TOWER SYSTEM MC9S08MM128 The industry s most complete solution for portable medical applications TOWER SYSTEM Get to Know the TWR-S08MM128-KIT BDM Interface for MC9S08MM128

More information

for ColdFire Architectures V7.2 Quick Start

for ColdFire Architectures V7.2 Quick Start for ColdFire Architectures V7.2 Quick Start CodeWarrior Development Studio for ColdFire Architectures V7.2 Quick Start SYSTEM REQUIREMENTS Hardware Operating System Disk Space 1 GHz Pentium compatible

More information

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start SYSTEM REQUIREMENTS Hardware Operating System Disk Space Windows OS: PC with 1 GHz Intel Pentium compatible

More information

Lab Tutorial for TWR-S08MM128-KIT TOWER SYSTEM LAB MC9S08MM128. Electrocardiogram (EKG) with Freescale USB stack

Lab Tutorial for TWR-S08MM128-KIT TOWER SYSTEM LAB MC9S08MM128. Electrocardiogram (EKG) with Freescale USB stack Lab Tutorial for TWR-S08MM128-KIT TOWER SYSTEM LAB 1 MC9S08MM128 Electrocardiogram (EKG) with Freescale USB stack TOWER SYSTEM Introduction This lab is a step-by-step guide to run the EKG demo. The EKG

More information

Figure 1. Power Barrel Connector Requirements

Figure 1. Power Barrel Connector Requirements Freescale Semiconductor Quick Start Guide Rev. 0.1, 06/29/2004 DEMO9S12NE64 Demo Quick Start Guide Introduction This kit and guide contains everything you need to get started. You will connect the board

More information

for StarCore DSP Architectures Quick Start for the Windows Edition

for StarCore DSP Architectures Quick Start for the Windows Edition for StarCore DSP Architectures Quick Start for the Windows Edition CodeWarrior Development Studio for StarCore DSP Architectures Quick Start for the Windows Edition SYSTEM REQUIREMENTS Hardware Operating

More information

CodeWarrior Development Studio for Power Architecture Processors Version 10.x Quick Start

CodeWarrior Development Studio for Power Architecture Processors Version 10.x Quick Start CodeWarrior Development Studio for Power Architecture Processors Version 10.x Quick Start SYSTEM REQUIREMENTS Hardware Operating System Intel Pentium 4 processor, 2 GHz or faster, Intel Xeon, Intel Core,

More information

Electrode Graphing Tool IIC Driver Errata Microcontroller Division

Electrode Graphing Tool IIC Driver Errata Microcontroller Division Freescale Semiconductor User Guide Addendum TSSEGTUGAD Rev. 1, 03/2010 Electrode Graphing Tool IIC Driver Errata by: Microcontroller Division This errata document describes corrections to the Electrode

More information

CodeWarrior Development Studio for StarCore DSP SC3900FP Architectures Quick Start for the Windows Edition

CodeWarrior Development Studio for StarCore DSP SC3900FP Architectures Quick Start for the Windows Edition CodeWarrior Development Studio for StarCore DSP SC3900FP Architectures Quick Start for the Windows Edition SYSTEM REQUIREMENTS Hardware Operating System Disk Space Intel Pentium 4 processor, 2 GHz or faster,

More information

Updating the Firmware on USB SPI Boards (KITUSBSPIEVME, KITUSBSPIDGLEVME)

Updating the Firmware on USB SPI Boards (KITUSBSPIEVME, KITUSBSPIDGLEVME) Freescale Semiconductor User s Guide Document Number: KTUSBSPIPRGUG Rev. 1.0, 7/2010 Updating the Firmware on USB SPI Boards (KITUSBSPIEVME, KITUSBSPIDGLEVME) Figure 1. KITUSBSPIEVME and KITUSBSPIDGLEVME

More information

Model-Based Design Toolbox

Model-Based Design Toolbox Model-Based Design Toolbox Quick-Start An Embedded Target for the S32K1xx Family of Processors Version 3.0.0 Target Based Automatic Code Generation Tools For MATLAB /Simulink /Stateflow Models working

More information

CodeWarrior Development Studio for etpu v10.x Quick Start SYSTEM REQUIREMENTS

CodeWarrior Development Studio for etpu v10.x Quick Start SYSTEM REQUIREMENTS CodeWarrior Development Studio for etpu v10.x Quick Start SYSTEM REQUIREMENTS Hardware Operating System Software Disk Space Intel Pentium 4 processor, 2 GHz or faster, Intel Xeon, Intel Core, AMD Athlon

More information

CodeWarrior Development Studio

CodeWarrior Development Studio CodeWarrior Development Studio for StarCore and SDMA Architectures Quick Start for Windows Operating Systems and Embedded Cross Trigger This Quick Start explains how to set up a sample project to use the

More information

DEMO9S08AC60E. User s Guide. Freescale Semiconductor User s Guide. DEMO9S08AC60EUG Rev. 0.1, 11/2007

DEMO9S08AC60E. User s Guide. Freescale Semiconductor User s Guide. DEMO9S08AC60EUG Rev. 0.1, 11/2007 Freescale Semiconductor User s Guide DEMO9S08AC60EUG Rev. 0.1, 11/2007 DEMO9S08AC60E User s Guide Freescale Semiconductor, Inc., 2007. All rights reserved. How to Reach Us: USA/Europe/Locations not listed:

More information

MMA845x Driver: Quick Start Guide

MMA845x Driver: Quick Start Guide Freescale Semiconductor Document Number: AN4475 Application Note Rev 0, 07/2012 MMA845x Driver: Quick Start Guide by: Laura Salhuana 1 Introduction This quick start guide demonstrates how to load the MMA845x

More information

Using IIC to Read ADC Values on MC9S08QG8

Using IIC to Read ADC Values on MC9S08QG8 Freescale Semiconductor Application Note AN3048 Rev. 1.00, 11/2005 Using IIC to Read ADC Values on MC9S08QG8 by Donnie Garcia Application Engineering Microcontroller Division 1 Introduction The MC9S08QG8

More information

Getting Started with the Microcontroller Student Learning Kit (MCUSLK) Using the MC9S12C32 MCU Application Module (CSM-12C32)

Getting Started with the Microcontroller Student Learning Kit (MCUSLK) Using the MC9S12C32 MCU Application Module (CSM-12C32) Freescale Semiconductor User Guide MCUSLK_CSM12C32 Rev. 0, 6/2005 Getting Started with the Microcontroller Student Learning Kit (MCUSLK) Using the MC9S12C32 MCU Application Module (CSM-12C32) By Eduardo

More information

Model Based Development Toolbox MagniV for S12ZVC Family of Processors

Model Based Development Toolbox MagniV for S12ZVC Family of Processors Freescale Semiconductor Release Notes Document Number: MBDTB-ZVC-RN Model Based Development Toolbox MagniV for S12ZVC Family of Processors Version 1.0.0 Freescale Semiconductor, Inc. 1. Revision History

More information

CodeWarrior Development Tools mwclearcase Plug-in User s Guide

CodeWarrior Development Tools mwclearcase Plug-in User s Guide CodeWarrior Development Tools mwclearcase Plug-in User s Guide Revised: 29 January 2008 Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. CodeWarrior is a trademark or registered

More information

Getting Started with the Student Learning Kit Application Module Using the MC9S12DT256 Microcontroller Application Module

Getting Started with the Student Learning Kit Application Module Using the MC9S12DT256 Microcontroller Application Module Freescale Semiconductor APS12DT256PG Quick Reference Guide Rev. 0, 9/2007 Getting Started with the Student Learning Kit Application Module Using the MC9S12DT256 Microcontroller Application Module For use

More information

ToolStick-EK TOOLSTICK USER S GUIDE. 1. Kit Contents. 2. ToolStick Overview. Green and Red LEDs. C8051F321 provides USB debug interface.

ToolStick-EK TOOLSTICK USER S GUIDE. 1. Kit Contents. 2. ToolStick Overview. Green and Red LEDs. C8051F321 provides USB debug interface. TOOLSTICK USER S GUIDE 1. Kit Contents The ToolStick kit contains the following items: ToolStick Silicon Laboratories Evaluation Kit IDE and Product Information CD-ROM. CD content includes: Silicon Laboratories

More information

Component Development Environment Installation Guide

Component Development Environment Installation Guide Freescale Semiconductor Document Number: PEXCDEINSTALLUG Rev. 1, 03/2012 Component Development Environment Installation Guide 1. Introduction The Component Development Environment (CDE) is available as

More information

CodeWarrior Kernel-Aware Debug API

CodeWarrior Kernel-Aware Debug API CodeWarrior Kernel-Aware Debug API Revised: 17 October 2006 Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. CodeWarrior is a trademark or registered trademark of Freescale

More information

MC33794 Touch Panel System Using E-Field Sensor Setup Instructions

MC33794 Touch Panel System Using E-Field Sensor Setup Instructions Freescale Semiconductor MC33794SIUG User s Guide Rev. 1.0, 09/2005 MC33794 Touch Panel System Using E-Field Sensor Setup Instructions Reference Design Documentation for RDMC33794 This document contains

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK C8051F560 DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

USB Bootloader GUI User s Guide

USB Bootloader GUI User s Guide Freescale Semiconductor User s Guide Document Number: MC9S08JS16UG Rev. 0, 10/2008 USB Bootloader GUI User s Guide by: Derek Liu Applications Engineering China 1 Overview The MC9S08JS16 (JS16) supports

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK C8051F330 DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

Processor Expert Software Microcontroller Driver Suite. Device Initialization User Guide

Processor Expert Software Microcontroller Driver Suite. Device Initialization User Guide Processor Expert Software Microcontroller Driver Suite Device Initialization User Guide Revised: 1 November 2012 Freescale, the Freescale logo, CodeWarrior, ColdFire, Kinetis and Processor Expert are trademarks

More information

indart -HCS08 In-Circuit Debugger/Programmer for Freescale HCS08 Family FLASH Devices User s Manual Rev. 2.0

indart -HCS08 In-Circuit Debugger/Programmer for Freescale HCS08 Family FLASH Devices User s Manual Rev. 2.0 indart -HCS08 In-Circuit Debugger/Programmer for Freescale HCS08 Family FLASH Devices User s Manual Rev. 2.0 Copyright 2006 SofTec Microsystems DC01028 We want your feedback! SofTec Microsystems is always

More information

NOVPEK NetLeap User Guide

NOVPEK NetLeap User Guide NOVPEK NetLeap User Guide Document Number: 001-124-04 Rev. 1.0 1/2017 Property of NovTech, Inc. 2016. All Rights Reserved Contact Information: Home Page: Company: www.novtech.com Modules: www.novsom.com/#/products1/

More information

Programming and Evaluation Tool for Serial EEPROMs

Programming and Evaluation Tool for Serial EEPROMs EasyPro 3.2 Evaluation Board User's Manual EVAL BOARD USER S MANUAL Programming and Evaluation Tool for Serial EEPROMs What is EasyPRO? EasyPRO is an easy-to-use, software-driven device programmer that

More information

2005: 0.5 PQ-MDS-PCIEXP

2005: 0.5 PQ-MDS-PCIEXP HW Getting Started Guide PQ-MDS-PCIEXP Adaptor December 2005: Rev 0.5 PQ-MDS-PCIEXP Adaptor HW Getting Started Guide Step 1:Check HW kit contents 1.PQ-MDS-PCIEXP Adaptor 2.PIB (Platform I/O Board) to PCIEXP

More information

PQ-MDS-QOC3 Module. HW Getting Started Guide. Contents. About This Document. Required Reading. Definitions, Acronyms, and Abbreviations

PQ-MDS-QOC3 Module. HW Getting Started Guide. Contents. About This Document. Required Reading. Definitions, Acronyms, and Abbreviations HW Getting Started Guide PQ-MDS-QOC3 Module July 2006: Rev. A Contents Contents........................................................................................ 1 About This Document..............................................................................

More information

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter C8051F38X DEVELOPMENT KIT USER S GUIDE 1. Kit Contents The C8051F38x Development Kit contains the following items: C8051F380 Target Board C8051Fxxx Development Kit Quick-start Guide Silicon Laboratories

More information

M68HC705E24PGMR PROGRAMMER USER'S MANUAL

M68HC705E24PGMR PROGRAMMER USER'S MANUAL M68HC705E24PGMR/D Rev. 2 March 1995 M68HC705E24PGMR PROGRAMMER USER'S MANUAL Third Edition MOTOROLA Ltd., 1993, 1995; All Rights Reserved Motorola reserves the right to make changes without further notice

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK UNIVERSITY DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

Sensorless BLDC Motor Control Based on MC9S08PT60 Tower Board User Guide

Sensorless BLDC Motor Control Based on MC9S08PT60 Tower Board User Guide Freescale Semiconductor Document Number:S08PT60UG User Guide Rev. 0, 02/2013 Sensorless BLDC Motor Control Based on MC9S08PT60 Tower Board User Guide 1 Overview This user guide describes the basic steps

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK LIN DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent damage

More information

Integrating FreeMASTER-Time Debugging Tool with CodeWarrior for Microcontrollers v10.x Project

Integrating FreeMASTER-Time Debugging Tool with CodeWarrior for Microcontrollers v10.x Project Freescale Semiconductor Application Document Number: AN4771 Integrating FreeMASTER-Time Debugging Tool with CodeWarrior for Microcontrollers v10.x Project 1. Introduction This application note describes

More information

EVB9S08DZ60. Demonstration Board for Freescale MC9S08DZ60. User s Manual

EVB9S08DZ60. Demonstration Board for Freescale MC9S08DZ60. User s Manual EVB9S08DZ60 Demonstration Board for Freescale MC9S08DZ60 User s Manual EVB9S08DZ60 Evaluation Board for Freescale MC9S08DZ60 (64-Pin LQFP) User s Manual Revision 1.0 Copyright 2006 SofTec Microsystems

More information

Apollo2 EVB Quick Start Guide

Apollo2 EVB Quick Start Guide Apollo2 EVB Quick Start Guide Doc ID: QS-A2-1p00 Revision 1.0 June 2017 QS-A2-1p00 Page 1 of 11 2017 Ambiq Micro, Inc. Table of Content 1. Introduction...3 2. Documentation Revision History...3 3. Overview

More information

MSC8144AMC-S Getting Started Guide

MSC8144AMC-S Getting Started Guide Freescale Semiconductor Hardware Getting Started Guide Document Number: MSC8144AMCSHWGSG Rev. 2, 07/2008 MSC8144AMC-S Getting Started Guide This document describes how to connect the MSC8144AMC-S card

More information

MPC8349EA MDS Processor Board

MPC8349EA MDS Processor Board HW Getting Started Guide MPC8349EA MDS Processor Board Nov 2006: Rev. A Contents Contents.................................................................................. 1 About This Document.......................................................................

More information

MC9S12VR Family Demonstration Lab Training Carlos Aceff Automotive & Industrial Solutions Group, Mexico

MC9S12VR Family Demonstration Lab Training Carlos Aceff Automotive & Industrial Solutions Group, Mexico Freescale Semiconductor Application Note Document Number: AN4448 Rev. 0, 01/2012 MC9S12VR Family Demonstration Lab Training by: Carlos Aceff Automotive & Industrial Solutions Group, Mexico 1 Introduction

More information

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM FRDM-KL02Z User Manual Rev. 0 Freescale Semiconductor Inc. FRDMKL02ZUM 1. Overview The Freescale Freedom development platform is an evaluation and development tool ideal for rapid prototyping of microcontroller-based

More information

MC56F825x/MC56F824x (2M53V) Chip Errata

MC56F825x/MC56F824x (2M53V) Chip Errata Freescale Semiconductor MC56F825XE_2M53V Chip Errata Rev. 1, 05/2012 MC56F825x/MC56F824x (2M53V) Chip Errata The following errata items apply to devices of the maskset 2M53V. 2012 Freescale Semiconductor,

More information

EB180. Motorola Semiconductor Engineering Bulletin. Differences between the MC68HC705B16 and the MC68HC705B16N. Freescale Semiconductor, I

EB180. Motorola Semiconductor Engineering Bulletin. Differences between the MC68HC705B16 and the MC68HC705B16N. Freescale Semiconductor, I nc. Order this document by /D Motorola Semiconductor Differences between the MC68HC705B16 and the MC68HC705B16N By Joanne Field CSIC Applications Motorola Ltd. East Kilbride, Scotland Introduction Motorola

More information

MPR083 Proximity Evaluation Kit User s Guide

MPR083 Proximity Evaluation Kit User s Guide Freescale Semiconductor User s Guide Rev 2, 04/2008 MPR083 Proximity Evaluation Kit User s Guide by: Laura Salhuana Introduction This guide will aid you in connecting the MPR083 Evaluation Kit Board to

More information

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide Freescale Semiconductor, Inc. KSDKKL03UG User s Guide Rev. 1.0.0, 09/2014 Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide 1 Introduction This document describes the hardware and software

More information

Interfacing HCS12 Microcontrollers to the MFR4200 FlexRay Controller

Interfacing HCS12 Microcontrollers to the MFR4200 FlexRay Controller Freescale Semiconductor Application Note AN3216 Rev. 0, 2/2006 Interfacing HCS12 Microcontrollers to the MFR4200 FlexRay Controller by: David Paterson MCD Applications, East Kilbride 1 Introduction Freescale

More information

M68HC705E6PGMR PROGRAMMER USER'S MANUAL

M68HC705E6PGMR PROGRAMMER USER'S MANUAL M68HC705E6PGMR/D2 nc. Oct 1993 M68HC705E6PGMR PROGRAMMER USER'S MANUAL Motorola reserves the right to make changes without further notice to any products herein to improve reliability, function or design.

More information

Symphony SoundBite: Quick Start with Symphony Studio. Installation and Configuration

Symphony SoundBite: Quick Start with Symphony Studio. Installation and Configuration Symphony SoundBite: Quick Start with Symphony Studio Installation and Configuration Document Number: DSPB56371UGQS Rev. 2 September 2008 How to Reach Us: Home Page: www.freescale.com E-mail: support@freescale.com

More information

TWR-KV10Z32 Sample Code Guide for CodeWarrior Board configuration, software, and development tools

TWR-KV10Z32 Sample Code Guide for CodeWarrior Board configuration, software, and development tools Freescale Semiconductor User s Guide Doc Number: TWRKV10Z32CWUG Rev. 0.1, 01/2014 TWR-KV10Z32 Sample Code Guide for CodeWarrior Board configuration, software, and development tools by Freescale Semiconductor,

More information

etpu General Function Set (Set 1) David Paterson MCD Applications Engineer

etpu General Function Set (Set 1) David Paterson MCD Applications Engineer Freescale Semiconductor Application Note Document Number: AN2863 Rev. 0, 12/2007 etpu General Function Set (Set 1) by David Paterson MCD Applications Engineer 1 Introduction This application note complements

More information

Interrupts in Decoupled Parallel Mode for MPC5675K Configuration and Usage

Interrupts in Decoupled Parallel Mode for MPC5675K Configuration and Usage Freescale Semiconductor Document Number: AN4495 Application Note Rev. 0, 3/2012 Interrupts in Decoupled Parallel Mode for MPC5675K Configuration and Usage by: Tomas Kulig Automotive and Industrial Solutions

More information

56F8300 BLDC Motor Control Application

56F8300 BLDC Motor Control Application 56F8300 BLDC Motor Control Application with Quadrature Encoder using Processor Expert TM Targeting Document 56F8300 16-bit Digital Signal Controllers 8300BLDCQETD Rev. 2 08/2005 freescale.com Document

More information

Differences Between the DSP56301, DSP56311, and DSP56321

Differences Between the DSP56301, DSP56311, and DSP56321 Freescale Semiconductor Engineering Bulletin Document Number: EB724 Rev. 0, 11/2009 Differences Between the DSP56301, DSP56311, and DSP56321 This engineering bulletin discusses the differences between

More information

NovTech User Guide Chameleon96

NovTech User Guide Chameleon96 NovTech User Guide Chameleon96 Document Name: User Guide Document Number: 001-127-04-05-01 Rev. 1.1 10/2017 Property of NovTech, Inc. 2017. All Rights Reserved Contact Information: Home Page: Company:

More information

Comparison of MC9S08QE128 and MCF51QE128 Microcontrollers Scott Pape and Eduardo Montanez Systems Engineering, Freescale Microcontroller Division

Comparison of MC9S08QE128 and MCF51QE128 Microcontrollers Scott Pape and Eduardo Montanez Systems Engineering, Freescale Microcontroller Division White Paper Document Number: QE128COMPWP Rev. 0, 05/2007 Comparison of MC9S08QE128 and MCF51QE128 Microcontrollers by: Scott Pape and Eduardo Montanez Systems Engineering, Freescale Microcontroller Division

More information

Using the Multi-Axis g-select Evaluation Boards

Using the Multi-Axis g-select Evaluation Boards Freescale Semiconductor Application Note Rev 2, 10/2006 Using the Multi-Axis g-select Evaluation Boards by: Michelle Clifford and John Young Applications Engineers Tempe, AZ INTRODUCTION This application

More information

MC9S08DZ60 Migrating from the 3M05C to M74K Mask Set D. Scott Brown Applications Engineering Microcontrollers Solutions Group Austin, TX, USA

MC9S08DZ60 Migrating from the 3M05C to M74K Mask Set D. Scott Brown Applications Engineering Microcontrollers Solutions Group Austin, TX, USA Freescale Semiconductor Application Note Document Number: AN3776 Rev. 0, 09/2008 MC9S08DZ60 Migrating from the 3M05C to M74K Mask Set by: D. Scott Brown Applications Engineering Microcontrollers Solutions

More information

KIT33972AEWEVBE Evaluation Board

KIT33972AEWEVBE Evaluation Board Freescale Semiconductor, Inc. User s Guide Document Number: KT33972UG Rev. 1.0, 7/2013 KIT33972AEWEVBE Evaluation Board Featuring the MC33972A Multiple Switch Detection Interface IC Contents Figure 1.

More information

Introduction to the 16-bit Tower Boards Using the MC9S12GN32

Introduction to the 16-bit Tower Boards Using the MC9S12GN32 Freescale Semiconductor Document Number: AN4320 Application Note Rev. 0, 6/2011 Introduction to the 16-bit Tower Boards Using the MC9S12GN32 by: Luis Olea Mexico 1 Introduction This application note is

More information

Power Cycling Algorithm using the MMA73x0L 3-Axis Linear Accelerometer

Power Cycling Algorithm using the MMA73x0L 3-Axis Linear Accelerometer Freescale Semiconductor Application Note Rev 1, 06/2007 Power Cycling Algorithm using the MMA73x0L 3-Axis Linear Accelerometer by: Kimberly Tuck Accelerometer Systems and Applications Engineering Tempe,

More information

MTIM Driver for the MC9S08GW64

MTIM Driver for the MC9S08GW64 Freescale Semiconductor Application Note Document Number: AN4160 Rev. 0, 8/2010 MTIM Driver for the MC9S08GW64 by: Tanya Malik Reference Design and Applications Group India IDC MSG NOIDA 1 Introduction

More information

Integrating the MC9S08JS16/8 USB Bootloader to Your Application

Integrating the MC9S08JS16/8 USB Bootloader to Your Application Freescale Semiconductor Application Note Document Number: AN3958 Rev. 0, 10/2009 Integrating the MC9S08JS16/8 USB Bootloader to Your Application by: Derek Liu Application Engineer Freescale provides the

More information

1 Introduction. 2 Problem statement. Freescale Semiconductor Engineering Bulletin. Document Number: EB727 Rev. 0, 01/2010

1 Introduction. 2 Problem statement. Freescale Semiconductor Engineering Bulletin. Document Number: EB727 Rev. 0, 01/2010 Freescale Semiconductor Engineering Bulletin Document Number: EB727 Rev. 0, 01/2010 Enabling and Disabling ECC on MC9S08DE60/MC9S08DE32 Microcontrollers by: Philip Drake, 8-Bit Systems and Applications

More information

MC9S08DZ60 Flash Usage Considerations Andy McKechan Applications Engineer East Kilbride

MC9S08DZ60 Flash Usage Considerations Andy McKechan Applications Engineer East Kilbride Freescale Semiconductor Engineering Bulletin Document Number: EB695 Rev. 0, 07/2008 MC9S08DZ60 Flash Usage Considerations by: Andy McKechan Applications Engineer East Kilbride 1 Introduction Freescale

More information

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter C8051F2XX DEVELOPMENT KIT USER S GUIDE 1. Kit Contents The C8051F2xx Development Kits contain the following items: C8051F206 or C8051F226 Target Board C8051Fxxx Development Kit Quick-Start Guide Silicon

More information

AC/DC. Adapter. Ribbon. Cable Serial. Serial. Adapter. Figure 1. Hardware Setup using an EC2 Serial Adapter

AC/DC. Adapter. Ribbon. Cable Serial. Serial. Adapter. Figure 1. Hardware Setup using an EC2 Serial Adapter C8051F32X DEVELOPMENT KIT USER S GUIDE 1. Kit Contents The C8051F32x Development Kit contains the following items: C8051F320 Target Board C8051Fxxx Development Kit Quick-Start Guide C8051F32x Development

More information

Mask Set Errata. Introduction. MCU Device Mask Set Identification. MCU Device Date Codes. MCU Device Part Number Prefixes MSE08AZ32_0J66D 12/2002

Mask Set Errata. Introduction. MCU Device Mask Set Identification. MCU Device Date Codes. MCU Device Part Number Prefixes MSE08AZ32_0J66D 12/2002 Mask Set Errata MSE08AZ32_0J66D 12/2002 Mask Set Errata for MC68HC08AZ32, Mask 0J66D Introduction This mask set errata applies to this MC68HC08AZ32 MCU mask set: 0J66D MCU Device Mask Set Identification

More information

However, if an event comes in when the new value is being written to the pulse accumulator counter, that event could be missed. One solution to this p

However, if an event comes in when the new value is being written to the pulse accumulator counter, that event could be missed. One solution to this p Engineering Bulletin 7/2003 HC11 and HC12 Families Pulse Accumulator By Darci Ernst Systems Engineering Austin, TX Introduction and Background Detailed Description The timer module is one of the peripherals

More information

Using the Kinetis Family Enhanced EEPROM Functionality

Using the Kinetis Family Enhanced EEPROM Functionality Freescale Semiconductor Application Note Document Number: AN4282 Rev. 1, 03/2015 Using the Kinetis Family Enhanced EEPROM Functionality by: Melissa Hunter Derrick Klotz 1 Introduction Some of the Kinetis

More information

Getting Started with the MCU Flashloader

Getting Started with the MCU Flashloader NXP Semiconductors Document Number: MBOOTFLASHGS User's Guide Rev 3, 05/2018 Getting Started with the MCU Flashloader Contents Contents Chapter 1 Introduction...3 Chapter 2 Overview...4 2.1 MCU flashloader...4

More information

Converting Earlier Versions of CodeWarrior for StarCore DSPs Projects to Version

Converting Earlier Versions of CodeWarrior for StarCore DSPs Projects to Version Freescale Semiconductor Document Number: AN4253 Application Note Rev. 1, 01/2011 Converting Earlier Versions of CodeWarrior for StarCore DSPs Projects to Version 10.1.8 by DevTech Customer Engineering

More information

Shooter Make Ready. SIRT OneShot Installation INNOVATIVE DRY FIRE

Shooter Make Ready. SIRT OneShot Installation INNOVATIVE DRY FIRE Shooter Make Ready SIRT OneShot Installation INNOVATIVE DRY FIRE TRAINING SIRT Laser Training Pistol A laser-based firearm simulator is the ideal tool for safe dry fire practice anywhere you want to train.

More information

Using the Project Board LCD Display at 3.3 volts

Using the Project Board LCD Display at 3.3 volts Freescale Semiconductor SLK0100AN Application Note Rev. 0, 1/2007 By: John McLellan Applications Engineering Austin, TX 1 Introduction This document guides you through the steps necessary to use the LCD

More information

EB366. In-Circuit Programming of FLASH Memory Using the Monitor Mode for the MC68HC908GP32. Introduction

EB366. In-Circuit Programming of FLASH Memory Using the Monitor Mode for the MC68HC908GP32. Introduction Order this document by /D REV 1 Semiconductor Products Sector Engineering Bulletin In-Circuit Programming of FLASH Memory Using the Monitor Mode for the MC68HC908GP32 By Timothy J. Airaudi Applications

More information

IIC Driver for the MC9S08GW64

IIC Driver for the MC9S08GW64 Freescale Semiconductor Application Note Document Number: AN4158 Rev. 0, 8/2010 IIC Driver for the MC9S08GW64 by: Tanya Malik Reference Design and Applications Group Noida India 1 Introduction This document

More information

SDR API Linux Installation

SDR API Linux Installation Mirics Limited. Applications Revision History Revision Release Date: Reason for Change: Originator 1.0 15 th May 2014 Pre-Release 0.0.1 APC 1.1 3 rd August 2014 Update for 1.1 build APC 1.2 28 th May 2015

More information

ColdFire Convert 1.0 Users Manual by: Ernest Holloway

ColdFire Convert 1.0 Users Manual by: Ernest Holloway Freescale Semiconductor CFCONVERTUG Users Guide Rev.0, 09/2006 ColdFire Convert 1.0 Users Manual by: Ernest Holloway The ColdFire Convert 1.0 (CF) is a free engineering tool developed to generate data

More information

KIT34901EFEVB Evaluation Board

KIT34901EFEVB Evaluation Board Freescale Semiconductor, Inc. User s Guide Document Number: KT34901UG Rev. 1.0, 2/2014 KIT34901EFEVB Evaluation Board Featuring the MC34901 High Speed CAN Transceiver Contents Figure 1. KIT34901EFEVB Evaluation

More information

USB Bootloader for the MC9S08JM60

USB Bootloader for the MC9S08JM60 Freescale Semiconductor Application Note Document Number: AN3561 Rev. 0, 11/2007 USB Bootloader for the MC9S08JM60 by: Patrick Yang Asia & Pacific Operation Microcontroller Division 1 Introduction This

More information

56F805. BLDC Motor Control Application with Quadrature Encoder using Processor Expert TM Targeting Document. 56F bit Digital Signal Controllers

56F805. BLDC Motor Control Application with Quadrature Encoder using Processor Expert TM Targeting Document. 56F bit Digital Signal Controllers 56F805 BLDC Motor Control Application with Quadrature Encoder using Processor Expert TM Targeting Document 56F800 6-bit Digital Signal Controllers 805BLDCQETD Rev. 08/2005 freescale.com BLDC Motor Control

More information

Freescale Semiconductor, I

Freescale Semiconductor, I M68HC705X4PGMR/D1 August 1991 M68HC705X4 PROGRAMMER BOARD (REVision A PWBs only) INTRODUCTION This application note describes the programming technique used to program and verify the XC68HC705X4 microcontroller

More information

AND8386/D. Bootloading BelaSigna 250 Using the I 2 C Interface APPLICATION NOTE

AND8386/D. Bootloading BelaSigna 250 Using the I 2 C Interface APPLICATION NOTE Bootloading BelaSigna 250 Using the I 2 C Interface APPLICATION NOTE INTRODUCTION This application note describes how to bootload BelaSigna 250 through its I 2 C interface when it does not have an EEPROM

More information

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick TOOLSTICK C8051F931 DAUGHTER CARD USER S GUIDE 1. Handling Recommendations To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective plastics. To prevent

More information

MPC8360E MDS Processor Board

MPC8360E MDS Processor Board HW Getting Started Guide MPC8360E MDS Processor Board August 2006: Rev. A Step 1: Check HW kit contents MPC8360E MDS Processor Board HW Getting Started Guide 1. MPC8360E MDS processor board 2. AC/DC 5V/5A

More information

Using the Asynchronous DMA features of the Kinetis L Series

Using the Asynchronous DMA features of the Kinetis L Series Freescale Semiconductor Document Number:AN4631 Application Note Rev. 0, 12/2012 Using the Asynchronous DMA features of the Kinetis L Series by: Chris Brown 1 Introduction The power consumption of devices

More information

Using the ColdFire+ Family Enhanced EEPROM Functionality Melissa Hunter Derrick Klotz

Using the ColdFire+ Family Enhanced EEPROM Functionality Melissa Hunter Derrick Klotz Freescale Semiconductor Application Note Document Number: AN4306 Rev. 0, 05/2011 Using the ColdFire+ Family Enhanced EEPROM Functionality by: Melissa Hunter Derrick Klotz 1 Introduction The ColdFire+ family

More information

TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools

TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools Freescale Semiconductor User s Guide Doc Number: TWRKV10Z32IARUG Rev. 0.1, 01/2014 TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools by Freescale Semiconductor,

More information

16-bit MCU: S12XHY256 Automotive Cluster Demo by: Jose M. Cisneros Steven McLaughlin Applications Engineer Microcontroller Solutions Group, Scotland

16-bit MCU: S12XHY256 Automotive Cluster Demo by: Jose M. Cisneros Steven McLaughlin Applications Engineer Microcontroller Solutions Group, Scotland Freescale Semiconductor Users Guide Document Number: S12XHY256ACDUG Rev. 0, 10/2010 16-bit MCU: S12XHY256 Automotive Cluster Demo by: Jose M. Cisneros Steven McLaughlin Applications Engineer Microcontroller

More information

MCF5445x Configuration and Boot Options Michael Norman Microcontroller Division

MCF5445x Configuration and Boot Options Michael Norman Microcontroller Division Freescale Semiconductor Application Note Document Number: AN3515 Rev. 1, 04/2008 MCF5445x Configuration and Boot Options by: Michael Norman Microcontroller Division 1 Configuration Modes The Freescale

More information

Kinetis Bootloader to Update Multiple Devices in a Field Bus Network

Kinetis Bootloader to Update Multiple Devices in a Field Bus Network Freescale Semiconductor, Inc. Document Number: AN5204 Application Note Rev. 0, 01/2016 Kinetis Bootloader to Update Multiple Devices in a Field Bus Network 1. Introduction This application note describes

More information

Purchase Agreement. P&E Microcomputer Systems, Inc. 98 Galen St. Watertown, MA

Purchase Agreement. P&E Microcomputer Systems, Inc. 98 Galen St. Watertown, MA Purchase Agreement P&E Microcomputer Systems, Inc. reserves the right to make changes without further notice to any products herein to improve reliability, function, or design. P&E Microcomputer Systems,

More information

PQ-MDS-PIB. HW Getting Started Guide 12,13. January 2006: Rev Check kit contents

PQ-MDS-PIB. HW Getting Started Guide 12,13. January 2006: Rev Check kit contents HW Getting Started Guide PQ-MDS-PIB January 2006: Rev. 0.4 Step 1: Check kit contents 1. PQ- MDS- PIB (Platform I/O Board, or PIB ) 2. Power cable extension with on-off switch 3. 25 Pin IEEE 1284 Parallel

More information

MMA845xQ Sensor Toolbox User s Guide

MMA845xQ Sensor Toolbox User s Guide Freescale Semiconductor Document Number: MMA845xQSTUG User s Guide Rev. 1, 02/2012 MMA845xQ Sensor Toolbox User s Guide 1 Introduction The Freescale MMA845xQ sensor toolbox accelerometer kit provides hardware

More information