Home
Renesas Starter Kit for RL78L12 Tutorial Manual
Contents
1. Set a breakpoint on the first line of code inside the INT TMOO O interrupt handler Continue to execute the program by clicking the Resume button The program will halt at the breakpoint due to the timer s period elapsing Remove the breakpoint by double clicking on the breakpoint column R20UT0927EG0100 Rev 1 00 Jan 18 2013 Flash all available LCD segmenta 5 Flash LCDi1 Begins the ADC warying flash sequence 5 Timer ADCII L Project Expl E n Outline O AS gt a r cg rte h ie reg timer userc gt r_cg_timer_user h Le r cg timerc h reg timer h void IHT TMOO void i Toggle the heart symbol 5 Toggle Symbaalit void IHT THOO void Toggle the heart symbol Toggle Symboli LENESAS Page 18 of 24 RSKRL78L12 4 Reviewing the Tutorial Program e Press F8 to resume program execution mi okok EO OR KOR KOK KOK KOKON ee i ie i a y Function Name statics test o Observe the string on the bottom line Description Displays an initialised string then modifie of the LCD panel change one Finally RL78 is displayed character at a time from RL78 to Nero eee akcio i Return value None L12 as the statics test function IS EAT AA RARE RARA AA RARE RARA RARA ERA RARA ERA AAA RAE AAA AAA E RARA EAN executed void statics test void e After all characters have been i f Declare loop count variab
2. e The debug configurations for each project will appear Select the entry for the EET TTT TTT tutorial project type filter text F Press the Wew button E C C Application fe C C Attach to Application fe C C Postrmorterm Debugger E Custom Debug Ze Press the Filter buttor Ex Debug only fc GDB Hardware Debugging kluj GHS Local C C Launch ex HEW Debugging Configure launch perspecti Es Renesas GDB Hardware Attach b E Renesas GOB Hardware Debuggir E Renesas GDE Simulator Debuggir Press the Duplicate bu MM Press the Delete butte Edit or views an existing R20UT0927EG0100 Rev 1 00 ENESAS Page 12 of 24 Jan 18 2013 R20UT0927EG0100 Rev 1 00 Jan 18 2013 RSKRL78L12 The debug configurations control page will then show for the tutorial project Change the main tab to Debugger and then select Connection Settings on the secondary tab bar that appears There is no need to change the debugger settings as they are preconfigured with the tutorial project however if you intend to use an external power supply set the Power Target From The Emulator option to No drop down menu Refer to the RSKRL78L12 User s Manual for details of power supply configuration Note e studio will display a warning if you attempt to connect with an incorrect power supply setting Click the Debug button to continue e studio will now connect
3. suitable location to store your M workspace using the Create New Folder option as necessary Click OK Select a workspace Use this as the default and do not ask again Cancel e Click Yes when presented with the Administrator Privilege dialog box ES Administrator Privilege Administrative privileges are required for correct operation of esstudio on Windows 1 Please ensure you have appropriate privileges Le Right click eZstudio exe and choose Run as Administrator Do you wantto continue e The estudio welcome splash Bes Leo to mt screen will appear Click the Go Gws pa to the workbench arrow button on the far right circled in the screenshot opposite Welcome e2 stud LI P RENESAS R20UT0927EG0100 Rev 1 00 2CENESAS Page 9 of 24 Jan 18 2013 RSKRL78L12 3 Project Workspace e Once the environment has initialised right click in the Project Explorer window and select Import e The Import dialog box will now show Expand the General folder icon and select Existing Projects into Workspace then click Next R20UT0927EG0100 Rev 1 00 Jan 18 2013 C C ezstudio File Edit Source Refactor Navigate Sez Mew Import Export Refresh ez Import nea Select Create new projects from an archive file or directory select an import source type
4. products or systems that may pose a direct threat to human life or bodily injury artificial life support devices or systems surgical implantations etc or may cause serious property damages nuclear reactor control systems military equipment etc 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 for which it is not intended 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 which the product is not intended by Renesas Electronics 6 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 7 Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Further Renesas Electronics products are not subject to radia
5. simple instructions to setup the RSK and RSKRL78L12 Quick R20UT0928EG run the first sample on a single A4 sheet Start Guide Schematics Full detail circuit schematics of the RSK RSKRL78L12 R20UT0921EG Schematics Hardware Manual Provides technical details of the RL78 L12 RL78 L12 Group RO1UHO330EJ microcontroller Hardware Manual 2 List of Abbreviations and Acronyms Abbreviation o CI DET OD Lai Otal Display ED lit Emitting Diode 62467 Mu 700 Men Ut OOOO PIM Pulse With Modulation 60707 RK mesas Start KE SAY Seal Array Unit Table of Contents lt A 7 lal PUIOSE a E E AA AAA ANA AA 7 lia EGAIUTOS suon ka eS e KVE KG MAK Sven Weider apne dementia KS GUS a adenine 7 O CAEL des 8 21 Note Regarding Source Ode usas uu areno da 8 SHPTOJECI VV OMKSD ACC AOS 9 Sa o e Rr eo mre eo a tae Ceres a ge ane ER a eee core re 9 3 2 Starting estudio and Importing Sample Code c csecececesescssecececesesescecevevecacevereevevevavavaverereevevevaveveneneneevens 9 3 3 Build Configurations and Debug SESSIONS ccceeeecceceseeeeeeeeeaeeeeeeeeeaaeeeeeeeeseaeeeeeessaaeceeessaaeeeesessaeeeees 12 34 RUNNINO Me LUTO oros ebo a efo LO ke Sn ebe o UE ewes Een ase cnt knuj 14 4 Reviewing the Tutorial Program csss sssssssscssssssssesuscenasnunsennseensvo 15 Al PIOJKAMPINIUANSA ON ir A AA ka ko Eb LO ko Nv da 15 42 Mal FUNGIONS su so ku NR o a Sa Ero asda se
6. Cc T D TS 0 D RL78 L12 Group Renesas Starter Kit Tutorial Manual For e studio RENESAS MCU RL78 Family L1X Series All information contained in these materials including products and product specifications represents 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 Renesas Electronics Corporation through various means including the Renesas Electronics Corporation website http www renesas com Renesas Electronics www renesas com Rev 1 00 Jan 2013 Notice 1 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 2 Renesas Electronics has used reasonable care in preparing the information included in this document but Renesas 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 3 Renesas Electronics do
7. SK is not guaranteed to be error free and the entire risk as to the results and performance of the RSK is assumed by the User The RSK is provided by Renesas on an as is basis without warranty of any kind whether express or implied including but not limited to the implied warranties of satisfactory quality fitness for a particular purpose 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 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 Its use outside the laboratory classroom study area or similar such area invalidates conformity with the protection requirements of the Electromagnetic C
8. The E1 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 E1 Emulator User s Manual R20UT0927EG0100 Rev 1 00 LENESAS Page 19 of 24 Jan 18 2013 RSKRL78L12 5 Additional Information 5 Additional Information Technical Support For details on how to use e studio refer to the help file by opening estudio then selecting Help gt Help Contents from the Window menu bar e GE Welcome 97 Help Contents TP Search Dynamic Help Parts of the sample code provided with the RSKRL78L12 can be reproduced using the Applilet3 for RL78 L12 code generator tool Applilet can be downloaded from the Renesas website Source files and functions generated by Applilet are prefixed with r and R_ respectively For information about the RL78 L12 series microcontrollers refer to the RL78 L12 Group Hardware Manual For information about the RL78 assembly language refer to the RL78 Series Software Manual Technical Contact Details Please refer to the contact details listed in section 8 of the Quick Start Guide 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 companies or organisations Copyright This document ma
9. am counter should now move into the Flash LCD function definition This function activates a timer to periodically poll the user switches and flashes all the LCD segments 200 times or until a user switch has been pressed e Click the Resume button to resume program execution f Declare loop count variables volatile uintse t led delay luz volatile uinto t flash count Qu f4 Turn off all segmenta 5 LCD DISPLAY OFF f Enable 3W1 interrupts 57 E intel starti f Start timer used to poll swithces We and sls as they are not connected to interrupt enabled pins r tau channel start f4 Flash the LEDS Teme EIE re ete Uru I el Le saut als Jamas while FALSE q switch flag flash count FLASH COL 1 LED flashing Delay for led delay O led delay lt LED FLASH DELAY led dele i Delay R20UT0927EG0100 Rev 1 00 LENESAS Page 17 of 24 Jan 18 2013 RSKRL78L12 4 Reviewing the Tutorial Program The program counter should come to a halt at the Timer ADC function Step over the function by clicking the Step Over mi button Alternatively press mi F6 The Timer_ADC function starts a continuous A D conversion and a periodic timer whose period is up dated with the ADC result This timer is used to flash the heart symbol on the LCD panel at a variable rate Open the r_cg_timer_user c file using the Project Explorer on the right hand side
10. ancel on the left hand side gt ES Tutorial R20UT0927EG0100 Rev 1 00 LENESAS Page 11 of 24 Jan 18 2013 RSKRL78L12 3 Project Workspace 3 3 Build Configurations and Debug Sessions 3 3 1 Build Configuration The e studio workspace will be created with two build configurations HardwareDebug and Release Release This build mode has optimisation turned on and provides little debug information The C code execution may appear to be out of order due to the way compiler optimises the code This build configuration is intended for final ROM programmable code HardwareDebug This build mode has all optimisation turned off and provides full debug information This is the best configuration to use whilst developing code as C code execution will be linear and then the arrow next to the build button hammer icon Y 1 HardwareDebug and select the a HardwareDebug option e e studio will now build the code e Click the top level Tutorial folder again Apr t O Q 2 Release 3 3 2 Debug Configuration e Click the arrow next to the debug button bug icon Select Debug wey O G ay 7 Configurations no launch history Debug As Debug Configurations Organize Favorites e The Debug Configurations dialog box will E EEE Continue appear Click the small arrow next to the Renesas GDB Hardware Debugging Create manage and run confiqurations option
11. d a E ak SON a NOS SL Vu sdis ao rado 17 5 Additional Information s s s s s s sssssses ssssesesscsssssusssnsnnssunssntqunsss 20 ENESAS RSKRL78L12 RENESAS STARTER KIT 1 1 1 Overview Purpose R20UT0927EG0100 Rev 1 00 Jan 18 2013 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 The RSK board contains all the circuitry required for microcontroller operation Renesas microcontroller programming User code debugging User circuitry such as switches LEDs and a potentiometer Sample application Sample peripheral device initialisation code R20UT0927EG0100 Rev 1 00 Jan 18 2013 RENESAS Page 7 of 24 RSKRL78L12 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 compile link download and run a simple program on the RSK e How do 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 tutorial examples in this manual assume that installation procedures described in the RSK Quick Start Guide have been com
12. es 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 any patents copyrights or other intellectual property rights of Renesas Electronics or others 4 You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration modification copy or otherwise misappropriation of Renesas Electronics product 5 Renesas Electronics products are classified according to the following two quality grades Standard and High Quality The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots etc High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anticrime systems and safety equipment etc Renesas Electronics products are neither intended nor authorized for use in
13. f 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 cycle e After downloading the code switch back l Timer_Capture to the C C perspective and navigate to E Timer Eveni the Project Explorer window on the left hand side JE Tutorial AA me nr oo e Expand the Tutorial folder by clicking on the arrow next to the folder icon as highlighted by the red circle e Click the arrow next to the src folder to a Tutorial show the source files yr ales e Double click on hardware_setup c to El Archives open the file IU Includes 2 HardwareDebug a 2 Src ie hardware_setup c y hardware_setup h e Breakpoints can be set by double clicking at the left hand edge of the source AA eD window On the line with instruction t r system init double click next to the Disable all interrupts vertical line to set a breakpoint asm di a r system Init Note As an alternative breakpoints may be set in the C C perspective by selecting a line and using Run gt Toggle Breakpoint e Click the Resume button in the Renesas vYO1d Hardraresetupivold Debug perspective or press F8 to run pl the code up to this breakpoint l ft Disable all interrupts LR asm di r system init 1 Note The p
14. filter text a 2 General E Archive File TO Existing Projects into Workspace II File System def HEW Project E Preferences p C C gt Ge CVS gt Run Debug b Team LENESAS Page 10 of 24 RSKRL78L12 3 Project Workspace e The Import dialog box will allow you to specify a project to import Click the Browse button and locate the following directory C Workspace RSK RSKRL78L12 e Ensure that the Copy projects into workspace option is ticked and then click Finish e Click on Tutorial from the list of projects in the Project Explorer Import Projects select a directory to search for existing Eclipse projects ES Import 0 e Select root directory CoWorkspaceARSFARSERL78L12 D Select archive file Projects ADC OneShot CAM orkspacesRSKKRSERLTGELIA ADO Oneshot ADC Repeat CAMWorkspaceRSKARSKRLTBELIA ADO Repeat 1 Application CAM orkspaceVRsKARSERLTELTA Application Asvric_serial CAWVorkspace RSKORSKELTELIAMAsvro Serial DMAC CAVWforkspaceVRSRARSERLTBELLADMIA p Low Power Mode Cr Vorkspace Rsk RSERL 8LlL2 Low_Powe ETE CAMPorkspaceRSKARSERLTBLIARTOJ wnc serlal CAWVorkspaceVRSKORSKRLTELITAN Spero Serial m s M I SPI SI I si 5 mm Copy projects into workspace Working sets Add project to working sets ng sets Browse Browse Select All Deselect All Refresh Timer_Capture gt 12 Timer Event C
15. he military including but not limited to the development of weapons of mass destruction When exporting the Renesas Electronics 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 10 It is the responsibility of the buyer or distributor of Renesas Electronics products who distributes disposes of or otherwise places the product with a third party to notify such third party in advance of the contents and conditions set forth in this document Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products 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 if you have any questions regarding the information contained in this document or Renesas Electronics 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 2012 4 Disclaimer By using this Renesas Starter Kit RSK the user accepts the following terms The R
16. le changed the LCD panel s second wintS t count Ou line will return to displaying RL78 Turn off all LCD segments 5 e The LCD panel will also display a LCD DISPLAY OFF real time clock counting up from y p 00 00 00 This is operated by an Delay interrupt in the file r_cg_rtc_user c Display Panel Delay OxeFFFF the analysis of which is outside the Begin for loop which writes one letter of gConstStr to scope of this manual The nested while loops generate the delay between each for count lu count lt STRING SIZE count 1 Copy the bytes from gConstStr to gReplaceStr one by q replace str count q const str count Display the updated string on the LUD Casting to ensure use of correct data type Display Panel Sstring PANEL LCD LIMEI ints t q repl Delay Display Panel Delay OxeFFFF f ELTS family name is displayed on the LCD Display Panel String PANEL LCD LINEI into t RLYS i AREA ARA RARA ARA RARA RAR RARA RARA okok kok koko kok KOK RARA RARA NARRAR End of function statics test Tho ve o e AAA AEREA AAA o ae e i e e no o e e Moo A ie e o i o a o e AA kk o e ke a ta e o o a o ke o a o AAA program execution e This is the extent of the tutorial code e Press the Suspend button to halt nn For further details regarding hardware configuration please refer to the RL78 Series Software Manual and the RL78 L12 Group Hardware Manual
17. ompatibility 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 equipment 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 in 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 phenomena 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 regulatory standards for an end product How to Use This Manual 1 Purp
18. oor 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 Electronics Taiwan Co Ltd 13F No 363 Fu Shing North Road Taipei Taiwan Tel 886 2 8175 9600 Fax 886 2 8175 9670 Renesas Electronics Singapore Pte Ltd 80 Bendemeer Road Unit 06 02 Hyflux Innovation Centre Singapore 339949 Tel 65 6213 0200 Fax 65 6213 0300 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 2013 Renesas Electronics Corporation All rights reserved Colophon 1 3 RL78 L12 Group LENESAS Renesas Electronics Corporation R20UT0927EG0100
19. ose and Target Readers This manual is designed to provide the user with an understanding of how to use the e studio IDE to develop and debug software for the RSK platform It is intended for users designing sample code on the RSK platform using the many different incorporated peripheral devices The manual comprises of step by step instructions to load and debug a project in e studio but does not intend to be a complete guide to software development on the RSK platform Further details regarding operating the RL78 L12 microcontroller may be found in the RL78 L12 Group Hardware Manual and within the provided sample code 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 The following documents apply to the RL78 L12 Group Make sure to refer to the latest versions of these documents The newest versions of the documents listed may be obtained from the Renesas Electronics Web site User s Manual Describes the technical details of the RSK hardware RSKRL78L12 R20UTO926EG User s Manual Tutorial Provides a guide to setting up RSK environment RSKRL78L12 R20UT0927EG running sample code and debugging programs Tutorial Manual Quick Start Guide Provides
20. pleted 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 the compiler toolchains or the E1 emulator Please refer to the relevant user manuals for more in depth information 2 1 Note Regarding Source Code Due to the project generator it is possible that line numbers for source code illustrated in this document do not match exactly with that in the actual source files It is also possible that the source address of instructions illustrated in this manual differ from those in user code compiled from the same source These differences are minor and do not affect the functionality of the sample code nor the validity of this manual R20UT0927EG0100 Rev 1 00 Page 8 of 24 Jan 18 2013 RENESAS RSKRL78L12 3 Project Workspace 3 Project Workspace 3 1 Introduction e studio is an open source integrated development tool that allows the user to write compile program and debug a software product on many of the Renesas microcontrollers 3 2 Starting e studio and Importing Sample Code e Start estudio by selecting it from BZ Workspace Launcher the Start Menu The first dialog box to appear will be the eZstudio stores your projects in a folder called a workspace Workspace Launcher Choose a workspace folder to use for this session e Click Browse and select a FF
21. rogram counter is indicated by the blue arrow next to the breakpoint R20UT0927EG0100 Rev 1 00 LENESAS Page 15 of 24 Jan 18 2013 RSKRL78L12 e Click the Step Into button or press F5 to step into the zt R_Systeminit function a e The R_Systeminit function calls several initialisation functions which configure the MCU for normal operation This includes input output ports and system clocks e The user can step through all the initialisation code by clicking the Step Into icon and reading the code however for the purpose of this manual it will be skipped e Click the Resume button to run the code up to the main function For further details regarding hardware configuration please refer to the RSKRL78L12 User s Manual and the RL78 L12 Group Hardware Manual R20UT0927EG0100 Rev 1 00 Jan 18 2013 LENESAS 4 Reviewing the Tutorial Program Le hardware_setup c Le r swsteminitic 23 NR A OT SAO SIONS I ADS ANE EME DT TTA SS TO ETA NJ UL OD TEO TE AN a AE ii Global variables and functions TEREREA AAA AA EE AAA AAA EEE AAA AAA AAA KKK AAA A foko kok kk KOK KOKON KORON KOR OKOR KOKOKOKOKOK ROKO a ATTA AERA HH Function Name r system init This function initial Mone Description Argumentas Return Value None TTT TTT Aaa aa void r system init void i PIOR OxOOU r port create r cgco createi r ade create r taul createl r
22. rte create r inte createj r lcd create i CRCOCTL OxOOOU I WCTL UxOO OU i E otek kok KN ROKON KORON ROKOKO ROKO KOKOK RORO ROKOKO ROKOROKKONRRO End GOE function r aystem init i a a a a a ar a a a a a a Pea aaa a A Page 16 of 24 RSKRL78L12 4 Reviewing 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 Right click the Flash LCD function call and select Run to Line to execute the program up to this line The Init Display Panel function call enables and configures the LCD panel and Display Panel String will write RL78 onto the bottom line void main void 1 romain user initi fw Enable and configure LCD display Disable the switch s function multiplexed with the SEG32 and SEG33 pins and Init Display Panel ENABLE SW2 SUS Display the device family name on LCD Casting to ensure use of correct data type 5 Display Panel String PANEL LCD LINEI into t BLYS Flash all available LCD segmenta Flash LCD 1 e Set a breakpoint on the Timer_ADC function call by double clicking in the breakpoint column e Click the Step Into button to step into the aL Flash_LCD function f Flash all available LCD segmenta Flash LCD Begins the ADC varying flash sedquenci Timer ADC void Flash LCD void 1 e The progr
23. spective when it P 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 ES Open Perspective Fie C C default Es cvs Repository Exploring S Debug S Renesas Debug fo Resource Ed Team synchronizing Cancel iE Renee He C C Page 13 of 24 RSKRL78L12 3 Project Workspace 3 4 Running the Tutorial e Refer to the Description txt file for instructions on how to configure the RSK and run the sample code e Once the code has been downloaded click Resume to run the code to the main function The main function is set as the program entry point by default The program counter will stop on the first instruction in the main function e Click the Resume button in the Renesas Debug perspective to run the rest of the code e tis recommended that you run the entire tutorial demo first before continuing to debug it R20UT0927EG0100 Rev 1 00 LENESAS Page 14 of 24 Jan 18 2013 RSKRL78L12 4 Reviewing the Tutorial Program 4 Reviewing the Tutorial Program This section will look at each section of the tutorial code and basic debugging functionality in e studio 4 1 Program Initialisation Before the main program can run the microcontroller must be configured The following parts o
24. tion 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 systems manufactured by you 8 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 9 Renesas Electronics products and technology 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 You should not use Renesas Electronics products or technology described in this document for any purpose relating to military applications or use by t
25. to the debugger and download the code to the target After downloading the code a dialog box will appear asking if you would like to switch to the Renesas Debug perspective Click Remember my decision to prevent this dialog box from appearing in future then click Yes e studio will load the new perspective Which is optimised for debugging To change back to the default C C perspective from the menu bar select Window gt Open Perspective gt Other The Open Perpsective dialog box will appear Click on the desired perspective to select it then Ok Alternatively click on the button with the double arrow in the top right corner of the screen as shown opposite and select the C C option that appears LENESAS 3 Project Workspace Main pej Debugger Debug hardware El RL78 Target Device ROFLORLC Debug Tool Settings gt Startup Es Source ES Common GDB Settings Connection Settings Clock Main Clock Frequency MHz 20 00 Sub Clock Frequency kHz 32 168 Monitor Clock System Connection with Target Board Communication Method 1 Line Type TOOLO Power Target From The Emulator MAX 2 Yes Supply Voltage 5 0W Flash Current Security ID HEA Permit Flash Programming Yes Use Wide Voltage Mode Yes Erase Flash ROM When Starting Yes ez Confirm Perspective Switch ek This kind of launch is configured to open the Renesas Debug per
26. y 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 Limited O 2013 Renesas Electronics Europe Limited All rights reserved O 2013 Renesas Electronics Corporation All rights reserved O 2013 Renesas Solutions Corp All rights reserved R20UT0927EG0100 Rev 1 00 LENESAS Page 20 of 24 Jan 18 2013 REVISION HISTORY RSKRL78L12 Tutorial Manual Rev Description Jan 18 2013 MEM First Edition issued Renesas Starter Kit Manual Tutorial Manual Publication Date Rev 1 00 Jan 18 2013 Published by Renesas Electronics Corporation LENESAS SALES OFFICES Renesas Electronics Corporation http Avww renesas com Refer to http www renesas com for the latest and detailed information 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 651 700 Fax 44 1628 651 804 Renesas Electronics Europe GmbH Arcadiastrasse 10 40472 Dusseldorf Germany Tel 49 211 65030 Fax 149 21 1 6503 1327 Renesas Electronics China Co Ltd 7th Fl
Download Pdf Manuals
Related Search
Related Contents
"user manual" Fig.7 - Full-Traction Suspension 資料2 ヒヤリ・ハット事例等収集結果 –医療機器-(PDF HUSQVARNA AUTOMOWER® 310/315 BEDIENUNGSANLEITUNG アルミサイドケース L/R 組付・取扱説明書 Troy-Bilt 682J User's Manual Ameristep RAPTOR TRIPOD 7700 User's Manual WorkExpo 9.0 User Manual Copyright © All rights reserved.
Failed to retrieve file