Home
        Getting started with XC164CS starterkit using DAvE
         Contents
1.                        File Find    Search    Browse A Difference    Shell    Symbols                   o  E Q   ins    Line 311  Cok 42       Application Note 27 V1 0  2006 06    um AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use Tasking    9  Configure Linker Locator    e Under Linker Locator   gt  Interrupt Vector Table  enter Vector table base address as  0xC00000           F  TASKING EDE   C166 5T10   C  UserData XC164  Toggle  Toggle_I0 pjt      C  UserData Xc164  Toagle  1 Main C     81 x   k File Edit Search Project Build Text Document Customize Tools Window Help      xl     9    seaS6seealncl TMA     SB                  x   3 C166 ST10 Project Options  TOGGLE IO PJT   C      Toggle xC164CS  psp 1                                                                              E  XC164C5  1 Project  F Application r Interrupt Vector T able      Toggle  10  5 Files      C   Compiler  v Generate vector table  rd Tae  1  C Compiler  C c ify   o  cooood  H4 Source Files Ei Abs Vector table base address  Default    Specify    x    EB isa B 4  Macro Preprocessor Last Interrupt Number  127   0 Toggle I0      Linker Locator Interrupt vectors                                                                  D EAE    Output Format   43 Header Files     Map File Label or task name int    Tolnttt       DP  Teggle I0 H Smart Linking          Toggle Main H    Memory  ig Project Files Classes wj  L R Interrupt Vector Table  i 2 Sh a Stack and Heap   Initiali
2.        Application Note 31 V1 0  2006 06    Jum AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use CrossView Pro    1  Set Breakpoint    e Click on the green LED beside the function IO vTogglePin P9 P4  in Toggle Main C which is the  code we have inserted  The green LED will turn RED           CrossView Pro C166 ST10   toggle io abs  File Target Edit Run Breakpoints Data Tools Settings View Window Help    BL EL oo ed 1d m  gt  p gt  IG  62 GE 3 SES vo E       Source   toggle_main c  we Beso 9   E  3 Vw Q0 Qt P w      308     OxcO02b2    main      Source lines v  Souce line step 7     FR     4 USER CODE BEGIN  Main l      USER CODE END  void main void        USER CODE BEGIN  Main 2   void delay void       USER CODE END    0 main      toggle_main c 302     ini x   set Reset  rst  e 2     X y Fi    set Rerun  R   set BrkOnExit   amp  EXIT bi  address  0  1  set Return  bU  C  0x0 0x00 0x00  act Rein rate 0x2 0x00 0x00  set DelAllBrk  D   break delete 0 0x4 0x00 0x00  break  toggle main  c  308 0x6 0x00 0x00 DPP3  0003 Foo   0x8 0x00 0x00 STKOV 1 ie STKUN FCOO  mL  0000     su  E ERERERDE  ILVL 00    0x00 0x00  Oxc 0x00 0x00    break  toggle main c   308          Application Note 32 V1 0  2006 06    Jum AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use CrossView Pro    2  View Core Peripheral Registers    e At the top menu  click View   gt  Register  User will be able to select from a list of available registers  for monito
3.        Application r Execution Environment  C   Compiler   Use simulator  C Compiler    Assembler Board manufacturer    Macro Preprocessor     Linker Locator   Infineon z    Cross  iew Pro      Execution Environment Board configuration   Register Initialization  Configuration Settings   RAM ROM Monitor Communicat   OCDS Communication Setup Target configuration file     Initialization e  RTOS Aware Debugging Module   Logging  Miscellaneous Register Initialization  Configuration Settings                                                    T A  E                         Infineon XC164CS with OCDS  Single Chip                          Options string     G      tefg  c  userdata xc164 toggle_toggle_io cfg     single instance   load application download true  load application verify true     enable flash true  load application use map file true    gt    load application signal true   load_application_program_reset true      Cancel   Default                          Fle Find    Search    Browse A Difference    Shell    Symbols                   ot E I   fins    Line  311   Cok 42       Application Note 29 V1 0  2006 06    um m AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use Tasking    11  Generate Application Program       e Atthe top menu  click Build   gt  Rebuild or          F  TASKING EDE   C166 ST10   C  UserData  XC164 Toggle  Toggle_I0 pjt      C  UserData XC164 Toggle Toggle_Main c  EF    8  xj  A File Edit Search Project Build Text Document Cus
4.     m eu      PLL Operation Control  PLLCTRL                               r Input Frequency  C Bypass PLL clock multiplier  the VCO is off fose  MHz   5 000        C Bypass PLL clock multiplier  the VCO is running PLL VCO Band Control  PLLVB     VCO output frequency 100    150 MHz     C YCD output frequency 150    200 MHz     VCO output frequency 200    250 MHz    PLL Input Divider  PLLIDIV                                               PLL Multiplication Factor  PLLMUL      fin   fose   2    fin  MHz   eon  ce    fvco  MHz    20 000       VEU clock used  input clock switched off       VCO clock used  input clock connected             PLL Output Divider  PLLODIV  Clock Prescaler for System  CPSY S      roi  fyco 3  gt   fpll  MHz   10 000    feu  fpll 1    fcpu  MHz  jooo          XC164CS   C  UserData XC1644T oggle Toggle_I0 dav       4  Startup Configuration    e External Access Control  Select Fetch code from internal ROM       External Access Control Bustype after Reset    ge Fetch code from intemal ROM    ZW z GbitDemultiplezed Bus   REA   high during reset      POL 7   low  POLG   Tow during reset    c Fetch code from extemal ROM Sbit Multiplexed Bus  iaeei     P  L 7   low  POL   high during reset   Write Configuration  WRC  c jEbtDemulipexedBus         c Ein BWA and BEHE operate as HWAL and  FOLZ   high  POLE   low during reset    WHH signals  Parle   low during reset  c 16 bit Multiplexed Bus    Fin BWA and HBHE operate as H R and HBHE  POL 7   high  POLE   high duri
5.     zi xj  C  AToggle XC164CS  psp    a  XC164C5  1 Project    743 Toggle 10  5 Files    ES Source Files              User Defined Processor  CPU Problem Bypasses and                                                    JA start asm   a D Toggle 10 C  1 Flash Setup     FL Om Memory Model    DO DEEPER ETS     Startup   z a Header Files E  C   Compiler    D Toggle 10 H  l  C Compiler     D Toggle Main H    Assembler       a Project Files     Macro Preprocessor   E Fiescuies E  Linker Locator   E E  CrossView Pro                i  Other Files            Build                   1    F  TASKING EDE   C166 5T10   C  UserData XC164 Toggle  Togale _10 pjt     C UserData XCi64  Toggle Toggle       Window Help      9e    Y Ei       18  x    18  x               r Processor Selection      Infineon         xci 64CS Y      User Defined Processor  CPU Problem Bypasses and Checks    Manufacturer     Processor                      Cancel      s   File Find    Search    Browse    Difference    Shell    Symbols       or E  O  Mod Ins    Line  315  Cok 42       Default    p    A          Application Note    25    V1 0  2006 06    AP16093  Getting Started with the XC164 Starterkit    Infineon       How to use Tasking    7  Configure Flash Setup    e Under Application   gt  Flash Setup   gt  On Chip Flash  tick Use on chip flash and select the Processor  derivative for the starterkit   Hint  the processor derivative can be seen on the markings on top of the             microcontroller   F  TASKING E
6.    8  Configure Linker Locator    e Under Linker Locator   gt  Output Format   gt  IEEE695 Output Format Options  enter Start address as   0xC00000                 F TASKING EDE      166 ST10   C  UserData XC164 Toggle  Toggle_I0 pjt      C  UserData XC164  Toagle Toagle Main     8  x   hk File Edit Search Project Build Text Document Customize Tools Window Help   8  x     e   5 8  s58 amp     amp mmo       4 4e 3eo  ismsibetmm mous       C165 ST10 Project Options  TOGGLE IO PJT     4 2  x        C   AToggleXXC164CS  psp  EJ XC164CS  1 Project    24 Toggle 10  5 Files   ne Source Files   D start asm    D Toggle 10 C          Application r IEEE B35 Output Format Options  C   Compiler Start address     Interrupt vector table defined    OxCo000q  C Compiler  Assembler  Macro Preprocessor Interrupt vector Size   Selected by CPUCON1     Linker Locator     Output Format Additional IEEE 695 options   IEEE 695 Output Format lE  Intel Hex Output Format     S Record Output Format  Hites Output Format Opti   Kontron Output Format O  Map File  Smart Linking  Memory  Reserved Memory  Reserved Dedicated Are                                                             B DO  EEE ER cET ae  142g Header Files      520  Toggle I0 H  D Toggle Main H  i  Project Files      Resources   i  Other Files                                                 Classes  Interrupt Vector T able Options string     Stack and Heap  sO0xCO0000  v2  Locate Absolute      acate Order      gt  x     Cancel   Default      
7.  S106 configured to  0000   all    OFF     Standard Internal Start from flash     Starterkit Jumper JP501  OCDS EN  connected to 1 2  onboard wriggler enabled     uL dx  C  dud    To have access to all microcontroller pins  user need to use the extension board  Figure 3   The labeling set  for the extension board comes together with the starterkit package     A detailed description of the usage of this board is beyond the scope of this application note  the reader is  referred to the XC16xBoard User Manual for detailed information     Connect up the starterkit to the DC power supply and one end of the parallel cable to the starterkit and the  other end to the computer parallel port  Power up the starterkit and press the blue  Reset button once        ER   3    BUS EXPANSION    ao     cR  MEE a eae EE LL ae  eus       Memory Configuraton    Port 0 Configuration   102 S    Reset     e  M panning ou    1 CSC    103  Pot B 1 POL t  7 PO  0 Pay PG     PERIPHERALS          Figure 1 XC164CS starterkit    Application Note 6 V1 0  2006 06    um AP16093  In fi neon Getting Started with the XC164 Starterkit       Connect the XC164CS Starterkit          Figure 2 DC Power Supply       vitet    HTTTELEHTEEEHEETHETEEETITE      THEO pert    Se6cbSet Givi y0  Mu EA RE HAE V002 19 9L9X    immi mid                 Figure3   Starterkit with Extension Board    Application Note 7 V1 0  2006 06    Ju  AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use DAVE    2 How to us
8.  Save  e Choose filename as  Toggle IO  and save file in folder of your choice        File View Options Add Ins Windows        oa  Deur AG        XC164CS    History  Jesktop    E My Documents    My unit  go    File name  Toggle IO m   Save    My Network P    ES j perse  Save as type   DAvE project file    dav     Cancel    164C s              XC1864C5    new project        Application Note 17 V1 0  2006 06    Infineon    15  Generate Code    e File   gt  Generate Code or    AP16093    Getting Started with the XC164 Starterkit          8 DAvE     Eile View Options Add Ins Windows      l  a Da  m      9 Generated Files in  C  USERDATA XC164   TOGGLE       Generated Files  m TOGGLE  MAIN H  H  TOGGLE  MAIN C       TOGGLE_IO H     TOGGLE  ID C       TOGGLE  ID ASM    E   OGGLE_IO RTF    e TOGGLE_IO DPT    DAvE s Project Documentation    Toggle lO dav    XC164CS 16F  Tasking  SMALL    How to use DAvE    4 26 2006 2 57 02 PM    Please read this document carefully and note  the red colored hints     If you miss a file in the generated files list  maybe you have forgotten to select the  initialisation function of the related module     Generated Files   TOGGLE MAIN H  TOGGLE MAIN C  TOGGLE 10 H  TOGGLE 10 C  TOGGLE 10 ASM       XC154CS   C  UserDatatxC164T oggle T oggle 10 dav       DAvE will show all the files it has generated  File Viewer opens automatically     16  Close DAvE  e File   gt  Exit  e Click Yes    Application Note 18 V1 0  2006 06    ec  AP16093  In fi neon Getting St
9.  nsns na nnns nnns snnt naa nnn nnns s 9  3 HOw to use TasKiNO Mente RR 19  3 1 Using Tasking to generate code                       sssesesssssssssseseseeee nnne anna nnn nnns 19  4 How to use CrossVIeW Pro 52 isspnsusta sa 31  4 1 Using CrossView Pro for debugging              00000eeee rss nennen nennen nnne nnn nnne nnne nns 31  5 ON  UL  c                                      5 36    Application Note 4 V1 0  2006 06    AP16093    ec   In fi neon Getting Started with the XC164 Starterkit       Introduction    Introduction    This application note introduces the Infineon Technologies XC164CS 16bit microcontroller  It aimed to guide  users to a quick start to the XC164CS starterkit using DAVE and Tasking EDE     All the information contained in this application note is retrieved from the XC164CS official documentation   System Units and Peripheral Units  and the XC16xBoard User Manual  References should always be made  to these documents     In this application note  we will be using the following abbreviation        Tasking    for the Altium Tasking Tools for C166 ST10 v8 5r2  C Compiler  Assembler  amp  Linker     CrossView  for the Altium Tasking CrossView Pro Debugger v8 5r2     EDE  for the Altium Tasking Embedded Development Environment       DAVE    for the Infineon Technologies Digital Application virtual Engineer     Starterkit  for the Infineon Technologies XC164CS Starterkit Board     The application note will start by    1   2     How to easily connect the XC164
10.  rst       SPSEG 0000 E SYSCONS      9FDO    DPOH  0000    POL  0000  set DelAllBrk  D   gt  SYSCONL      0000 2i SYSCONO      0000 Si ET e E  break delete 0              reak delete    EMUCON 0004  gt  CPUCON2 8FBB Ses TNI ETAT ER STA    break  toggle main c  308 x       j  s CPUCONL m mc 0000     POCON3  0000    POCONIH  0000 C STKUN FCOO MDH  0000    ONES  FFFF ZEROS  0000         gt  POCONIL   0000   POCONOH  0000   psu  N EE  PHYSICAL SP 0000FBFC fp  0000002E SRS VA FTCR a003    set Return  bU  C  pc      0CO002AE STKUN  FC00   x  set Main  rst  STKOV  FAOC  0000 pm PION poo  set Del  llBrk  D  IDH  0000  F600    resi delete 0 DPP3  0003  0300  break  toggle main c   308    VV VY VY VV OY          Application Note 33 V1 0  2006 06    oe AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use CrossView Pro    3  Execute Program  e Atthe top menu  click Run   gt  Run          CrossView Pro C166 ST10   toggle_io abs    File Target Edit Run Breakpoints Data Tools Settings View    Window Help    EL BL cg 0  1   m      OLI SE GE 5 SES vo 3B PPS           3 SE 3B S  x   amp  sHeeos cladis a ee    305     OxcO02d8  gt    main v  Souce lines v  Souce line step z      USER CODE END  void main void      USER CODE BEGIN  Main 2   void delay void       USER CODE END   S  MAIN vInit        USER CODE BEGIN  Main 4      inl xl unte ENEMIES          toggle_main c 308        USER CODE END       Register  PORT   Port Control Register       End of function main  gt  P
11.  with the XC164 Starterkit       Conclusion    5 Conclusion    This application note showed users how to quickly started evaluating Infineon Technologies 16bit XC164CS  microcontroller  Users can easily download additional DAvE DIP files to generate code for other 16bit  derivatives for evaluation purpose  The steps described in tasking are generic so users can easily generate  application code by making minimum changes to the project options  Some debugging techniques are also  introduced when using CrossView such as setting of breakpoints and viewing of core peripherals registers  status     Please note that all the code examples given this application note are aimed at demonstration purpose only   Code is neither optimized nor is its reliability guaranteed     If you need more information  please contact your nearest Infineon sale s office  Contact information is  available on Infineon web site  www infineon com     We wish you a lot of success with the XC164CS     Application Note 36 V1 0  2006 06          i    
12. 20  MEE  gt  DP20  0000  0 0010        P9  gt  DP9    002 0010   enone  gt  PLLCON  DE    ODPS  0000  gt  ALTSELlPS  0000   WINE 0505  pU ELTE P ALTSELOPS  D000    PSDIDIS      0000    gt  FINTlADDR  0000    FINTICSP  0000 mrs SFE  Mrs dn      FINTOADDR  0000    FINTOCSP   0000     253 0000   MODEA 0000    gt  BNKSEL3   0000  gt  BNKSEL2    0000 mALTSELIPA  D E ee  0000   s            BNKSELl      0000  gt  BNKSELO      0000 As st  gt  DPS   gt  ODP3  0000  gt  ALTSELIP3      Oj xl      CPUID  0311    SCUSLS TIN A    3 SCUSLC  0000   RSTCON2  4AF5 jal    gt  avrsezors  0000  gt  rin   Ss     SIS DER  gt  DP1H  0000    ALTSELOP1H 0000     PLL  0000  gt  DPLL 0000  X ALTSELOPlL 0000    POH  0000   gt  DPOH  0000    POL  0000     DPOL  0000  gt  POCON20  0000     POCONS  0000    POCONA      0000  F   gt           RSTCON  0000    EXISELl  0000   gt  set DelAllBrk  D     EXISELO  0000    EXICON  0000   gt  break  toggle main c  306   TFR  0000  gt  VECSEG  00C0   gt C    SPSEG  0000    SYSCONS3  9FDO  nain 308  IC    SYSCONl         0000   S3YSCONO       0000     EMUCON  0004    CPUCON2  8FBB     CPUCONL  0007 MDC  0000  ONES  FFFF ZEROS  0000  PHYSICAL SP 000 fp  0000002E     gt  POCON3  0000 2 POCONIH  0000   gt  POCONIL  0000    POCONOH  0000   gt  POCONOL  0000    PTCR  0003     PICON 70000       set Retum  bU  C   set Main  rst S    set Del  llBrk  D  pc oc B2  Fcoo  break  toggle main c  308  FAOC  0000  E  0000  F600     0003  0300   Hat    v       Halted   Stopped at break
13. Application Note  V1 0  June 2006    AP16093    Getting started with XC164 C5  starterkit using DAvE  Tasking  EDE  amp  CrossView Pro  Debugger    Microcontrollers         Cafineon     Never stop thinking    Edition 2006 06 13    Published by  Infineon Technologies AG  81726 M  nchen  Germany       Infineon Technologies AG 2006   All Rights Reserved     LEGAL DISCLAIMER    THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE  IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE  REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY  CONDITION OR  QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT  THE RECIPIENT OF THIS APPLICATION  NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION  INFINEON  TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND   INCLUDING WITHOUT LIMITATION WARRANTIES OF NON INFRINGEMENT OF INTELLECTUAL  PROPERTY RIGHTS OF ANY THIRD PARTY  WITH RESPECT TO ANY AND ALL INFORMATION GIVEN  IN THIS APPLICATION NOTE     Information    For further information on technology  delivery terms and conditions and prices please contact your nearest  Infineon Technologies Office  www infineon com      Warnings   Due to technical requirements components may contain dangerous substances  For information on the types  in question please contact your nearest Infineon Technologies Office    Infineon Technologies Components may only be used in life support devices or systems wit
14. CS starterkit to a computer to start evaluation     How to use DAVE to program the Infineon microcontroller you want to use in your project  by offering  intelligent wizards  that help you configure the chip to work the way you need it and automatically  generate C level templates with appropriate driver functions for all of the on chip peripherals and  interrupt controls     Use Tasking for program building  editing and code generation     Finally  use CrossView for simple debugging such as setting of breakpoints  amp  viewing of  core peripherals registers   Detailed information for Tasking and CrossView at www tasking com     Application Note 5 V1 0  2006 06    Ju  AP16093  In fi neon Getting Started with the XC164 Starterkit       Connect the XC164CS Starterkit    1 Connect the XC164CS Starterkit    The starterkit  Figure 1  is a versatile tool  providing quick access to the capabilities of XC16x s powerful  architecture  Applications can be developed easily with the starterkit     The starterkit is equipped with SRAM memory and peripherals for connection to the environment  There is  also an interface for the On Chip Debugging Features  OCDS1      For connection with the starterkit to a computer  the following configuration and hardware are required   1  Computer parallel port configured as  EPP  operating mode  for proper CrossView operation     Parallel cable    An external regulated 9 to 12V  500mA DC power supply for the starterkit  Figure 2     Starterkit DIP switch
15. Control Zero Cycle Jump function Control    IV Enable branch prediction  BP     v Enable zero cycle jump function  ZCJ     Vector Segment Pointer  VECSEG      Start from internal program memory    E       Start from external memory    VECSEG  pco           XC154CS  new project        Application Note 12 V1 0  2006 06       pe AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use DAvE    7  Exit by clicking X in the close button     15             Parallel Ports    8  Configure Parallel Ports by clicking on Port          Elle View Options Add Ins Windows      ou  Deml fom     Configure Port OH   Configure Port OL    Configure Port 1H   Configure Port 1L      Configure Port 3   Configure Port 4    Configure Port 5   Configure Port 9    Configure Port 20         XC164CS  Inew project        Application Note 13 V1 0  2006 06    Infineon    Configure Port 9    AP16093  Getting Started with the XC164 Starterkit       9  Click on Configure Port 9    e Functionality   Tick Use P9 4 as general IO    e Direction  Tick Out    How to use DAvE       File View Options Add Ins Windows      la Dag  m       XC164CS          Use P9 0 as general ID     Use P3 1 as general 10     Use P9 2 as general IO  J  Use P9 3 as general ID   v Use P3 4 as general ID     Use P3 5 as general IO    Direction         In     Gut   In C Gut   amp  In gut   In    Gut  C In    Out    in    Gut    Push Pull   Open Drain   F Open drain  F Open drain     Open drain     Open drain     Open dra
16. DE   C166 ST10   C  UserData  XC164 Toggle Toggle_I0 pjt      C  UserData    lej xj     File Edit Search Project Build Text Document Customize Tools Window Help 2 18  x    e 95 8  B5H amp X  amp mo      44ev 2e6mshbetmsm mu    T         C  AToggleXXC164CS  psp C165 ST10 Project Options  TOGGLE IO PJT     E  XC164C5  1 Project        m On Chip Flash   v Use on chip flash       E  Application      Processor              Toggle 10  5 Files   H     Source Files     D start asm      D Toggle 10 C               DO EERE   4 Header Files          User Defined Processor   CPU Problem Bypasses and      Flash Setup   On Chip Flash   External Flash Chip 1       External Flash Chip 2     xci B4CS 15FF BA z      Processor derivative     JV Add ROM range to locator memory specification                                         0  Toggle I0 H External Flash Chip 3        logge MainH External Flash Chip 4 Default vector table base address        at start of on chip Flash bd     E Project Files Memory Model     E Resources i 5 imo   i  73 Other Fil El  C   Compiler  MAD  l  C Compiler     Assembler   1  Macro Preprocessor   l  Linker Locator     CrossView Pro                   4  gt      OK C     Default       P ance  erau 7    Za             id A Fie Find A Search    Browse A Difference A Shell A Symbols        l lo  E     Mod  Ins            Line  315  Col 42       26 V1 0  2006 06    Application Note    um AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use Tasking 
17. F         escription    Tasking         File Find Search    Browse    Difference A Shell    Symbols      File  CAU serData XC154 ToggleSToggle Main C       d  RE ee ee e ELLE ELKELEKFELLFEERFEELFLELFFEEREKEERKEELKEELFKFEELFFELKFESEE    fr    This file contains the project initialization function     CE ins let  Cok 1       Application Note 22    V1 0  2006 06    Ju  AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use Tasking    5  Edit Toggle_Main C    e Insert the following code in the main function  between       USER CODE BEGIN    and       USER CODE  END          USER CODE BEGIN  Main  2     void delay  void          USER CODE END       USER CODE BEGIN  Main  4     while  1       IO vTogglePin P9 P4     toggle Port9 Pin4  delay           USER CODE END       USER CODE BEGIN  MAIN_General  10     void delay  void        unsigned long i   for  19051   0x200000 24   7   delay          _nop     _nop          USER CODE END    Application Note 23 V1 0  2006 06    Ju  AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use Tasking       F  TASKING EDE   C166 ST10   C  UserData XC164  Toggle  Toggle_I0 pjt      C  UserData  XC164 Toggle     Toggle_Main C    E    81 xl     File Edit Search Project Build Text Document Customize Tools    Window Help   8  x             BH   amp st  X                                      P Ele M              titt    C    AToggle XC154CS  psp      EJ XCIEACS  1 Project   HB  Toggle 10  5 Files   H     So
18. SER CODE END   amp  Register  PORT   Port Control Registers A         End of function main    P20  1024    DP20  0000     PLLIC  0000     PLLCON  7D12    ODPS  0000  gt  ALTSELLP9  0000   gt  IMBCTR  0009 m FOCON 0000  gt  ALTSELOP9  0000    PSDIDIS  0000     gt  FINTLADDR  0000    FINTICSP  0000 NS EFIE NLPA s00FC       FINTOADDR 0000  gt  FINTOCSP      0000 Era 0000   NODPA 0090  NUES agb BENI 0058  gt  ALTSELLPA  0000    ALTSELOP4  0000    EG    ETC aT  gt  ODP3  0000  gt  ALTSELLP3  0000  main 308     SCUSLC  0000    RSTCON2  4AF5  gt  ALTSELOP3  0000 2 PlH  0000  s Pec delere  X SYSSTAT   C804    RSTCFG  ODFF EMI _    eee       gt     gt     Program stopped by user  rm E EPIS  a 3 ALTSELOP1L 0000  gt  POH  0000  delay 324 0xa  E RET EA a  gt  DPOH  0000    POL  0000   gt c  gt  DPOL  0000  gt  POCON20  0000  Program stopped by user   gt  SPSEG   0000 mSYSCONS _ EDO    POCONS  0000  gt  POCONA  0000  delay324    SYSCONl   0000    SYSCONO       0000 E CIR      ODDO M POCOE AT CODO    EMUCON   0004 X CPUCON2  8FBB        BONA S PU o0  gt  POCONIL  0000    POCONOH  0000  ES DTE SFR E  gt  POCONOL   0000    PTCR  0003  PHYSICAL SP 0000FBF8 fp  0000002E BDPICUN S     90000  DO2E6   Fcoo   FADC  0000   0000  F600   0300       Halted   Program stopped by user        By pressing the function key  F5  once  the program will run and the LED on the starterkit can be observed to  be toggling periodically     Application Note 35 V1 0  2006 06    Ju  AP16093  In fi neon Getting Started
19. arted with the XC164 Starterkit       How to use Tasking    3 How to use Tasking    The C166 software development toolset from Altium is a complete programming package for the  XC166 C166 family  and includes a C C   compiler  assembler linker and debugger  simulator  ROM  monitor and OCDS L1      The starterkit package contains a CD for the installation of a demo version for Tasking EDE   To install Tasking   1  Runthe  Setup  file inside Tasking CD     For detailed information on Tasking  please visit www tasking com     3 1 Using Tasking to generate code    First start the program Tasking EDE for C166 ST10  If you see an open project  close it by File   gt  Close  Project Space     1  Create a new project space  e File   gt  New Project Space    e Click on Browse to select a folder which you want to save your project   Choose folder which you  have saved DAvE generated files previously     e Choose project name as    XC164CS    and click Open   gt  OK       EJ TASKING EDE   C166 ST10 J 5 212  x     File Edit Search Project Build Text Document Customize Tools Window Help       5  amp 5ms ma 2ci JAK           kpek nR      xj          HP         C      Toggle XC164CS  psp   gj XC164CS  0 Projects     Current Directory   C  UserData xC164 T oggle    Filename    cu serData X C154 Toggle X C154C5 psp  v Look in same directory for external workspace  Workspace   Type      Auto syne workspace    Bowe    OK   Cancel   Hep          Application Note 19 V1 0  2006 06    Jum AP16093  I
20. e DAvE    DAvE stands for Digital Application virtual Engineer and is Infineon Technologies    code generator for their  range of 8  16 and 32 Bit Microcontrollers  It provides initialization  configuration and driver code to ease  programming for beginners as well as experts     To install DAVE  user needs to follow the following steps  Figure 4      1  Download and install the DAvE Mothersystem from hitp   www infineon com dave  The starterkit  package contains a CD for the installation of DAvE      2  Download the required DIP file for the particular microcontroller you are using  i e  XC164CS    3  Install the DIP file     Users can refer to the application note for DAvE if they encountered any problem        How to install the DAvE Mothersystem  amp  Plug Ins  Es 2 3 4    Download Download install install  Mothersystem DIP file Mothersystem DIP file       Save to local Run setup exe Start Dave  Goto    driveiServer  View    setup    Wizard   Select       instalation          want  to install products  from the DAVE web   site     Browse to select  your DIP download  desination       Figure 4 How to install DavE    Application Note 8 V1 0  2006 06    um AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use DAvE    2 1 Using DAVE to configure XC164CS    We will be using DAvE to configure the XC164CS to toggle a particular port pin  The first step will be to start  the program generator DAVE and to create a new project to select the XC164CS microcon
21. h the express  written approval of Infineon Technologies  if a failure of such components can reasonably be expected to  cause the failure of that life support device or system  or to affect the safety or effectiveness of that device or  system  Life support devices or systems are intended to be implanted in the human body  or to support  and or maintain and sustain and or protect human life  If they fail  it is reasonable to assume that the health  of the user or other persons may be endangered     Ju  AP16093  In fi neon Getting Started with the XC164 Starterkit       AP16093   Revision History  2006 06 V1 0  Previous Version  none   Page Subjects  major changes since last revision       We Listen to Your Comments    Any information within this document that you feel is wrong  unclear or missing at all    Your feedback will help us to continuously improve the quality of this document    Please send your proposal  including a reference to this document  to  S lt     medocu comments infineon com O             Application Note 3 V1 0  2006 06    Ju  AP16093    In fi neon Getting Started with the XC164 Starterkit       Table of Contents Page  MOGUCOM PPM TR T Tt                                          AR 5  1 Connect the XC164CS Starterkit                      1   1 nn 6  2 How to use DAVE       00000000000 uaa u RR RR RD RR RARE RR RRRDRR SNR AR RRRDAA SNR RA SNR ORA RR Sa Sau 8  2 1 Using DAVE to configure XC164QC 8              ssssssssssssssssseeeeene eene nnnnnnnnnnn nene
22. in  F Gpen drain    Output Value      high  T high     high          P9 4 corresponds to microcontroller Port 9 Pin 4 which is connected to the starterkit LED     10  Exit by clicking X in the close button     Application Note    14    V1 0  2006 06    Infineon    AP16093  Getting Started with the XC164 Starterkit       11  Functions  e   Initialization Function  Tick lO vinit  e Function Library  Tick IO vTogglePin  e Source File  Rename IO C to Toggle 10 C    How to use DAvE       File View Options Add Ins Windows P    a Oe  itm       XC164CS    Pots Functions   Parameters   Notes      Initialization Function    Vv  i vi nit  Function  Library  Part 1     B  i0 ubReadPin    p fiO vSetPin  p  IG_vResetPin    Source File  File name     Toggle 10     M    Fla                              iussa  loi                       Fs                            P Xr       AC184C5    new project        Application Note 15    V1 0  2006 06    Jum AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use DAvE    12  Parameters  e Header File  Rename IO H to Toggle IO H         DAvE    Ele view Options Add Ins Windows 2     on   Deu  u      a ota    2    Ports   Functions Parameters   Notes    Header File    File name  Toggle 10 H       XC154C5    new project        13  Exit by clicking X in the close button     Application Note 16 V1 0  2006 06    Jum AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use DAvE    14  Save the Project  e File   gt 
23. m AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use CrossView Pro    4 How to use CrossView Pro    CrossView Pro reduces the time spent during the testing and debugging phases of embedded systems  project development  An easy to use interface with powerful and extensive debugging features helps you  debug your applications faster     CrossView Pro is integrated together within Tasking EDE environment     For more information  please visit www tasking com     4 1 Using CrossView Pro for debugging    Ensure that the starterkit is powered up and connected to the computer parallel port as described in chapter  1  With the setting for DIP switch S106 as described in chapter 1  the XC164CS is configured to start from  the internal flash     Start CrossView by clicking on Sd    The following GUI will appear        Cross  iew Pro C166 ST10   toggle io abs       File Target Edit Run Breakpoints Data Tools Settings View Window Help    Bl Bl GE 0  1   m    D gt  ILE SS GE 5 68 e vo GE EB     x zou nn js Elo  fi     USER CODE BEGIN    Main l      USER CODE END  void main void        USER CODE BEGIN  Main 2   oid delay void       USER CODE END  15  x   du  SEV    0 main      toggle_main c 302         Memory ox g p  E aco  ezg moe   1  0x00 0x00  0x00 0x00 nn  0x00 0x00   DPPl  0001  0x00 0x00   ce mm  0x00 0x00   sTKUN Fcoo  MDL  0000    su  EA ee  ILVL 00       0x00 0x00  E 0x00 0x00  set Retum  bU  C   set Main  rst S    set Del  llBrk  D   break delete 0   
24. n fi neon Getting Started with the XC164 Starterkit       How to use Tasking    2  Add new project to project space  e Click on icon Add new project to project space  e Enter project name as  Toggle IO  and click OK           Ell TASKING EDE   C166 ST10   TE PTT   File Edit Search Project Build Text Document Customize Tools Window Help       gt    asm e s ucl z a v  eaumat w mm   x          C    AToggleXXC164CS  psp   J XC164CS  0 Projects     Project Properties   x                                Default Settings   Directories   Members   Tools   Errors   Filters    BU XCT64CS  0 Projects  Project Space  C  UserData XC164 Toggle XC164CS  psp    Projects  fa pix   Current Directory   C  UserData XC164 T oggle  Filename    Toggle 10  v Look in same directory for external makefile  Makefile   Type        uta  sync makefile    Browse      Cancel         Build    File Find    Search A Browse    Difference A Shell    Symbols         Creel   TT TF       Application Note 20 V1 0  2006 06    Jum AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use Tasking    3  Add existing files to project  e Click on icon Add existing files to project    e Add  Toggle Main C    Toggle Main H   Toggle IO C  and Toggle IO H  and click OK    Remember that these are files generated by DAvE        Ell TASKING EDE   C166 ST10   7    8  xl  File Edit Search Project Build Text Document Customize Tools Window Help    jess ting   JAA       ee Ri                 x           0 gh wh m 
25. ng reset   signals  PUH 0   high during reset   Segment Address Lines  SALSEL  Chip Select Lines  CSSEL      No segment address lines  64 KByte  c None   POH 3   high  POH 4   low during reset   POH 1   low  POH 2   high during reset    e 2bit segment address    17  A16  256 KByte  c Two  HCS1 8CS0   POH 3   high  POH 4   high during reset   POH 1   high  POH 2   low during reset   c 4 bit segment address  A19 A16  1 MBytel Cc Three   052  650   POH    law  POH 4   low during reset   POHI   Tow  POH 2   low during reset     c E bit segment address   23  A15  16 MBpte    POH 3   low  POH 4   high during reset     XC1B4C5    new project        Application Note 11 V1 0  2006 06    Jum AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use DAvE    5  Global Settings  e No Change          DAvE     Eile View Options Add Ins Windows        dota    Dau  m           XC164CS   new project         6  CPUCON1   VECSEG  e Vector Segment Pointer  Select Start from internal program memory          Ele View Options Add Ins Windows       en    Da i 4  ec 2      XC164C5       ea         f Scaling factor of Vector Table  VECSC  WDT Configuration  WDTCTL      DISWDT executable until End of Init   Space between two vectors is 2 words      C DISWDT ENWDT always executable  Segmentation Control Interruptibility of Switch Context  INTSCXT    C Switch context is not interruptible     Disable segmentation  SGTDIS  eee     Switch context is interruptible  Branch Prediction Unit 
26. point    1 CODE     toggle_main c   308  0xc002b2  HARDWARE       With the breakpoint at function IO vTogglePin P9 P4   the program will stop there  User will be able to  monitor the current core peripheral registers status     For example  as PLLCON is set as 0x7D12 in function MAIN vinit  The PLLCON core register value can be  observed correctly in CrossView     By pressing function key  F5  continuously  the LED on the starterkit can be toggled since Port 9 Pin 4   P9 P4  is connected to the starterkit LED  It can also be observed in the PORT register window that P9 P4  is changed between 0 and 1     Application Note 34 V1 0  2006 06    Jum AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use CrossView Pro    4  Remove Breakpoint    e Click on the red LED beside the function IO vTogglePin P9 P4 in Toggle Main C which is the code  we have inserted  The red LED will turn GREEN           CrossView Pro C166 ST10   toggle io abs    File Target Edit Run Breakpoints Data Tools Settings View    Window Help  BL B c   dd ied m  gt  D gt  I Ls 62 GE S SED GE   i   ePID BWW AQAS dw    206  J OxcO02d8  gt    main v   Souce lines v   Souce line step z        USER CODE END       void main void        USER CODE BEGIN  Main 2   void delay void       USER CODE END    MAIN vlInit           USER CODE BEGIN  Main 4    01x    BEENA   Eos a ivi a IO vTogglePin P9 P4     toggle Port9 Pind  0 delay       toggle main c 324  delay     1 main       toggle_main c 306        U
27. qo e m     n i  pea nat ceeds     J  C164C5  0 Projects   B   Default Settings   Directories   Members   Tools   Errors   Filters    0     PEN Project C  UserData XC164 Toggle Togale_I0 pit  be oggle ID  4 Files     r  Files  Ala       FS    C  UserData xC164 T oggle T oggle_Main C  C AUserDatavXC1864 Toggle Toggle ID C  C  UserD ata xC164 T oggle T oggle_Main H  C NUserDatavXC1864 Toggle Togale 10 H            Hide files already in project D of 4 selected    External Makefile      none   Ez es    YES Project      none   B  ti     Add project files to VS  Project             Application Note 21 V1 0  2006 06    Infineon    AP16093  Getting Started with the XC164 Starterkit       4  Load Files    How to use Tasking    e Atthe top menu  click Project   gt  Load Files   gt  Invert   gt  OK       F  TASKING EDE   C166 ST10   C XUserDataXXC164 XTogglesToggle IO pjt         File Edit Search Project Build Text Document Customize Tools Window Help       9  aseSsaalocl  A amp  i vessaum  x           C  AToggle XC184CS  psp  EJ XC164CS  1 Project   545 Toggle 10  5 Files    HE Source Files      D start  asm    D Toggle 10 C       7  Toggle Main C   H     Header Files      520  Toggle 10 H      D  Toggle Main H   i  Project Files    E Resources   ir Other Files     amp  C UserData  XC164  Toggle  Toggle Main C        Module      Filenane     8Project    Project Settings  Toggle Main C  Toggle I0 dar      Controller Infineon XC164CS 16F  Led       Compiler  EE      G  Codegenerator 2 8  
28. ring   i e  CPU  amp  PORT           Cross  iew Pro C166 ST10   toggle io abs  File Target Edit Run Breakpoints Data Tools Settings View Window Help    BL EL co Ded ed m    D gt  ILE 5253 5 52 o E    WETE  Ek e iiiiisicztxzss  ZLL  4 wHEeseos nG BWW AAAS A    PFTRAAAAAARARAAA AAA A AAA AR AREAL A ARERR A AREA ERE EERE R EEEE EEEE EEEE EEE EEE EEEE       USER CODE BEGIN  Main 1      USER CODE END    void main void          USER CODE BEGIN  Main 2   void delay void        USER CODE END    EE  BONA    0 main       toggle main c 302        Register  CPU   Core Registers  m    P20  1024    DP20  0000      PLLIC  0000    PLLCON  2710  gt  Pa  003F  gt  DP9  0000     gt  TINTLADDR  0000  gt  FINTICSP      0000    EERE UE Tn CE CONES   gt  ALTSELOP9  0000   PSDIDIS  0000  BPS  FFFF    P4  00FC   gt  DP4  0000    ODP4  0000   gt  ALTSELIP4  0000    ALTSELOP4  0000       FINTOADDR   0000   FINTOCSP  0000     BNESEL3  0000   BNKSEL2  0000     BNESELI  0000    BNKSELO  0000       CPUID  0311   SCUSLS       1800  H i  gt        gt       Command  Crasstiew    SCUSLC  0000   RSTCON2   4AF5 r3 AFTE  M DPI gond       ODP3  0000 2   ALTSELIP3  0000   set Reset  rst     SYSSTAT  8804   RSTCFG  ODFF    gt  ALTSELOP3  0000  gt  P1H  0000   prt    RSTCON  0000    EXISELl  0000   set Rerun  R    DPlH  0000 2 ALTSELOPIH 0000    set BrkOnExit  e EXIT bi  EXISELO   0000  gt  EXICON  0000 SPIL ZII mE 5006  set Return  bU  C   gt  TFR  0000  gt  VECSEG 0020  t   X ALTSELOP1L 0000    POH  0000  set Main 
29. tomize Tools Window Help    81 xl     2 j85ug Jesmaool  JAAT  qw gEMS uum                   ft    Pf BEEEEREEELEELELEEELEEEL EEE LEER LEBEL EEL EERE EEELEEELEEREEEELERE EERE EEL EEBEEELRS          C  AToggleXXC164CS  psp    J xC164CS  1 Project   3 5 Toggle 10  5 Files         Source Files     start asm  A Toggle 10 C                USER CODE BEGIN  Main 1                          USER CODE END                                   void main void          USER CODE BEGIN  Main 2   void delay  void         USER CODE END       439 Header Files    A Toggle I0 H   A Toggle Main H  Project Files  Resources   i  Other Files        MAIN vInit        USER CODE BEGIN  Main 4     while  1       IO vTogglePin P9 P4     toggle Port9 Pind  delay          USER CODE END         End of function main       USER CODE BEGIN  MAIN General 10   void delay  void       unsigned long i     for  i 0 i lt 0x200000 itt     delay         nop      nop              USER CODE END    TASKING program builder v   5r2 Build 076 SN 00100069  Compiling and assembling toggle_main c   Compiling and assembling toggle_io c   Preprocessing start asm   Linking and locating to toggle_io out   W 518  page 0 assigned to DPPO   W 518  page 1 assigned to DPPl   W 518  page 768 assigned to DPP2   to i   Converting toggle io out to toggle_io abs in IEEE 695 format           Ferd    Seach  Bowie    Diteence A Shel    Smboh       No errors found  joo Ot    ns   Line  311   Cok 86             Application Note 30 V1 0  2006 06    Ju
30. troller        1  File   gt  New   gt  16 Bit Microcontroller   gt  XC164CS   gt  Create       File Yiew Options Add Ins Windows        ds B   Aal        DAYE   New Project    16 Bit Microcontrollers   32 Bit Microcontrollers   8 Bit Microcontrollers            Application Note 9 V1 0  2006 06    AP16093    ec   In fi neon Getting Started with the XC164 Starterkit       Project settings   2  General  e Main Source File  Rename Main c to Toggle_ Main c  e Main Header File  Rename Main h to Toggle Main h  e Compiler Settings  Select Tasking          Ele view Options Add Ins Windows 2       n Dau ihm        XC164CS     9 Project Settings    General   System Clock   Startup Configuration   Global Settings   CPUCON1   VECSEG   Notes     p Controller Type    Type  xci B4CS 15F    ROM Size  i28 KByte ROM Type  Flash  Max  CPU Clock po MHz    Main Source File Main Header File    File name  Toggle M ain C   File name  Toagle_Main H    Compiler Settings  C Keil Memory Model   SMALL       Tasking       XC154CS   C  UserData  lt C164 T oggleST oggle 10 dav       Application Note 10    How to use DAVE    V1 0  2006 06    um AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use DAVE    3  System Clock    e Input Frequency  Oscillator Clock  8MHz  e PLLIDIV   2  PLLMUL   30  amp  PLLODIV   3  e Clock Prescaler for System  CPU Clock  40MHz  Max  CPU Clock up to 40MHz        File View Options Add Ins Windows 2       a   D a  4  AG        XC164CS       Project Settings
31. urce Files   i B  D start asm       USER CODE BEGIN  Main l                USER CODE END       Toggle 10 C void main void      D  REET        1 Header Files    USER CODE BEGIN  Main 2     void delay  void        vL  Teage 10 H    USER CODE END    i SD Toggle Main H  HE Project Files   HE Resources   i  Other Files    MAIN vInit         USER CODE BEGIN  Main 4   while 1   t    IO vTogglePin P9 P4     toggle Port9 Pind  delay             USER CODE END         End of function main       USER CODE BEGIN  MAIN General 10   void delay  void       unsigned long i        nopi      for  i 0 i lt 0x200000 i t     delay       nopi                 USER CODE END          E Tes Te Jo Je J     aue  Ferr Scaer    Borse    Dance    sret    Soria      File  C  UserData XC164 Toggle Toggle_Main C  or E  D  Med Ins    Line  311  Cok 86             Note     DAvE doesn t change code which is inserted between       USER CODE BEGIN    and       USER CODE END      Therefore  whenever adding code to DAvE s generated code  write it between       USER CODE BEGIN    and      USER CODE END        Application Note 24 V1 0  2006 06    Infineon    AP16093  Getting Started with the XC164 Starterkit       6  Configure application    e  Atthe top menu  click Project   gt  Project Options    How to use Tasking    e Under Application   gt  Processor  change Manufacturer to Infineon and Processor to XC164CS             Be Edt    Search Project Build Text Document Customize Tools       e 2 858 amp zw a2crI a4      
32. ze unused vectors to endless loop  e ther Files     que read  C Initialize unused vectors to label or address   o  0000   ocate Order     C Do not initiali used vector   Section Size Adjust ga dicent Senis    Symbols Reserve interrupt vectors        Diagnostics  Miscellaneous  CrossView Pro             Options string      W oPRINT  teagle io map    Ms    2 EXTEND2  Bhoeufmknladij  cf     co   userdata xc1 64 toggle   _toggle_io ilo                             zi                      Buld    FleFind    Search    Browse    Difference    Shell    Symbols        OE ins    Line  311  Col 42          Application Note 28 V1 0  2006 06    ore AP16093  In fi neon Getting Started with the XC164 Starterkit       How to use Tasking    10  Configure CrossView Pro    e Under CrossView Pro   gt  Execution Environment  remove tick in Use simulator  Change Board  manufacturer to Infineon and Board configuration to Infineon XC164CS with OCDS  Single Chip             F  TASKING EDE   C166 ST10   C  UserData XC 164 Toggle  Toggle_I0 pjt      C  UserData XC164 Toggle Toagle_ Maint    81 xl  hk File Edit Search Project Build Text Document Customize Tools Window Help   8  x     e 9   sHSsee lncl THs     SB          see   C   AToggleXXC164CS  psp  EJ XC164CS  1 Project   24 Toggle 10  5 Files   H     Source Files    D start asm      Toggle 10 C   D TEER ET  Header Files      Toggle 10 H      Teggle Main H   E Project Files  i  Resources  ET Other Files    C165 ST10 Project Options  TOGGLE IO PJT    
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
ELS User Manual  Pressurizador Potenza  User`s Manual - ICP DAS USA`s I  Phoenix Gold R500.1 User's Manual  Heath Zenith 598-1282-02 User's Manual  Acer Aspire V5-122P-42154G50nss  GBC Slide Binders  Installation Manual 100617Eng  ZyXEL ZyAIR G-220F User's Manual    Copyright © All rights reserved. 
   Failed to retrieve file