Home

Renesas Starter Kit RX113 Tutorial Manual

image

Contents

1. The RSK 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 lts use outside the laboratory classroom study area or similar such area invalidates conformity with the protection requirements of the Electroma
2. 83 TTT8Bla4r R SCI1 Create 84 fff8la53 R S12AD Create 85 For further details regarding hardware configuration please refer to the RSK RX113 User s Manual and the RX113 Group Hardware Manual R20UT2760EG0100 Rev 1 00 LENESAS Page 15 of 24 Nov 30 2014 RSKRX113 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 lt is necessary to connect the RSK RL78G1C USB connection to a PC USB port and open a terminal emulation program such as HyperTerminal with the settings 19200 8 N 1 For information on installation of the RSK virtual COM port driver refer to the file Description txt in the e studio Tutorial project e Right click the a fff8lahe sa main void Refactor SCII Serial Receiv TffT8lach R_MAIN UserInit Declarations e function call and fe Start user code Do not edit select Run to Line to Display Project Title on LCL search Text execute the program up fff8lac3 RLCD DisplayPanelString PANEL to this line The mn step Into Selection Ctrl F5 i i up receive buffer R LCD DisplayPanelSt fff lad z R SCI1 Serial Receivel uint _t Make Targets ring call will write 4 Enable SCIL operations Resource Configurations TUTOR onto the LCD UTO onto the LG fff ladc R_5CT1 Starti Run to Line Ctrl R f Display Welcome Banner on Se 4 Move To Line TTTBlae3 R_5CT1 syneTr
3. Configurations e The Debug Configurations dialog box will appear Click the small arrow next to the Renesas GDB Hardware Debugging option e The debug configurations for each project will appear Select the entry for the Tutorial Hardware Debug e 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 e There is no need to change the debugger settings as they are preconfigured with the Tutorial project ee Ora reas r no launch history Debug As Debug Configurations Organize Favorites Debug Configurations Create manage and run configurations e 3 type filter text E GDB Hardware Debugging cx GDB Simulator Debugging SH RL78 RH850 duj GHS Local C C Launch t Renesas GDB Hardware Attach cx Renesas GDB Hardware Debugging Ex Renesas Simulator Debugging RX only Main Debugger gt E Startup El Common Es Source Debug hardware Target Device R5F51138 GDB Settings Connection Settings Debug Tool Settings 4 Clock Main Clock Source EXTAL Extal Frequency MHz 16 0000 Permit Clock Source Change On Writing Intern Yes 4 Connection with Target Board e For this tutorial the RSK RX113 will be Emulator powered from the E1 Emulator Refer to the RSK RX113 User s Manual fo
4. screen aS shown opposite This is the extent of the tutorial code Adjust the potentiometer and press SW3 on the RSK and an additional A D conversion will be For further details regarding hardware configuration please refer to the RX Series Software Manual and the RX113 Group Hardware Manual 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 R20UT2760EG0100 Rev 1 00 Nov 30 2014 LENESAS Page 19 of 24 RSKRX113 5 Additional Information 5 Additional Information Technical Support For details on how to use e studio refer to the help file by opening e studio then selecting Help gt Help Contents from the Window menu bar e GES Welcome 9 Help Contents Search Dynamic Help Parts of the sample code provided with the RSK RX113 can be reproduced using the Code Generator tool Code Generator is included as a plug in with e studio Source files and functions generated by Code Generator are prefixed with r and R respectively For information about the RX113 series microcontrollers refer to the RX113 Group User s Manual Hardware For information about the RX assembly language refer to the RX Series Software Manual Technical Contact Details Please refer to the contact details listed in section 8 of the Quick Start Guid
5. 1 Purpose 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 RX113 microcontroller may be found in the RX113 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 RX113 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 RSK RX113 User s R20UT2756EG hardware Manual Tutorial Provides a guide to setting up RSK environment RSK RX113 Tutorial R20UT2760EG running sample code and debugging programs Manual Code Generator Provides a
6. E Archive File la Convert CCRX to GNURX Project la DS 5 KPIT GNUARM RZ NONE Project 4 Existing Projects into Workspace I File System HEW Project El Preferences E Rename amp Import Existing C C Project into Workspace la Renesas Common Project File gt E C C gt 5 Code Generator gt amp CVS gt amp Git Ga Inctall o LENESAS Page 10 of 24 RSKRX113 3 Tutorial 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 Renesas Workspace RSK RSKRX113 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 on the left hand side Import Import Projects Select a directory to search for existing Eclipse projects O Select root directory C Renesas Workspace RSK RSKRX113 Select archive file Projects Y Application C Renesas Workspace RSK RSKRX113 Applicatio Y Async Serial C Renesas Workspace RSK RSKRX113 Async_Se Y LIN Master C Renesas Workspace RSK RSKRX113 LIN_Maste v LIN Slave C Renesas Workspace RSK RSKRX113 LIN_Slave Y Low Power Mode C Renesas Workspace RSK RSKRX113 Lov Y RTC C Renesas Workspace RSK RSKRX113 RTC System_BootLoader C Renesas Workspace RSK RSKRX113 S Y System BootLoader Application C Renesas Workspac
7. box to appear will be the Workspace Launcher e Click Browse and select a suitable location to store your workspace using the Create New Folder option as necessary Click OK e The e studio welcome splash screen will appear Click the Go to the workbench arrow button on the far right circled in the screenshot opposite RENESAS R20UT2760EG0100 Rev 1 00 LENESAS Page 9 of 24 Nov 30 2014 le Workspace Launcher xs Select a workspace e2 studio stores your projects in a folder called a workspace Choose a workspace folder to use for this session Workspace SULS ER Browse Use this as the default and do not ask again Can ar CiCee el tuko 15 Ele dt Source Pelactor ieagate Saphh Proyect Ben findow tiep pa y Weicome Welcome e2studio y N lt B m V WorkBenc orkb Go to the workbench RSKRX113 3 Tutorial Project Workspace R20UT2760EG0100 Rev 1 00 Once the environment has initialised right click in the Project Explorer window and select Import The Import dialog box will now show Expand the General folder icon and select Existing Projects into Workspace then click Next Nov 30 2014 File Edit Source Refactor Navigate Se mi A a E Project Explorer 3 Import Export Refresh Create new projects from an archive file or directory Select an import source type filter text 4 General
8. meet their specific requirement Custom code should be added whenever possible in between the following comment delimiters Start user code for adding Do not edit comment generated here End user code Do not edit comment generated here Code Generator will locate these comment delimiters and preserve any custom code inside the delimiters on subsequent code generation operations This is useful if after adding custom code the engineer needs to re visit Code Generator to change any MCU operating parameters 2 2 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 R20UT2760EG0100 Rev 1 00 AS Page 8 of 24 Nov 30 2014 ENES RSKRX113 3 Tutorial Project Workspace 3 Tutorial 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 e studio by selecting it from the Windows Start Menu The first dialog
9. of 24 RSKRX113 4 Reviewing the Tutorial Program In the terminal emulation window press the c button on the keyboard The program will halt at the breakpoint in the r scil callback receiveend function as shown opposite Remove the breakpoint by double clicking on the breakpoint column Continue to execute the program by clicking the Resume button The program will continue to run until normally Press the c button on the keyboard and observe execution stop at the breakpoint in the main while loop Remove the breakpoint by double clicking on the breakpoint column Continue to execute the program by clicking the Resume button Check for the c trigger command if C g rx char g adc trigger TRUE Display the result on the LCD lcd display adc adc result Increment the adc count and display if 16 radc count 1 adc count led display count adc count The program proceeds to display the result of the A D conversion on the LCD and in the terminal window In addition the running count of A D conversions performed is displayed in binary form using LEDs 0 3 on the RSK performed Press the Suspend button to halt program execution To change back to the default C C perspective from the menu bar select Window gt Open Perspective gt C C Alternatively click on the C C button in the top right corner of the
10. the SCI interrupts The program then proceeds to transmit a welcome banner to the serial port After the banner is displayed the program enters the main while loop the code inside the loop walts for user input from either the SCI or switch SW3 and then performs an A D conversion MD STATUS R SCI1 Serial Receive uint8 t const rx buf uintl6 t rx num MD STATUS status MD OK if rx num lt 1U status MD ARGERROR else 1 g scil rx count Bu g scil rx length rx num Ep scil rx address rx buf 5SCI1 5CR BIT RIE 1U SCI1 5CR BIT RE 1U y return status 97 f Set up SCI1 receive buffer and callback function Sa Tff81lad2 R SCII Serial Receive uints t g rx char 1 99 188 Enable SCI1 operations 25101 fff8ladc R_SCI1 Start R20UT2760EG0100 Rev 1 00 Nov 30 2014 LENESAS Page 17 of 24 RSKRX113 4 Reviewing the Tutorial Program Locate the function Call to Icd_display_adc inside the while loop Set a breakpoint on the Icd display adc function call by double clicking the breakpoint column 4 fff8lae3 al l TFT81b5e 1 1ff81afo 7 tfT81laf5 In the Project Explorer pane locate the file r cg sci user c and double click to open the source file Scroll down to the function r sci1 callback receiveend Display Welcome Banner on Serial Port R SCI1 AsyncTransmit WELCOME BANNER sizeof WELCOME BANNER while 1U uint16 t
11. Cc T D TS 0 D LENESAS RX113 Group Renesas Starter Kit Tutorial Manual For e studio RENESAS MCU RX Family RX100 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 Nov 2014 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 Electr
12. 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 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 Code Generator Plug in The Code Generator plug in for the RX113 has been used to generate the sample code discussed in this document Code Generator for e studio is a plug in tool for generating template C source code and project settings for the RX113 When using Code Generator the engineer is able to configure various MCU features and operating parameters using intuitive GUI controls thereby bypassing the need in most cases to refer to sections of the Hardware Manual Once the engineer has configured the project the Generate Code function is used to generate three code modules for each specific MCU feature selected These code modules are name r_cg_xxx h r og XXX C and r_cg_xxx_user c where xxx Is a three letter acronym for the relevant MCU feature for example adc Within these code modules the engineer is then free to add custom code to
13. a ea ko ao etn Mascara a la aa a ae 13 4 hevIeWIhg Me Tutorial Prod Mini iii A AAA lakea kake laksa 14 ael SPROGVAM IMIS SA ON E zuur lia ia 14 Beem Man VIGO ks T o Bhi Ce W B ohoe A TET 16 5 Additional Information s s s s ss s ssss sesssssssssts sessusssssstssnqustusunqstqsnsas 20 ENESAS RSK RX113 RENESAS STARTER KIT 1 1 1 Overview Purpose R20UT2760EG0100 Rev 1 00 Nov 30 2014 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 R20UT2760EG0100 Rev 1 00 AS Nov 30 2014 RENES Page 7 of 24 RSKRX113 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 build an embedded application e How do I use Renesas tools
14. ade result If the user has requested ADC sample via the serial p if TRUE g adc trigger f Call the function to perform an ADC conversion adc result get adc f Display the result on the LCD lcd display adc adc result a 15 Tutorial HardwareDebug b e Binaries b ril Includes a GE src da 2 co_src Le reg ege userc Le reg ecge e lh reg ege h Le reg dhbset e Le r cg hardware setup e Le reg icu_user c Le r_cg_Icu e lh reg icu h Le reg intprg e lh r eg macrodriver h Le reg main e Le r cg port user c Le r_cg_port c ih reg port h Le r_cg_resetprg c Le reg sl2ad user c Le reg slZad c lh reg slZad h Le r_eg_sbrk c ih r_eg_sbrk h p e reg sci user c Set a breakpoint on the line of code inside the r _sci1_callback_receiveend function as shown opposite Continue to execute the program by clicking the Resume button 31 fff822cb 34 fff822d3 se fff822df R20UT2760EG0100 Rev 1 00 Nov 30 2014 LENESAS static void r sci1 callback receiveend void i Start user code Do not edit comment generated here Check the contents of g_rx_char g_rx_char g rx char amp xDF Ensure ASCII char is in upp Check for the c trigger command if C g rx char g adc trigger TRUE Set up SCI1 receive buffer and callback function again R_SCI1 Serial Receive uint8_t amp g rx_char 1 Page 18
15. ansmiti WELCOME BE Sk Resume At Line i f Set up SCI1 receive buffer and callback function Set A breakpoint ou the 98 fff8lad2 l R SCI1 Serial Receive uinte t amp g_rx_char 1 R SCI1 Start function call by double clicking in te I EE the breakpoint column UJ e Click the Step Into button to step into the R_SCI1_ Serial Receiv js e function R20UT2760EG0100 Rev 1 00 LENESAS Page 16 of 24 Nov 30 2014 RSKRX113 4 Reviewing the Tutorial Program e The program counter ee will now move into the 51 fffB2143 R SCl1 Serial Receiv on 53 FFT82146 e function definition 54 This function is an API pIJ ka aiaj 56 function provided by the 57 58 Code Generator lt sets Lij eee 68 TFT821595 61 TFf82162 62 TF182178 up the SCl interrupt handler code to receive a specified number of 63 fff82177 bytes into a receive buffer Once the 66 FFF82179 specified number of FERRE bytes has been received the interrupt handler code calls a calback function as shown later on in this section e For full details on how to configure a project using Code Generator refer to the Code Generator Tutorial Manual e Click the Resume button to resume program execution e The program counter should come to a halt at the R SCI1 Start function e Step over the function by clicking the Step Over ma button Alternatively press F6 The R SCI1 Start function enables
16. c networks such as those in airports and coffee shops not because these networks often have little or no security _ aj What are the risks of allowing a program through a firewall le Confirm Perspective Switch O This kind of launch is configured to open the Debug perspective when it suspends This 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 e Once the code has been downloaded the program counter will stop at the entry vector usually the PowerON_ Reset function e Click the Resume button to let the code run It will Keep running up to the main function Execute the main code function Ube e It is recommended that you execute the entire tutorial demo first before continuing to debug it Please refer to the description txt for details of how to operatie this sample R20UT2760EG0100 Rev 1 00 Nov 30 2014 LENESAS Page 13 of 24 RSKRX113 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 of the tutorial program are used exclusively for init
17. e 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 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 Limited O 2014 Renesas Electronics Europe Limited All rights reserved O 2014 Renesas Electronics Corporation All rights reserved O 2014 Renesas Solutions Corp All rights reserved R20UT2760EG0100 Rev 1 00 LENESAS Page 20 of 24 Nov 30 2014 REVISION HISTORY RSKRX113 Tutorial Manual Rev Description Nov 30 2014 es First Edition issued Renesas Starter Kit Manual Tutorial Manual Publication Date Rev 1 00 Nov 30 2014 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 2801 Scott Boulevard Santa Clara CA 95050 2549 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 Europ
18. e 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 6503 0 Fax 49 211 6503 1327 Renesas Electronics China Co Ltd Room 1709 Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100191 P R China Tel 86 10 8235 1155 Fax 86 10 8235 7679 Renesas Electronics Shanghai Co Ltd Unit 301 Tower A Central Towers 555 Langao Road Putuo District Shanghai P R China 200333 Tel 86 21 2226 0888 Fax 86 21 2226 0999 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 2265 6688 Fax 852 2886 9022 9044 Renesas Electronics Taiwan Co Ltd 13F No 363 Fu Shing North Road Taipei 10543 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 12F 234 Teheran ro Gangnam Ku Seoul 135 920 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 O 2014 Renesa
19. e RSK _ Select All Deselect All Refresh tman marr a 4 WW j Options Search for nested projects Working sets Add project to working sets Cancel System_Input Capture gt le Timer PWM l Tutorial 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 default 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 GARRO Y 1 HardwareDebug Debug on hardware e Click the top level Tutorial folder again and then the arrow next to the build button hammer icon and select the e e studio will now build the code 2 Release Release No Debug HardwareDebug option R20UT2760EG0100 Rev 1 00 Nov 30 2014 LENESAS Page 11 of 24 RSKRX113 3 Tutorial Project Workspace 3 3 2 Debug Configuration e Click the arrow next to the debug button bug icon Select Debug
20. gnetic 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 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
21. guide to code generation and importing RSK RX113 Code R20UT3255EG Tutorial into the e studio IDE Generator Tutorial Manual Quick Start Guide Provides simple instructions to setup the RSK and RSK RX113 Quick R20UT2761EG run the first sample on a single A4 sheet Start Guide Schematics Full detail circuit schematics of the RSK RSK RX113 R20UT2755EG Schematics Hardware Manual Provides technical details of the RX113 RX113 Group RO1UH0448EJ microcontroller User s Manual Hardware 2 List of Abbreviations and Acronyms Abbreviation 1 MN Renesas Starter Kit Serial Communications Interface Universal Serial Bus All trademarks and registered trademarks are the property of their respective owners Table of Contents WO VOTO EEE EE E E E E E E E EE ETE 7 Mel PUMO Oceaan Boer a a r 7 L2 siil ges a a a a a 7 MON EEE E EE E E E il TTT O 8 21 Code Generator PIU I s aaa oon a a kuk a o sukan da das kea aS 8 22 Note Regardi d source Ola ol ae a oe lenis lel LE eae 8 3 Ulna Pro eC VVONKSDACE 23513 313 s iau stok siau a do 9 Sal IMO CIC jl oln E o TT hh Eo daecia A greyed acl 9 3 2 Starting e studio and Importing Sample Code ececescccessccessesessesessecesseceeseceesaecevaeseveseseesasersaseevaservasereas 9 3 3 Build Contigurations and Debug Session uti eko aaa ea ee es ee 11 3 3 1 Build COUNT OSTO So es 11 3 3 2 DEBUG GONIIQUKAVON ld ka o ea ait ts 12 34 RUNNINO ING A A reska
22. ialising 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 Build and download the code as shown in Section 3 3 e On the Project Explorer tab 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 show the source files e Expand the cg src folder in the same way and double click on r_cg_hardware_setup c to open the file e Breakpoints can be set by double clicking at the left hand edge of the source window On the line with instruction R_Systeminit double click next to the vertical line to set a breakpoint Note As an alternative breakpoints may be set in the C C perspective by selecting a line and using Run gt Toggle Breakpoint R20UT2760EG0100 Rev 1 00 Nov 30 2014 B Outline 74 Project Explorer 53 gt 15 System Input Capture l Timer PWM gt Tutorial HardwareDebug a 5 Tutorial HardwareDebug Binaries fal Includes a A src da 2 cq Sic lej r cg ege userc le reg ege e a reg ege h Le r_cg_cmt_user c Le r_cg_emt c h reg cmt h Le reg _dbsct c Le r_cg_icu_user c Mha vold HardwareSetup void 1 B1 TTTBlabf R Systeminit LENESAS Page 14 of 24 RSKRX113 4 Reviewing the Tutorial Program e Click the Resu
23. me button in the gt woid HardwareSetup void Debug perspective or press F8 to run the code up to this 81 fff8labf R Systeminit breakpoint az Note The program counter is indicated by the blue arrow next to the breakpoint e Click the Step Into button or Le r cq resetpra c Le r eg hardware setup c El press F5 to step into the R_Systeminit rs 68 TTfT819ec void R Systeminit void function 61 1 62 Enable writing to registers rela 63 FFFB19F1 SYSTEM PRCR WORD xA5 FU e The R_Systeminit function calls 64 a ON larto 65 Enable writing to MPC pin functii whic contigure tne 66 Tff819fa MPC PWPR BIT B WI 8U microcontroller for normal 67 FFfBla6ol MPC PWPR BIT PFSWE 1U operation For example this 68 includes input output ports and 69 Initialize non existent pins system clocks 78 F f81a08 PORT PDR BYTE x6BU 71 fff8lal PORT3 PDR BYTE BxD8U 72 F 81a18 PORT4 PDR BYTE BxABU 73 FFf8B1a20 PORT5 PDR BEYTE BxBAU e The user can step through all the A Ps PORT9 PDR EYTE BxFEU initialisation code by clicking the FEFTIIZO Erika tide TE PO Step Into icon and reading the 76 44481038 PORTF PDR BYTE x3FU code however for the purpose of 57 FFfRla4o PORTI PDR EYTE Bx32U this manual it will be skipped 78 PATA 79 Set peripheral settings e Click the Resume TTT81a43 a button to run the code up fis a A to the main function A E EEE LAS
24. onics 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 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 fo
25. r details of power supply configuration damo ia ai 4 Power Note e studio will display a warning if power arget you attempt to connect with an incorrect S L sc power supply setting Register Setting Single Chip Mode pin Single chip mode e Click the Debug button to continue e studio will now connect to the debugger and download the code to the target R20UT2760EG0100 Rev 1 00 LENESAS Page 12 of 24 Nov 30 2014 RSKRX113 3 Tutorial Project Workspace e A firewall warning may be displayed for e2 server gdb exe Check the Private networks such as my home or work network box and click Allow access e A user account control dialog may be displayed Enter the administrator password and click lt Yes gt e e studio may display a dialog asking if you would like to switch to the Renesas Debug perspective Click Yes e The new e studio perspective layout is optimised for debugging 3 4 Running the Tutorial Windows Security Alert e Windows Firewall has blocked some features of this program Windows Firewall has blocked some features of E2 Server GDB on all public and private networks A i Name E2 Server GDB Publisher Renesas Electronics Europe Ltd Path C yenesas e2_studio debugcomp e2 server gdb exe Allow E2 Server GDB to communicate on these networks Y Private networks such as my home or work network Publi
26. r use in 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
27. s Electronics Corporation All rights reserved Colophon 3 0 RX113 Group LENESAS Renesas Electronics Corporation R20UT2760EGO100
28. 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 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
29. use by the 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

Download Pdf Manuals

image

Related Search

Related Contents

Manuel d`instructions  CILIP: PROGRAMA DE COMPUTACIÓN PARA EL CÁLCULO  漁船第五成雄丸機関損傷事件 - 海難審判・船舶事故調査協会    Céré`Obs, mode d`emploi - Chambre d`agriculture du Bas-Rhin  FI-ACTIMOVE STEPLITE  USO RESTRITO  MCD202 Spanish 1    Hygromètre à bois Timber Check™  

Copyright © All rights reserved.
Failed to retrieve file