Home
Renesas Starter Kit for RX610 Tutorial Manual
Contents
1. ssssssss ssssssssssssccsssssssssssssscsssssqnunsstssstenssnnnnsssttttss 10 TA FOOT AN EEEE E E E E AE A bar adri 10 Fe MIV FUNCIONS scel ala ES 13 Chapter 8 AdditionalintormatiO Msisi iii TE 18 Chapter 1 Preface Cautions This document may be wholly or partially subject to change without notice All rights reserved No one is permitted to reproduce or duplicate in any form a part or this entire document without the written permission of Renesas Technology Europe Limited Trademarks All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or organisations Copyright 2010 Renesas Technology Europe Ltd All rights reserved 2010 Renesas Technology Corporation All rights reserved 2010 Renesas Solutions Corporation All rights reserved Website http www renesas com Glossary ADC Analog to Digital Converter LED Light Emitting Diode API Application Programming Interface PC Program Counter CD Compact Disk ROM Read Only Memory CPU Central Processing Unit RPDL Renesas Peripheral Driver Library E1 El for Starter Kit Emulator RSK Renesas Starter Kit E20 E20 for Starter Kit Emulator SDRAM Synchronous dynamic random access memory HEW High performance Embedded Workshop USB Universal Serial Bus LCD Liquid Crystal Display Chapter 2 Introduction This manual is designed to answer in tutorial form the most common questions asked about using a Rene
2. f Initialise the LCD Display InitialiseLtD ft Displays the Renesas splash screen DisplayLCD LCD LINE1 Renesas DisplayLCD LCD LINE2 NICKNAME 87 as ft Begins the initial LED flash sequence 83 FFFF3233 FlashLED 90 al ft Begins the ADC varying flash Sequence GF FFFF3237 TimerADC Sa a4 ft Begins the static variable test 55 FFFF323B Statics Test 965 oT ft Defines an infinite loop to keep the MCU running 98 FFFF323E while 1 99 100 DIA 101 nd main function 102 AAA 103 e Press Reset Go on the Debug Tool Bar The code will execute to the event point At this point all the device initialisation will have been completed The code window will open main c and show the new position of the program counter 13 iv TT TE TS 80 81 82 83 84 85 86 87 as 89 gg SI 92 Ba ot Sa 96 oT 398 99 100 101 102 103 o SATU LLON LI L LILI LL Return value none FONC COMMENT END RR A RO RO A A AAA A A A A AA A A A A A AI A AA A A A A A A AL FFFF3212 ii oid main void FFFF3212 gt FFFF3216 FEFF3224 FrFF3233 FEFESZII FFFF323B FEFF323E f Initialise the LCD Display Displays the Renesas splash screen DisplayLCD LCD LINE1 Renesas DisplayLCD LCD LINE2 NICKNAME f Begins the initial LED flash sequence FlashLED ft Begins the ADC varying flash Sequenc
3. The example above shows the New Project Workspace dialog with the RSKRX610 selected e Select the RX CPU family and Renesas RX Standard toolchain e Select the RSKRX610 project type from the left hand projects list e Enter a name for the workspace all your files will be stored under a directory with this name e The project name field will be pre filled to match the workspace name above but this name may be changed manually Note High performance Embedded Workshop allows you to add multiple projects to a workspace You may add the sample code projects later so you may wish to choose a suitable name for the tutorial project now e Click lt OK gt to start the Renesas Starter Kit Project Generator wizard 4 The next dialog presents the three types of example project available 1 Tutorial this is the one of interest at this time the code is explained later in this manual 2 Sample Code This provides examples for using various peripherals If you select this and click lt Next gt it will open a new dialog allowing the selection of many code examples for the peripheral modules of the device 3 Application where the debugger is configured but there is no program code This project is suitable for the user to add code without having to configure the debugger The project generator wizard will display a confirmation dialog Press lt OK gt to create the project and insert the necessary files A tree showing all the f
4. e Return to the main c file and review the main function e Whilst the TimerADC functions vary the LED 91 Begins the sta flash rate at interrupt level the Statics_Test de FFEF3235 Statics Test function runs at non interrupt level 16 The Statics_Test function initalises a character string with the contents of a static variable then gradually replaces it letter by letter with another static string Click Go or press F5 to resume the program code You should observe the word STATIC appear on the second LCD line to be gradually replaced with the string TESTTEST The program then reverts the LCD back to the original message of RX610 The program then enters the infinite while loop and continues to operate the TimerADC flash interrupt service routine ISR This is the extent of the tutorial code For further information on the RPDL function calls used in the tutorial sample please refer to Renesas Peripheral Driver Library User s Manual Chapter 8 Additional Information For details on how to use High performance Embedded Workshop HEW refer to the HEW manual available on the CD or from the web site Further information available for this product can be found on the Renesas website at http www renesas com renesas_starter_kits General information on Renesas Microcontrollers can be found at the following websites Global http www renesas com Regional English language sites can be
5. FFFEOS30 cid HardwareSetup void 6l 62 FFFEOS90 63 FFFE0593 64 FFFEO556 mo FFFE0599 ConfigureQutputPorts ConfigureInterrupts EnableFeripheralModules 66 67 JOE ORO RR RRE e RE RETE RTRT FEET REPERTI 63 nd of HardwareSetup 63 oR RR RR ee 70 FUNC COMMENT 7 amp amp amp amp amp amp amp eee ee ee ee ee eee Outline ConfigureOperatingFrequency Description Configures the clock settings for each of the device clocks Argument none Return value none FUNC COMMENT END se e ve vie ie We We We ee ie vie ee eee ree e SE SE e e e eee rire SE e e e VE e e e e e e e e e e e void ConfigureOperatingFrequency void Modify the MCU clocks R CGC Set 12 5E6 100E6 SOE6 25E6 PDL CGC BCLK DISABLE Clock Description Frequency Main Clock FrequencCy 12 5MHz Internal Clock Frequency 100MHz Peripheral Clock Frequency SOMHz External Bus Clock Frequency 25MHz posi vie ve e ve vl ie SS SE Se Se e e e e e e SE e le e e e e SE SE Se Se le de SS SE Se SE E dE E ES SE SE Se SE E i e SE SE SE Se Se dE e E SE SE Se Se ve dE i e E SE Se ve le SE le VE VE E End of ConfigureOperatingFrequency vie eee ee Se e de e ieee SE Se e E ieee SE E SE e E SS SE SE e eee eee eee SE SE SE SE E E E E eee 11 The ConfigureOutputPorts function uses the R_IO_PORT_Set API function to simplifies setting the data direct
6. accessed from the Global site or directly by going to Europe http renesas eu Americas http america renesas com Asia http sg renesas com Renesas Starter Kit for RX610 Tutorial Manual Publication Date Rev 1 02 29 Mar 2010 Published by Renesas Technology Europe Ltd Duke s Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH United Kingdom 2009 Renesas Technology Europe and Renesas Solutions Corp All Rights Reserved Renesas Starter Kit for RX610 Tutorial Manual stENESAS Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J1918 0102
7. an external power source taking care to ensure the correct polarity and voltage The Quick Start Guide provided with the Renesas Starter Kit board gives detailed instructions on how to connect the E1 to the host computer The following assumes that the steps in the Quick Start Guide have been followed and the E1 drivers have been installed e Fit the LCD module to LCD connector on the board so it lies above J4 Ensure all the pins of the connector are correctly inserted in the socket e Connect the E1 debugger to a free USB port on your computer e Connect the E1 Debugger to the target hardware ensuring that it is plugged into the connector marked ET e f supplying external power to the board this can be turned on now 5 3 Connecting to the target with the E1 This section will take you through the process of connecting to the device programming the Flash and executing the code e Select the SessionRX600 E1 E20 SYSTEM firmao debug session Device c cation e Click the lt Connect gt button on gg 3 l l REGo H the debug toolbar MCU group RX510 Group Device R5F56107 Mode Please note that the Emulator Mode wizard shown here will only appear the FIRST time you o Debugging mode connect to the target within a project On Rotos check that the emulator ie subsequent connections the Emulator Setting dreconnected tom ME WWser system ard bur on Bowen ton E emalata dialog will a
8. the program once first and then continue to the review section el t Tr Chapter 7 Reviewing the Tutorial Program This section will look at each section of the tutorial code how it works and how it could be altered to be implemented into more complex code It is recommended that a copy of the RX610 API Manual is made available as the tutorial program uses RPDL and it is outside the scope of this manual to fully document the API system 7 1 Program Initialisation Before the main program can run the Microcontroller must be configured The following parts of the tutorial program are used exclusively for initialising the RSK device so that the main function can execute correctly The initialisation code is run every time the device is reset via the reset switch or from a power reboot Ensuring the tutorial program has been downloaded onto the RX610 press the Reset CPU button on the Debug Tool Bar Reset CPU Line Source Ad O S Source 95 Outline PowerOn Reset PC 96 Description Power on reset program Entry point af e he File window will open the Tutorial code at di 98 Return value none z 99 FUNC COMMENT A the entry point An arrow and a yellow 100 pragma entry PowerON Reset PC 101 FFFE93E8 gt I I Iti 102 highlight marks the current position of the 103 FFFE93F6 set intb unsigned long sectop C VECT 104 FFFE93FF set fpsw FPSW init program counter 105 106 FFFE9
9. 406 _INITSCT 107 LI 4 ro r r e Use these buttons to switch between source rE i a ee RE AAA 110 errno 0 Remove the comment whi disassembly and mixed modes i 111 srand UINT 1 Remove the comment whi 112 _siptr NULL Remove the comment whi 1433 114 FFFE940A HardwareSetup Use Hardware Setup 115 FFFES40E nop 116 117 _CALL INIT Remove the comment when you u 118 119 FFFE940F set psw PSW init Set Ubit Ibit for P 120 Ensure the view is switched to source before 121 FFFE9417 Change PSW PM to UserMode Change PSW PMbit Sup 122 1 i 123 FFFE942C main continuing 124 125 _CLOSEALL Use SIM I C 126 127 _CALL END Remove the comment when you u 128 129 FFFE9430 brk 130 a ls ju l ps E RR RR RR RE RR RR RR RR e e e RR e e e RR e e Se Se Se Se Se SE SE Se Se SE Se Se SE Se Se i Se Re VE E 10 Highlight the HardwareSetup function call by left clicking to the right of the text and holding the left mouse button and dragging over to the left of it and releasing the left mouse button Click the Go to Cursor button to run the program up to this point Then click Step In PIP P ELEMENTS The program counter should now move to the This function groups together several key functions HardwareSetup function definition that are used to ensure the device is setup correctly before the main program is ex
10. A LA A E LA LA A i LA A A LA A E LA A a A A A A LA A E EEA E EE EEEE VE NE nd of function THR Callback vie rie vie i i RR i i RR e RR RR SR mo RE RR ko E RE RE RR E RR ko ko SR ko RO OOOO E RO f e Return to the main c file and insert a software break point at the TimerADC function call by double 88 Begins the clicking in the S W Breakpoints column in line with 89 FFFF3237 TimerADC a the function e Click Go or press F5 to resume the program then push switch 1 to proceed The program should halt at the breakpoint set on the TimerADC function call Press Step In to single step into the TimerADC function e The TimerADC function configures both the timer and the ADC peripheral so that every timer period triggers an AD conversion and AD conversion completion triggers the callback function ADC_callback 15 Oia 69 TO 71 12 13 74 Ta Te TI 18 TS a al 82 83 64 Ba a6 130 131 132 133 134 Lau 136 137 138 T29 140 141 142 143 144 145 ALU LIE LI L z Tore Return value none EONC COMMENT END iei RR n ee ee ee ee a a RO e RR RR e e E RR OOO RO le e e e e FFFF3654 oid TimerADC void FFFFI664 FFFF3667 FFFFI664 FFFFI683 FFEFIGSC f Call the Timer start function f Call the ADC start function StartaADC ft Disable switch interrupts R INTC ControlExtInterrupt PDL INTC IRQ3 PDL INTC RISING PDL INTC DISABLE R INT
11. C ControlExtInterrupt PDL INTC IRQ8 PDL INTC RISING PDL INTC DISABLE R INTC ControlExtInterrupt PDL INTC IRQ9 PDL INTC RISING PDL INTC DISABLE ii di nd TimerADC function IIA A A LA A LA LA A A A i A A LA A A A A e Scroll down to find the ADC_callback function and insert a breakpoint at the start of the function Right click the variable ad_value in the function R ADC 10 Read and select instant watch then click add to the dialog box that follows e Click Go or press F5 to resume the program Once the timer period ends the function will be called and the program counter will halt at the breakpoint e The ADC_callback function first fetches the ADC value and then calls the ToggleLEDs function to toggle the output to the LEDs The callback function then reconfigures the timer period by the value of the ADC thus changing the frequency of the flashing lights e Press F5 again to allow the program to complete a loop Check the value of the watched variable ad value e Remove the breakpoint at the ADC_callback function before continuing Return value none me ETNO COMMENT An FFFESTS2 Y void ADC callback void FEFF3T932 FFEFF376B FFFFS TOF f Fetch ADC value ft Toggle LEDs ToggleLEDs ft Start a new timer delay R_TMR ControlUnit 1 PDL TMR TIME CONSTANT A 0 ad value 0xF 0 EIA nd ADC callback function AIDA eee LA i LA A A A LA A SE Se E Er
12. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry LENESAS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website 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 1s granted he
13. WWWWWWWW WKWWKWkWWWWWWWWWWWwwwj oid FlashLED void PDL function creates a timer to flash the LEDs at 1Hz TMR Callback 5 While loop keeps the function waiting while 1 ft Checks if the flash count has been reached or if a button has been pressed if KeyPress Flash count gt Ox190 Reset the KeyPress flag variable EevPress 0 f Exit from the while loop break i Destroy Timer R TMR Destroy 1 I Jor Roo eo i e te or ooo ooo oo ooo oe ee e Insert an event point on the TMR_Callback void function call in the FlashLED c file then press Go to resume the software When the timer reaches the end of the period an interrupt will call the TMR_callback function and the program counter will stop at the event point e The TMR_Callback function executes the ToggleLEDs function which simply inverts the output of the LED pins The callback function also decrements the flash_count variable which is used to ensure the FlashLED function only flashes 200 times e Remove the event point before continuing by double clicking the blue dot symbol FFFFOSSE iii FFFFOSSE FFFFOSAJ Return value none e ETNC COMMENT END EKkkEkKKKKWEKETEWWWwWWXWEwWWwwwWWwwWwWwwwwwwWwwWww amp wwwwwwwwj oid IMR Callback void Blink LEDs Decrement the flash count flash Count POTRERO A A A EEE A E A A LA LA LA A i LA A E A
14. as Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein 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 application 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 application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent 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 Computers office equip
15. e TimerADC f Begins the static variable test Statics Test ft Defines an infinite loop to keep the MCU running while 1 IIA nd main function PERRO RR ROBO E RR e i BRO BORRO BORRO BORRO ROBO BORRO BORO RO BORO RO BORO ROBO RO ROO ROBO BORO ROBO ROBO ROBO PORRO BORO RO PORRO ROO BORRO ROD PORRO BORO BORRERO RR f Support for the LCD display is included in the tutorial code We do not need to be concerned about the details of the LCD interface except that the interface is write only and so is not affected if the LCD display is attached or not e Inserta event on the FlashLED function call in the a 78 Begins the file main c 79 FFFE2ZCEF FlashLED sN e Press Go to run the program up to the event then f El mh mav press Step In to move the program counter to the beginning of the FlashLED function definition e Review the FlashLED function The function uses the R TMR CreatePeriodic API function to set a timer with a callback function Every period duration of the timer will call the callback function TMR_callback at interrupt level 14 no a7 BB 69 20 81 92 as G4 95 36 I 98 og 100 101 102 103 104 105 106 107 108 109 110 111 112 123 124 125 126 127 128 129 130 131 132 133 134 135 FFFFO4DE FFFFO4DF FFFFOSS4 FFFFOSSA FFFF0S78 FFFF0S8B r KETUrn VALUE none ETNO COMMENT END F E KKKKKKEKKKKEWWWWWWWWWKKWWKWW
16. ecuted You should be viewing the hwsetup c file currently Scroll down and review the different setup functions used The ConfigureOperatingFrequency function is greatly simplified here with the use of the R_CGC_Set API function which configures all the device s clocks in a single function 99 e FUNC COMMENT END 4 EERE EERE EERE EEE EERE EERE ERE EE EEE EY 100 pragma entry PowerON Reset PC 101 FFFE93E8 gt 102 103 FEFE93F6 104 EFFESSEF set_intb unsigned long sectop C VECT set fpsw FPSW init 105 106 FFFE9406 _INITSCT 107 108 ff INIT IOLIB Use SIM I C 109 110 errno 0 Remove the comment when voi 113 srand UINT 1 Remove the comment when you 112 _siptr NULL Remove the comment when yo 113 114 FFFE940A Use Hardware Setup nop 115 FFFE940E 116 a la lej _CALL INIT Remove the comment when you use glc 118 119 FFFE940F set_psw PSW init Set Ubit amp Ibit for PSW 120 121 FFFF9417 Channe PSW PM tn DImerMnde 1 Channe PSW PMhit SunerViar wu Pi ee MAA 51 finclude hwsetup h 52 33 54 FONC COMMENT 84 88 RR RO RO RO RO BORO ORO RO ROBO RO RO RO BORO FORO RO RO roke RO 55 Outline HardwareSetup 56 Description Contains all the setup functions ct JJ Argument none 58 Return value none 59 w ETNO COMMENT END i re 8 eee ee ee ee ee ee ee ee ee R RI bO
17. et PDL IO PORT 0 0 PDL IO PORT INPUT PDL IO PORT INPUT BUFFER ON 0 0 R IO PORT Set PDL IO PORT 0 1 PDL IO PORT INPUT PDL IO PORT INPUT BUFFER ON 0 0 R_IO PORT Set PDL IO PORT 1 3 PDL IO PORT INPUT PDL IO PORT INPUT BUFFER ON 0 0 f Configure the ADC Pot input R IO PORT Set PDL IO PORT 4 0 PDL IO PORT INPUT 0 0 0 12 7 2 Main Functions This section will look at the program code called from with the main function and how it works E imer_Capture Ty Timer_CMT Ig Timer_Event Timer Mode a T EJ e Find the main c file from the file tree on the left EH n H hand side then right click it and select Open Tutorial main c fC header file Sy C source file E E POL RSK eo kus Samples Po ke flashLED c Open main c e Place an event at the call to main by double clicking in the On Chip Breakpoint column next to the line to stop at NB Two event points will appear because they share the same source address Note The El emulator features advanced logic based event point trigger system and full instruction on its use is outside the scope of this tutorial For further details please refer to the RX Family E1 E20 Emulator User s Manual 76 Argument none TT Return value none 78 FTUNC COMMENT END 7 rte y y y yi k k e k y k i ee k i k k k ef 79 FFFF3212 80 81 82 FFFF3212 83 84 85 FFFF3216 86 FFFF3224 oid main void
18. ev FPGA Info FPGA Status UNCONFIGURED User VOL 0 004 Target Board CONNECTED Configuration of hardware IW Close the dialog box when the connection is completed Bose Configuration Properties x Intemal flash memory overwnte Extemal flash memory MCU System Operating mode Mode Single chip mode pl Endian teenin 5 Input clock EXTAL 125000 MHz Extemal memory areas Work RAM start address 0400 3000 bytes used OK Cancel Do not show this dialog box again Now is a good time to save the High performance Embedded Workshop session If you have changed any workspace settings now is a good time to save the workspace Chapter 6 Downloading and Running the Tutorial 6 1 Downloading the Program Code Now the code has been built in HEW it needs to be downloaded to the RSK Now that you are connected to the target you should see an additional category in the workspace view called Download Modules a MM Download GI WOT Download Debug Data Only Unload D iiias resetpro c e Right click on the download module listed and i i Sabina switch C select Download Download modules e On completion the debugger and code are ready to be executed 6 2 Running the Tutorial Once the program has been downloaded onto the RSK device the program can be executed Click the Reset Go button to begin the program It is recommended that you run through
19. hop HEW allows the project to be configured such that certain files may be excluded from each of the build configurations This allows the inclusion of the debug monitor within the Debug build and its exclusion in the Release build Contents of common C files are controlled with defines set up in the build configuration options and ifdef statements within the source files Maintaining only one set of project files means that projects are more controllable Chapter 4 Project Workspace 4 1 Introduction High performance Embedded Workshop is an integrated development tool that allows the user to write compile program and debug a software project on any of the Renesas Microcontrollers High performance Embedded Workshop will have been installed during the installation of the software support for the Renesas Starter Kit product This manual will describe the stages required to create and debug the supplied tutorial code 4 2 Starting HEW and Connecting the E1 Debugger To look at the program start High performance Embedded Workshop from the Windows Start Menu Open a new tutorial workspace from the File gt New Workspace menu or select Create a new project workspace when presented with the Welcome dialog New Project Workspace Ei sii IE Application Demonstration Fy Empty Application a e Library l RSKRX610 Debugger only RX600 E1 E2 Tool chain Renesas RX Standard o cu
20. igeability check None Note For the purposes of the tutorial leave all options at default Options C C cpu rx600 patch rm 610 include PROJDIR PROJDIR ARPDL change_message information 6 101 516 63 5 When complete close the dialog box by clicking OK 5 1 Building Code There is a choice of three shortcuts available for building the project 1 Selecting the Build All tool bar button This will build everything in the project that has not been excluded from the build This includes the standard library 2 Selecting the Build tool bar button This will build all files that have changed since the last build The standard library will not be built unless an option has been changed 3 Pressing F7 This is equivalent to pressing the Build button described above e Build the project now by pressing lt F7 gt or pressing one of the build icons as shown above During the build each stage will be reported in the Output Window The build will complete with an indication of any errors and warnings encountered during the build 5 2 Connecting the debugger For this tutorial it is not necessary to provide an external power supply to the board The power will be obtained from the USB port Please be aware that if you have too many devices connected to your USB port it may be shut down by Windows If this happens remove some devices and try again Alternatively provide
21. iles in this project will appear in High performance Embedded Workshop e Toview the file main c double click on the file in the Workspace window A new window will open showing the code 4 3 Build Configurations and Debug Sessions The workspace that has been created contains two build configurations and two debug sessions The Build Configuration allows the same project to be built but with different compiler options The options available to the user are described fully in the High performance Embedded Workshop Manual 4 3 1 Build Configuration The build configurations are selected from the left hand drop down list on the tool bar The options available are Debug and Release The debug build is configured for use with the debugger The Release build is configured for final ROM able code A common difference between the two builds may be the optimisation settings With Optimisation turned on the Debugger may seem to execute code in an unexpected order To assist in debugging it is often helpful to turn optimisation off on the code being debugged e Select the Debug Build Configuration SessionAx600_E1_E20_ 4 3 2 Debug Session The debug sessions are selected from the right hand drop down list on the tool bar The options vary between Renesas Starter Kit types however one will always start Debug and include the type of debug interface The alternate selection will be SessionRX600_E1_E20_ SYSTEM The purpose
22. ion and port control registers The first set of commands set all pins to be outputs This is to ensure each pin is in a defined state before the main program runs since after Reset the data direction register is undefined The next set of commands individually sets different pins to be inputs This section can be changed as required and since a large number of the pins on the RX610 are multiplexed with many other functions different port directions will be required for different programs The current settings are to set default input intended pins as inputs for correct operation of the tutorial program oid ConfigurebutputPorts void f Configure the LED control pins R_IO PORT Set PDL IO PORT 8 3 PDL IO PORT OUTPUT 0 0 0 R_IO PORT Set PDL IO PORT 8 4 PDL 10 PORT OUTPUT 0 0 0 R_IO PORT Set PDL IO PORT 3 3 PDL IO PORT OUTPUT 0 0 0 R_IO PORT Set PDL IO PORT 3 4 PDL IO PORT OUTPUT 0 0 0 R IO PORT Write PDL IO PORT 8 3 1 R_IO PORT Write PDL IO PORT 8 4 1 R_IO PORT Write PDL IO PORT 3 3 1 R IO PORT Write PDL IO PORT 3 4 1 f Configure the LCD control pins R IO PORT Write RS PIN 0 R_IO PORT Write E PIN 0 R IO PORT Write PDL IO PORT 9 0x00 R IO PORT Set PDL IO PORT 9 OxFO 0 0 0 R IO PORT Set PDL IO PORT 8 5 PDL IO PORT OUTPUT 0 0 0 R IO PORT Set PDL IO PORT 8 6 PDL IO PORT OUTPUT 0 0 0 ft Enable the push switch inputs R IO PORT S
23. ment 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 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 Although Renesas Electronics endeavors to improve the quality and reliability of 1ts products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certai
24. n 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 Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility 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 This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office 1f you have any questions regarding the information contained in this document or Renesas Electronics
25. of the debug sessions is to allow the use of different debugger tools or different debugger settings on the same project e Select the session SessionRX600_E1_E20 SYSTEM Debug Chapter 5 Building the Tutorial Program The tutorial project build settings have been pre configured in the tool chain options To view the tool chain options select the Build menu item and the relevant tool chain This should be the first option s on the drop down menu The dialog that is displayed will be specific to the tool chain selected The Configuration pane on the left hand side Will free zjx exist on all the tool chain options It is important Configuration C C Assembly Link Library Standard Library CPU _4 gt Debug FXE00 E1 E20 SYSTE gt when changing any setting to be aware of the e Category Source a a All Loaded Projects current configuration that is being modified If you S Tutorial ees on l 2 C source file Source file wish to modify multiple or all build configurations H E C source file HL Assembly source file Language this is possible by selecting All or Multiple from the Linkage symbol file C cices C P C ki Configuration drop down list Input character code suis TT Allow comment nest e Review the options on each of the tabs and Category drop down lists to be aware of the options available Interchar
26. ppear please choose the same Writing the on chip flash memory mode O Esecute he Weer program atten ending he denugaen options to connect e Select the correct MCU Group type RX610 Group illustrated e Select the correct device type R5F56107 Power tanei fron the emulator MES Are 394 Go illustrated e Select Debugging mode Connecti Serial No Refresh e If the El is to provide power to the CPU board select Power Target from Emulator and choose the 3 3V option Otherwise connect a 5V centre positive supply c Do not show this dialog box again Click the Communication tab and ensure the JTAG Clock is set to 16 5MHz Once these settings have been confirmed click the lt OK gt button to continue The Flash Memory write program will downloaded to the target Once the debugger has connected the configuration properties dialog will appear Keep the default settings and click lt OK gt The output window in High performance Workshop will show Connected Note The connection to the target will active the debugger buttons on the High performance Embedded Workshop toolbar e Select File Save Session e Select File Save Workspace Initial Settings Edi Device Communication JTAG JTAG Clock 16 5 LEVELO Wer 1 00 00 000 LEVELT Yer 1 00 00 003 COMMUNI DLL 205 00 000 Board Revizion El F
27. products or if 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 E T D ma T lt D O Renesas Starter Kit for RX610 Tutorial Manual Renesas Single Chip Microcomputer RX Family RX600 Series Renesas Electronics WWW renesas com Rev 1 02 2010 03 Table of Contents Chapierd Preferiti acari 1 Chapter 2 INTOdUCIO EET EE oW Oooo 2 Chapters Tutonal Project Workspace le ia 3 Ghapier4 Pro eGFWVOFKSP966prii e noe i roi 4 o A ITE 4 4 2 Starting HEW and Connecting the E1 Debugger iii 4 4 3 Build Configurations and Debug Sessions i 5 AAA PR P A E 5 A O O aes oeauen essa 5 Chapter o Building the Tuona Progra 35455 33 sado aa aaa 6 S i BulldingiGode o a on o ko o eee l E ae eee 6 o 2 GONNECUNO Me CE DUGG Sle sa slide iaia 7 5 3 Connecting to the target with the El i a 7 Chapter 6 Downloading and Running the Tutorial i 9 6 1 Bownloading tne Program Gode LL bi LELLA LILLE 9 6 2 RUNNING ME PON a uo o a E NO ak kapa Skoto da is aK vela Sla Sia Ea o ko hanes a a na kir 9 Chapter 7 Reviewing the Tutorial Program
28. reby under 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 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 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 Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale 1s prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but Renes
29. sas 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 build an embedded application e How do use Renesas tools The project generator will create a tutorial project with two selectable build configurations e Debug is a project built with the debugger support included e Release build demonstrating code suitable for release in a product Files referred to in this manual are installed using the project generator as you work through the tutorials The tutorial 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 NOTE These tutorials are designed to show you how to use the RSK and are not intended as a comprehensive introduction to the High performance Embedded Workshop HEW debugger or the compiler toolchains or E1 Emulator please consult the relevant user manuals for more in depth information Chapter 3 Tutorial Project Workspace The workspace includes all of the files for two build configurations The tutorial code is common to both the Debug and the Release build configurations The tutorial is designed to show how code can be written debugged then downloaded without the debug monitor in a Release situation The build configuration menu in High performance Embedded Works
Download Pdf Manuals
Related Search
Related Contents
製品安全データシート NC-2600 Diapositive 1 農林水産省消費 ・ 安全局農産安全管理課長 products manual - Providence 1 - Festool User`s Manual Using the NVCA Phosphorus Loading Development Tool Newstar PLASMA-W040BLACK flat panel wall mount Fujifilm Camcorder J100 User's Manual Copyright © All rights reserved.
Failed to retrieve file