Part Number Hot Search : 
74HC1650 TN4A60S FX20ASH2 HSMS8202 AT91S SD2942 SI5857 M12GZ47
Product Description
Full Text Search
 

To Download AN2142 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  september 2013 d o c id11322 rev 2 1/16 16 AN2142 application note st10f27x firmware development getting started with tasking st10 toolchain introduction this document provides an introduction to the tasking toolchain (version v8.5 r1) for the st10f27x product family. it describes the software environment required to develop an st10f27x application and summarizes the different steps needed to configure the tasking development toolset, to build and to debug an application on the target hardware. two software examples are supplied with this application note. the first one is a small application demonstrating an input / output toggling function. the required steps to create the project, build and debug it will be described. the se cond one illustrates anot her example using interrupts. both examples are loaded and executed from an external ram using tasking ram monitor. the application source files are provided within an archived file. this file must be unpacked into a directory before use. http:/www.st.com
AN2142 2/16 contents 1 tasking st10 toolchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 starting tasking development environment (ede) . . . . . . . . . . . . . . . . . . . . . 3 1.2 creating a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 adding files to the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.1 adding existing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.2 adding new files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 setting build options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5 building the application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.6 using the ram monitor to debug the application with cross view debugger 12 2 application example: interrupt handling . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
AN2142 tasking st10 toolchain 3/16 1 tasking st10 toolchain the tasking embedded development environment ede can be divided into three main parts:
tasking st10 toolchain AN2142 4/16 tasking starts and the following window appears: the files window is used to edit source files. the project window contains several tabs for viewing information about projects and other files. finally, the output window contains several tabs to display results of ede oper ations such as compiles and builds. for further information about the window?s contents, refer to the tasking documentation. 1.2 creating a new project when you use ede, you need to setup a project space and add a project to it. a project space stores a set of projects. it allows multiple projects to be displayed at a time and allows the user to organize projects. a project space file has the extension ?*.psp? . a project file has the extension ?*.pjt? . the following steps describe how to create a new project:
AN2142 tasking st10 toolchain 5/16 the following window appears:
tasking st10 toolchain AN2142 6/16
AN2142 tasking st10 toolchain 7/16 1.3.2 adding new files
tasking st10 toolchain AN2142 8/16
AN2142 tasking st10 toolchain 9/16
tasking st10 toolchain AN2142 10/16 the following window appears: there are 5 memory models: tiny, small, medium, large and huge. the small memory model is used by default. the memory model defines the default variable and function location and their default pointer size. the right selection depends on the application and impacts the compiler efficiency. the memory models with their characteristics are represented in the following table: for more details about memory models and choice criteria, please refer to tasking documentation. data size code size far/huge/shuge data allowed near data allowed tiny <64k <64k no not applicable small <64k >64k yes not applicable medium >64k <64k yes yes large >64k >64k yes yes huge >64k >64k yes yes
AN2142 tasking st10 toolchain 11/16
tasking st10 toolchain AN2142 12/16 1.6 using the ram monitor to debug the application with cross view debugger cross view debugger provides a high level interface between the user and a program running in the target system (execution environment). cross view debugger runs on a pc computer and is connected to the st10f27x target microcontroller via an rs232 interface. the connection to the target and the debug of the application require that you have successfully compiled and built your application. the monitor requires an external ram memory to run. this ram memory must be selected at reset.
AN2142 tasking st10 toolchain 13/16
application example: interrupt handling AN2142 14/16 2 application example: interrupt handling this section describes a simple st10f27x software example making use of the interrupts. the application uses timers? overfl ow interrupts to generate two square signals with different frequencies on two standard port pins: p2.0 & p2.1. the project contains 3 source files: timer.c: it contains c source code for the following project routines ? configure_gpt1_timer_2() : in this routine, gpt1 timer 2 is set up to operate in timer mode and is configured to generate an interrupt every 1.678 seconds. ? configure_gpt1_timer_3() : in this routine, gpt1 timer 3 is set up to operate in timer mode and is config ured to generate an interr upt every 104.8 milliseconds. ? timer 2 and timer 3 interrupts? definitions: timer 2 interrupt is toggling p2.0 while time r 3 interrupt is toggling p2.1. timer.h: it contains timer.c routines prototypes. main.c: it uses the routines described in timer.c in order to start the two timer overflow interr upts. timings suppose that the chip is operating at a frequency of 40 mhz. both hardware and software environments have been setup as described in the first chapter. the figure below shows the behaviour of the port 2 pins 0 and 1 and the gpt1 timer 2 & timer 3 overflow interrupts. the example source code is located in the ?..\example2? directory. for more details about the timers? functionalities, their registers and interrupts? handling, refer to the st10f27x user?s manual. p in p2.1 output (gpt1 t imer 3 o verflow i nterrupt ) p in p2.0 output (gpt1 t imer 2 o verflow i nterrupt )
AN2142 revision history 15/16 3 revision history table 1. document revision history date revision changes 30-jun-2006 1 initial release. 24 -s e p -2013 2 u p d a t e d d isclaimer.
revision history AN2142 16/16 docid11322 rev 2 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. if any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a parti cular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. st products are not designed or authorized for use in: (a) safety critical applications such as life supporting, active implanted devices or systems wi th product functional safety requirements; (b) aeronautic applications; (c) automotive applications or environments, and/or (d) aerospace applications or environments. where st products are not designed for such use, the purchaser shall use products at purchaser?s sole risk, even if st has been informed in writing of such usage, unless a product is expressly designated by st as being intended for ?automotive, automotive safety or medical? industry domains according to st product design specifications. products formally escc, qml or jan qualified are deemed suitable for use in aerospace by the corresponding governmental agency. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or registered trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2013 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - philippines - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of AN2142

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X