Home
        Tutorial Manual(e2studio)
         Contents
1.    C  T  D     0   lt   Q         D    RX630 Group    Renesas Starter Kit Tutorial Manual  For e   studio       RENESAS MCU  RX Family   RX600 Series    All information contained in these materials  including products and product specifications  repre   sents information on the product at the time of publication and is subject to change by Renesas  Electronics Corporation without notice  Please review the latest information published by Rene     sas Electronics Corporation through various means  including the Renesas Electronics Corpora   tion website  http   www renesas com         Renesas Electronics  www renesas com Rev 1 00 Apr 2012    Notice    1  Al information included in this document is current as of the date this document is issued  Such information  however  is sub   ject to change without any prior notice  Before purchasing or using any Renesas Electronics products listed herein  please con   firm the latest product information with a Renesas Electronics sales office  Also  please pay regular and careful attention to ad   ditional and different information to be disclosed by Renesas Electronics such as that disclosed through our website     2 Renesas Electronics does not assume any liability for infringement of patents  copyrights  or other intellectual property rights  of third parties by or arising from the use of Renesas Electronics products or technical information described in this document   No license  express  implied or otherwise  is granted hereby under 
2.    Precautions  The following precautions should be observed when operating any RSK product     This Renesas Starter Kit is only intended for use in a laboratory environment under ambient temperature and humidity  conditions  A safe separation distance should be used between this and any sensitive equipment  lts use outside the  laboratory  classroom  study area or similar such area invalidates conformity with the protection requirements of the  Electromagnetic Compatibility Directive and could lead to prosecution     The product generates  uses  and can radiate radio frequency energy and may cause harmful interference to radio  communications  However  there is no guarantee that interference will not occur in a particular installation  If this  equipment causes harmful interference to radio or television reception  which can be determined by turning the equip   ment off or on  you are encouraged to try to correct the interference by one or more of the following measures     ensure attached cables do not lie across the equipment   reorient the receiving antenna   increase the distance between the equipment and the receiver   connect the equipment into an outlet on a circuit different from that which the receiver is connected  power down the equipment when not is use    consult the dealer or an experienced radio TV technician for help NOTE  It is recommended that wherever  possible shielded interface cables are used     The product is potentially susceptible to certain EMC phe
3.   1 00   Apr25 2012       First Edition issued  Ll NE    Renesas Starter Kit Tutorial Manual    Publication Date  Rev  1 00 Apr 25  2012    Published by  Renesas Electronics Corporation         LENESAS    SALES OFFICES Renesas Electronics Corporation    Refer to  http   www renesas com   for the latest and detailed information     http   www renesas com    Renesas Electronics America Inc    2880 Scott Boulevard Santa Clara  CA 95050 2554  U S A    Tel   1 408 588 6000  Fax   1 408 588 6130   Renesas Electronics Canada Limited   1101 Nicholson Road  Newmarket  Ontario L3Y 9C3  Canada   Tel   1 905 898 5441  Fax   1 905 898 3220   Renesas Electronics Europe Limited   Dukes Meadow  Millboard Road  Bourne End  Buckinghamshire  SL8 5FH  U K   Tel   44 1628 585 100  Fax   44 1628 585 900   Renesas Electronics Europe GmbH   Arcadiastrasse 10  40472 D  sseldorf  Germany   Tel   49 211 65030  Fax   49 211 6503 1327   Renesas Electronics  China  Co   Ltd    7th Floor  Quantum Plaza  No 27 ZhiChunLu Haidian District  Beijing 100083  P R China  Tel   86 10 8235 1155  Fax   86 10 8235 7679   Renesas Electronics  Shanghai  Co   Ltd    Unit 204  205  AZIA Center  No 1233 Lujiazui Ring Rd   Pudong District  Shanghai 200120  China  Tel   86 21 5877 1818  Fax   86 21 6887 7858    7898   Renesas Electronics Hong Kong Limited   Unit 1601 1613  16 F   Tower 2  Grand Century Place  193 Prince Edward Road West  Mongkok  Kowloon  Hong Kong  Tel   852 2886 9318  Fax   852 2886 9022 9044   Renesas Ele
4.   7   Press the  New  button to create a configuri   e  C C   Application       Press the    Duplicate    button to copy the seli    fc   C C   Attach to Appli   e  C C   Postmortem Di   cx  Custom Debug Ze   Press the  Filter  button to configure filterin   Ex  Debug only   fe   GDB Hardware Debuge  bih GHS Local C C   Laur   c   HEW Debugging Configure launch perspective settings from the P    Renesas GDB Hardware      3   Press the    Delete    button to remove the sele      Edit or view an existing configuration by sel       Main   ne Debugger  gt     gt  Startup E Common Es Source    Debug hardware  Target Device    RSF5630E      GDE Settings   Connection Settings   Debug Tool Settings  a Clock  Select Clock Type  JTag Clock Frequency MHz   Fine Baud Rate Mbps   4 Connection with Target Board  Power Target From The Emulator  MAX  Y  Supply Voltage  a IO    Use DefaultIO Filename   IO Filename CA Renesaste2studio internal loFiles RARE   a Communication Mode   Mode Debug Mode   Execute The User Program After Ending    No          R20UT2040EG0100 Rev  1 00  Apr 25  2012      LENESAS Page 13 of 23    RSKRX630    3  Project Workspace       Click the debug button to continue   e   studio will now connect to the  debugger  and download the code to  the target     e   studio may display a dialog  ask   ing if you would like to switch to  the    Renesas Debug perspective      Click    Yes       The new e   studio perspective lay   out is optimised for debugging     3 4 Running th
5.  25  2012    RSKRX630 3  Project Workspace       3  Project Workspace    3 1 Introduction    e   studio is a open source integrated development tool that allows the user to write  compile  program and debug a  software project on many of the Renesas Microcontrollers     3 2 Starting e   studio and Importing Sample Code       2   UJ  e Start e   studio by selecting it from Workspace Launcher  Start Menu  The first dialog to ap  Select a workspace  g p  pear will be the Workspace e2Studio stores your projects in a folder called a workspace     Choose a workspace folder to use for this session     Launcher     e Click    Browse    and select a suitable        location to store your workspace   using the    Make New Folder    op   tion as necessary  Click    OR      C  Use this as the default and do not ask again                e Click    Yes    when presented with Administrator Privilege  the    Administrator Privilege    dia   log     po          I   O Administrative privileges are required for correct operation of   edstudio on Windows 7  Please ensure you have appropriate privileges   Le  Right click renesas eclipse exe and choose  Run as Administrator      Do you want to continue           e The e2studio welcome splash BS           ee pi   ue Refactor  premado Segih fumo Beegeel iene elp      screen will appear  Click the    Go to pE A hos e    the workbench    arrow button on the  far right     Welcome    e2 studio       ver    RENESAS          R20UT2040EG0100 Rev  1 00   L
6.  using GDE simulator      3 HardwareDebug  Debug on hardware   4 HewDebug  Debug using HEW   5 Release  Release   No Debug        option           R20UT2040EG0100 Rev  1 00   LENESAS Page 12 of 23  Apr 25  2012    RSKRX630    3  Project Workspace       3 3 2   Debug Configuration    e Click the arrow next to the debug  button  bug icon   Select    Debug    Configurations        e The    Debug Configuration    dialog  will appear  Click the small arrow  next to    Renesas GDB Hardware  Debugging    option    e The build configurations for each  project will appear  Select the entry  for the tutorial project     e The debug configurations control  page will then show for the tutorial  project  Change the main tab to     Debugger     and then secondary tab  to    Connection Settings     Check  through the debugger settings  If  you intend to use an external power  supply  set the    Power Target From  The Emulator    option to No  drop  down menu     e Refer to the RSK   s User Manual for  details of power supply configura   tions     Note  e   studio will display a warning  dialog if you attempted to connect with    an incorrect power supply setting        Project Window Help    Gr   Gr   rOrQ   A     no launch history                          Debug As      Debug Configurations                           Organize Favorites                   e2 Debug Configurations       Create  manage  and run configurations        E i Configure launch settings from this dialog   type filter ted
7. 30 2  Introduction       2  Introduction    This manual is designed to answer  in tutorial form  the most common questions asked about using a Renesas  Starter Kit  RSK   The tutorials help explain the following    e How do I compile  link  download and run a simple program on the RSK    e How do I build an embedded application     e How do I use Renesas    tools     Files referred to in this manual are installed using the project generator as you work through the tutorials  The tuto   rial examples in this manual assume that installation procedures described in the RSK Quick Start Guide have been  completed  Please refer to the quick start guide for details of preparing the configuration     These tutorials are designed to show you how to use the RSK and are not intended as a comprehensive introduction  to e   studio  compiler toolchains or the E1 emulator  Please refer to the relevant user manuals for more in depth infor     mation        2 1 Note Regarding Source Code    Due to the project generator  1t 1s possible that the line numbers for source code illustrated in this document does  not match exactly with that in the actual source files  It is also possible that the source address of instructions illus   trated in this manual differs from a user s code compiled from the same source  These differences are minor  and do  not effect the functionality of the sample code or the validity of this accompanying manual        R20UT2040EG0100 Rev  1 00   LENESAS Page 8 of 23  Apr
8. ENESAS Page 9 of 23  Apr 25  2012    RSKRX630 3  Project Workspace       e Once the e   studio environment has C C     e2Studio  initialised  right click in the project               eefp kip  explorer window and click   ika LJ D 2 4 6    G6  4 38     0 Q     Import                                  e The Import dialog will now appear   Expand the    General    folder icon  Select  and select    Existing Projects into  Workspace     then click    Next        Create new projects from an archive file or directory        Select an import source   type filter text    4   amp  General   E  Archive File  15 Existing Projects into Workspace      File System  E  Preferences   gt    C C     gt  E CVS   gt   2 Run Debug   gt   3 Team       Finish             R20UT2040EG0100 Rev  1 00   LENESAS Page 10 of 23  Apr 25  2012    RSKRX630 3  Project Workspace       e The import dialog will now allow    E impor     en e  tsi  you to specify the project to import   Click the    Browse    button  and  locate the following directory     Import Projects    Select a directory to search for existing Eclipse projects        Select root directory   C  Workspace RSK RSKRX630    i Select archive file     l   Projects  e Ensure that the    Copy projects into  workspace    option is ticked  and    then click    Finish           Add project to working sets          e From the list of projects in the a    Tutorial      Project Explorer    on the left hand    347  Binaries   side  select the    Tutorial    p
9. LED c Le  timeradc c Le kade  Le main c El       kkkkkkkkkkkekkkkekkkkekkkekkkkekkkkkkkkekkkkkkkkkkkekkkkkkkkkkkkekkkkekkkkkkkkkkkkkkkiES  void Static Test  void        Declare loop count variable     uint8 t uicount   0      x Write ucStr variable   STATIC  to LCD     Display LCD LCD LINE2 ucStr           Begin for loop which writes one letter of ucReplace to the LCD at a time  The nested while loops generate the delay between each letter change       for  uicount 0  uicount lt 8  uicount             Start a one shot timer to create a delay between each loop  iteration     Timer Delay 40  mS         Replace letter number  uiCount  of  ucStr  from  ucReplace      ucStr uicount    ucReplace  uicount    Display LCD LCD LINE2 ucStr             Clear LCD Display     ucStr uicount     o l       R20UT2040EG0100 Rev  1 00  Apr 25  2012      LENESAS Page 17 of 23    RSKRX630 4  Basic Debugging of the Tutorial Program    e Click the resume    button to run the  code through  HE    e You can observe the  user LED flash rate vary as you  adjust the potentiometer  at the  same time as the debug LCD  string change character by char   acter from    STATIC    to    TEST   TEST        e This is the extent of the tutorial code        R20UT2040EG0100 Rev  1 00   LENESAS Page 18 of 23  Apr 25  2012    RSKRX630 5  Additional Information       5  Additional Information    Technical Support    For details on how to use sucio  refer PI  the help file by opening estudio and click  proiect Window  He
10. Table of Contents    NS A TTTITTTTTTTTTETTTTTTTTTE        7  1 1 O 7   MAAS RO 7  A serp EE I A I ka o E laD to 8  2 1 NoteResardiiio  Source Code suu a a NN E A 8  Ds PEOECE WOTKS PAE ti 9  3 1 o O 9  3 2 Starting estudio and Importing Sample Code    c c cccccscscscsesessssssscscscscscecesescsvsvsvavavacscscscsesescsvsvsvavavacacacsessseseevsvens 9  3 3 Build Configurations and Debus Sessions su E A EO a 12   3 3 1 BULA CONTI ON   A TASA RAI EA TAREAS AA EA AAA 12   332 Debus ONES UNA  ION 51145  p kkk ka ll do 13  SA AR a A LS E Sa SKO Su E Sa 14  4  Basic Debuesins of the Tutorial Program da 15  4 1 jai Koj ta eV uk Ln iz iu Saco slot nic lios  15  a2  MUn PUNCO S srias taN Kao N ves ker Ka a ka san KG Da Mad kare Saa kae 16    SxAd  dMONA JNI OMANO ss a a A a aa a A mr A 19      LENESAS    RSKRX630 R20UT2040EGO100  Rev  1 00  RENESAS STARTER KIT Apr 25  2012       1  Overview    11 Purpose    This RSK is an evaluation tool for Renesas microcontrollers  This manual describes how to get the RSK tutorial  started  and basic debugging operations     1 2 Features    This RSK provides an evaluation of the following features   e Renesas microcontroller programming    e User code debugging   e User circuitry such as switches  LEDs and a potentiometer  e Sample application   e Sample peripheral device initialisation code    The RSK board contains all the circuitry required for microcontroller operation        R20UT2040EG0100 Rev  1 00   LENESAS Page   of 23  Apr 25  2012    RSKRX6
11. any patents  copyrights or other intellectual property rights  of Renesas Electronics or others     You should not alter  modify  copy  or otherwise misappropriate any Renesas Electronics product  whether in whole or in part     4  Descriptions of circuits  software and other related information in this document are provided only to illustrate the operation of  semiconductor products and application examples  You are fully responsible for the incorporation of these circuits  software   and information in the design of your equipment  Renesas Electronics assumes no responsibility for any losses incurred by  you or third parties arising from the use of these circuits  software  or information     5  When exporting the products or technology described in this document  you should comply with the applicable export control  laws and regulations and follow the procedures required by such laws and regulations  You should not use Renesas Electron   ics products or the technology described in this document for any purpose relating to military applications or use by the mili   tary  including but not limited to the development of weapons of mass destruction  Renesas Electronics products and technol   ogy may not be used for or incorporated into any products or systems whose manufacture  use  or sale is prohibited under any  applicable domestic or foreign laws or regulations     6  Renesas Electronics has used reasonable care in preparing the information included in this document  but R
12. ctronics Taiwan Co   Ltd    7F  No  363 Fu Shing North Road Taipei  Taiwan   Tel   886 2 8175 9600  Fax   886 2 8175 9670   Renesas Electronics Singapore Pte  Ltd    1 harbourFront Avenue  406 10  keppel Bay Tower  Singapore 098632   Tel   65 6213 0200  Fax   65 6278 8001   Renesas Electronics Malaysia Sdn Bhd    Unit 906  Block B  Menara Amcorp  Amcorp Trade Centre  No  18  Jin Persiaran Barat  46050 Petaling Jaya  Selangor Darul Ehsan  Malaysia  Tel   60 3 7955 9390  Fax   60 3 7955 9510   Renesas Electronics Korea Co   Ltd    11F   Samik Lavied  or Bldg   720 2 Yeoksam Dong  Kangnam Ku  Seoul 135 080  Korea  Tel   82 2 558 3737  Fax   82 2 558 5141    O 2010 Renesas Electronics Corporation  All rights reserved   Colophon 1 0    RX630 Group            LENESAS    Renesas Electronics Corporation R20UT2040EGO100    
13. e Tutorial    Once the code has been downloaded   the program counter will stop at the  entry vector  usually the    Power On     function     Click the    Resume      button to let the code run  I    It will keep running up to   the    main    function  Execute the main  code function    It is recommended that you execute  the entire tutorial demo first  before  continuing to debug it     ES Confirm Perspective Switch       ex  This kind of launch is configured to open the Renesas Debug perspective when it      suspends     This Renesas Debug perspective is designed to support application debugging  It  incorporates views for displaying the debug stack  variables and breakpoint    management     Do you want to open this perspective now       Remember my decision          R20UT2040EG0100 Rev  1 00  Apr 25  2012      LENESAS Page 14 of 23    RSKRX630 4  Basic Debugging of the Tutorial Program       4  Basic Debugging of the Tutorial Program    This section will look at basic debugging functionality in e   studio     4 1 Program lnitialisation    Before the main program can run  the microcontroller must be configured  The following parts of the tutorial pro   gram are used exclusively for initialising the RSK device so that the main function can execute correctly  The ini   tialisation code is run every time the device 1s reset via the reset switch or from a power reboot     e After downloading the code  The    reseterge 63 h  lol maime  El Oxtttttf                       Descri
14. enesas Electronics  does not warrant that such information is error free  Renesas Electronics assumes no liability whatsoever for any damages in   curred by you resulting from errors in or omissions from the information included herein     7  Renesas Electronics products are classified according to the following three quality grades     Standard        High Quality     and     Specific     The recommended applications for each Renesas Electronics product depends on the product   s quality grade  as  indicated below  You must check the quality grade of each Renesas Electronics product before using it in a particular applica   tion  You may not use any Renesas Electronics product for any application categorized as    Specific    without the prior written  consent of Renesas Electronics  Further  you may not use any Renesas Electronics product for any application for which it is  not intended without the prior written consent of Renesas Electronics  Renesas Electronics shall not be in any way liable for  any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an applica   tion categorized as    Specific    or for which the product is not intended where you have failed to obtain the prior written con   sent of Renesas Electronics  The quality grade of each Renesas Electronics product is    Standard    unless otherwise expressly  specified in a Renesas Electronics data sheets or data books  etc        Standard     Computer
15. hwsetup c   Lc  flashLED c 2         Return value   none  kkkkkakkkkkakkkkkakkkekkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkekkkkkkkkkkkkekkkkkkekkkkkEknkEpe       void Flash LED  void           Declare a delay count variable     uint32 t ulLed Delay   0      Flash the LEDs for 200 times or until a user switch is pressed       while    gSwitchFlag    0 44      gFlashCount  gt  0         for  ulLed Delay   0  ulLed Delay  lt  4000000    ulLed Delay            Toggles the LEDs after a specific delay      Toggle LED           Reset the gSwitchFlag flag variable     gSwitchFlag   0    gt        pekkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkekkkekkkekkkkkkkokkkkkiikiik      End of function Flash LED    kkkkkkkkkkkkkkekkkkkkekkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkekkkkkkkkkkkkkkekkkkkkekkkkkkkiES         ic resetprg c    main c Ez      E  O  xFFFFFE i Le  hwsetup c i Le  flashLED c   Lc  timerade c      Return value   hone  eee e    void main  void     i       Initialise the debug LCD     Init LCD         Displays the Renesas splash screen     Display LCD LCD LINEl   Renesas     Display LCD LCD LINE2  NICKNAME        Begins the initial LED flash sequence     Flash LED         Begins the ADC varying flash Sequence     Timer ADC            Begins the static variable test     Static Test         Infinite while loop     while 1             DERRER ee R Rk ee eee eee ee ee ie k dr rr E EXERERRERE RE KK KO KKK KOK KD KK KK KK KD KOK KK KK E E OL       Lc  resetprg c  E  Ox     hwsetup c  e  flash
16. loop iterates through  and toggles the user LEDs  This  loop will continue until it has    flashed the LEDs 200 times or a  user switch 1s pressed           Lc  resetprg c Lc  main c 2    Return value     E   Oxfffttftt Lc  hwsetup c      none    RRR RRR RRR RRR RRR RRR RRR RRR RRR RR RRR RRR RRR RRR RRR RRR RRR RRR RRR RR RRR RRR RRR RRR RRR           void main  void        Begij  Static                 Runto Line  3   Move To Line  Tb  Resume At Line      void Flash LED  void     PEPA       Begins the initial LED flash sequence            Begins the ADC varying flash Sequence             Initialise the debug LCD     Init_LCD        Displays the Renesas splash screen 7j  Display LCD LCD LINE1   Renesas     Display LCD LCD LINE2  NICKNAME    Flash LED     Timer ADC        Begins the static variable test     Static Test          Infinite while loop     while  1          Declarations k  Segs References     Flash L  Search Text        Begi    b  Timer A Make Targets    Ctrl R           RRR RRR RRR             Declare a delay count variable     uint32 t ulLed Delay   0        Flash the LEDs for 200 times or until a user switch is pressed     while   gSwitchFlag    0  amp  amp    gFlashCount  gt  0         for  ulLed Delay   0  ulLed Delay  lt  4000000    ulLed Delay            Toggles the LEDs after a specific delay      Toggle LED             Reset the gSwitchFlag flag variable     gSwitchFlag   0           e Left click the line Breakpoint Types  gt      gSwitchFlag   0     and 
17. lp       i  ing    Help    and selecting    Help Contents            Ak   ae OG   FN E aj Welcome    UU    7  Help Contents     available   Running  oy Search  Dynamic Help  Key Assist    Ctrl Shift L  Tips and Tricks       For information about the RX630 series microcontrollers refer to the RX630 Group hardware manual   For information about the RX630 assembly language  refer to the RX600 Series Software Manual     Online technical support and information is available at  http   www renesas com rskrx630    Technical Contact Details    America  techsupport america Orenesas com  Europe  tools support eu Orenesas com  Japan  cscOrenesas com    General information on Renesas Microcontrollers can be found on the Renesas website at   http   www renesas com     Trademarks  All brand or product names used in this manual are trademarks or registered trademarks of their respective com   panies or organisations     Copyright   This document may be  wholly or partially  subject to change without notice  All rights reserved  Duplication of this  document  either in whole or part is prohibited without the written permission of Renesas Electronics Europe Lim   ited        2012 Renesas Electronics Europe Limited  All rights reserved      2012 Renesas Electronics Corporation  All rights reserved      2012 Renesas Solutions Corp  All rights reserved        R20UT2040EG0100 Rev  1 00   LENESAS Page 19 of 23  Apr 25  2012    REVISION HISTORY RSKRX630 Tutorial Manual    Rev  Date Description     
18. m clocks  x End of function HardwareSetup    e The user can step through all the  initialisation code by clicking the     Step Into    icon and reading the code  and comments  For this guide  we  will skip past it    e Click the    Resume       button  to run the code up HE  to the main function     For further details regarding hardware configuration  please refer to the RSKRX630 User   s Manual and the RX630    Hardware Manual           R20UT2040EG0100 Rev  1 00   LENESAS Page 15 of 23  Apr 25  2012    RSKRX630    4  Basic Debugging of the Tutorial Program       4 2 Main Functions    This section will look at the program code called from with the main   function  and how it works     e The main function first initialises  the debug LCD  and then displays     Renesas    and the RSK name on  the screen     e Support for the LCD display is  included in the tutorial code  We  do not need to be concerned  about the details of the LCD in   terface     except that the interface  is write only and so is not  affected 1f the LCD display is at   tached or not     e Left click line with the function  call    Flash LED   to select it   then right click it and select the  option    Run to Line       e This will cause the target to exe   cute all code before this line  This  can be observed by the text dis   played on the debug LCD     e Click the    Step Into    button to  step into the Flash LED function     o  e The program counter will now  move to the Flash_LED function   The while 
19. nomena  To mitigate against them it is recommended that the  following measures be undertaken     e The user is advised that mobile phones should not be used within 10m of the product when in use   e The user is advised to take ESD precautions when handling the equipment     The Renesas Starter Kit does not represent an ideal reference design for an end product and does not fulfil the regula   tory standards for an end product        How to Use This Manual    1  Purpose and Target Readers    This manual is designed to provide the user with an understanding of the RSK hardware functionality  and electrical  characteristics  It is intended for users designing sample code on the RSK platform  using the many different incor     porated peripheral devices     The manual comprises of an overview of the capabilities of the RSK product  but does not intend to be a guide to  embedded programming or hardware design  Further details regarding setting up the RSK and development envi   ronment can found in the tutorial manual     Particular attention should be paid to the precautionary notes when using the manual  These notes occur within the body  of the text  at the end of each section  and in the Usage Notes section     The revision history summarizes the locations of revisions and additions  It does not list all revisions  Refer to the text of  the manual for details        2  List of Abbreviations and Acronyms    O eon OOOO o O  co  CP  E        CD  o Light Emiting Diode O OOS       
20. ption   This program is the MCU s entry point trom a power on reset   File window will open the Tutorial   The function configures the MCU stack  then calls the     ej HardwareSetup function and main function sequentially  code at the entry point  The program     cie  counter position will be highlighted a AA  e Double click the blue section to the         left of the code in line with the     Initialise the MCU processor word            A   set intb   sectop  C VECT       HardwareSetup       line  This will   set_fpsw FPSW init    add a software breakpoint  indicated je Inifinliss the MCU stack aren     by a blue tick and a dot  te    i Click the    Resume    button to run the      Configure the MCU and RSK hardware         y   HardwareSetup      code up to this breakpoint  o  o    Execute a NOP instruction     a nop      LIE      Set Ubit and Ibit for PSW       set psw PSW init    HE          m Click the    Step Into        resetprg c Le  main c  E  Oxffftffft Lc  hwsetup c   3  button  or press F5   to dh eri   HardwareSetup          Description   Contains all the setup functions called at device restart  step into the   Argument   none     HardwareSetup  function                        id Hard Set id  e The    HardwareSetup    function calls ot ee  several initialisation functions which         ES  ConfigureOutputPorts      configure the MCU for normal op  ConfigureInterrupts               EnablePeripheralModules     eration  This includes input output    ports  and syste
21. right Go to Annotation Ctrl fe     click in the blue section to the AA  1            or until a user switch is pressed     right and select Toggle Before Disable Before PC Eventpoint     z 0   ds i    OE a        Delay    4000000    ulLed Delay   e This will insert a hardware event Add Task       point at this code line   R20UT2040EG0100 Rev  1 00   LENESAS Page 16 of 23    Apr 25  2012    RSKRX630    4  Basic Debugging of the Tutorial Program       Click the resume button  and the  RSK will run through the itera   tion loop  Press one of the user  switches to proceed past the loop   The program counter will stop at  the hardware eventpoint     Click the    Step   Return    button to exit li  the    Flash LED         function and return to   main     The    Timer ADC    function ini   tialises the ADC and timer unit   so that a periodic interrupt tog   gles the user LEDs  The period of  the periodic interrupt is varied by  the value of the potentiometer     Click the    Step Over      button  or press F6  to a   step the program    counter onto the next  function     Static Test      Click    Step Into    to    enter the    Static_Test     al  function  a alee    In the for loop  the   contents of the string    ucStr    are  replaced with the contents of     ucReplace     one element at a  time    While this happens  the code is  regularly interrupted by the Timer  ADC code  allowing both to ap   pear to run simultaneously           e resetprg c     main c  E  Oxttffffff     
22. roject      Ej Includes   and click the arrow next to 1t to ex  a GE src   pand the folder contents  and click p  e  dbsct c   the arrow next to the    src    folder to o  e  flashLED c   show the source files  o  A  flashLED h   gt   ej hwsetup c   gt   aj hwsetup h  p   ej id_code c  p   o intprg c  p  h  iodefine h  p   oj led e  p  aj led h   gt   e  main c    gt  lic  resetprg c   R20UT2040EG0100 Rev  1 00   LENESAS Page 11 of 23    Apr 25  2012    RSKRX630 3  Project Workspace       3 3 Build Configurations and Debug Sessions    3 3 1 Build Configuration    The e   studio workspace will be created with several build configurations     the two we will address in this manual is     HardwareDebug  and    Release        Release   This build mode has optimisation turned on  and provides little debug information  The C code instruction execu   tion may appear to be out of order  due to the way compiler optimises the code  This build configuration 1s intended  for final ROM programmable code     HardwareDebug  This build mode has all optimisation turned off  and provides full debug information  This 1s the best configuration  to use whilst developing code  C code instruction execution will be linear     e Click the top level tutorial project rr  y  O  QQ    pfr  folder again  and then the arrow E  next to the build button  hammer    icon   and select the A       HardwareDebug   e e   studio will now build the code     1 CustomDebug  Debug using custom debugger   2 Debug  Debug
23. s  document or Renesas Electronics products  or 1f you have any other inquiries      Note 1     Renesas Electronics    as used in this document means Renesas Electronics Corporation and also includes its majority   owned subsidiaries      Note 2     Renesas Electronics product s     means any product developed or manufactured by or for Renesas Electronics     Disclaimer    By using this Renesas Starter Kit  RSK   the user accepts the following terms     The RSK is not guaranteed to be error free  and the entire risk as to the results and performance of the RSK is as   sumed by the User  The RSK is provided by Renesas on an    as is    basis without warranty of any kind whether ex   press or implied  including but not limited to the implied warranties of satisfactory quality  fitness for a particular pur   pose  title and non infringement of intellectual property rights with regard to the RSK  Renesas expressly disclaims all  such warranties  Renesas or its affiliates shall in no event be liable for any loss of profit  loss of data  loss of contract     loss of business  damage to reputation or goodwill  any economic loss  any reprogramming or recall costs  whether  the foregoing losses are direct or indirect  nor shall Renesas or its affiliates be liable for any other direct or indirect  special  incidental or consequential damages arising out of or in relation to the use of this RSK  even if Renesas or its  affiliates have been advised of the possibility of such damages     
24. s  office equipment  communications equipment  test and measurement equipment  audio and visual  equipment  home electronic appliances  machine tools  personal electronic equipment  and industrial robots        High Quality     Transportation equipment  automobiles  trains  ships  etc    traffic control systems  anti disaster systems  anti   crime systems  safety equipment  and medical equipment not specifically designed for life support        Specific     Aircraft  aerospace equipment  submersible repeaters  nuclear reactor control systems  medical equipment or  systems for life support  e g  artificial life support devices or systems   surgical implantations  or healthcare  intervention  e g  excision  etc    and any other applications or purposes that pose a direct threat to human life     8  You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics   especially with respect to the maximum rating  operating supply voltage range  movement power voltage range  heat radiation  characteristics  installation and other product characteristics  Renesas Electronics shall have no liability for malfunctions or  damages arising out of the use of Renesas Electronics products beyond such specified ranges     9  Although Renesas Electronics endeavors to improve the quality and reliability of 1ts products  semiconductor products have spe   cific characteristics such as the occurrence of failure at a certain rate and malf
25. unctions under certain use conditions  Further   Renesas Electronics products are not subject to radiation resistance design  Please be sure to implement safety measures to  guard them against the possibility of physical injury  and injury or damage caused by fire in the event of the failure of a  Renesas Electronics product  such as safety design for hardware and software including but not limited to redundancy  fire  control and malfunction prevention  appropriate treatment for aging degradation or any other appropriate measures  Because  the evaluation of microcomputer software alone is very difficult  please evaluate the safety of the final products or system  manufactured by you     10  Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibil   1ty of each Renesas Electronics product  Please use Renesas Electronics products in compliance with all applicable laws and  regulations that regulate the inclusion or use of controlled substances  including without limitation  the EU RoHS Directive   Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable  laws and regulations     11  This document may not be reproduced or duplicated  in any form  in whole or in part  without prior written consent of Renesas  Electronics     12  Please contact a Renesas Electronics sales office 1f you have any questions regarding the information contained in thi
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
- eQ-3    Wooza iWeb User Manual  BoosterPack Development Guide  取扱説明書    Installation and User manual – DRCP  USHMID SMS CLIENT USER MANUAL    Copyright © All rights reserved. 
   Failed to retrieve file