Home

Renesas Starter Kit for R8C/L3AC Tutorial Manual

image

Contents

1. wal EG4 ASKRSCZD CAworkSpaceNASKREL3AC Tutorial EE mi Empty Application Te Import Makefile CPU family del Library Mi EE ga RSKRSC2F ASK ARSCL ASC Tool chain se Debugger only MIEC EB Renesas MBC Standard ki Fe Debugger only MIEC Sim Fe Debugger only ASC Ega s sm gt Properties The example above shows the New Project Workspace dialog with the RSKR8CL3AC selected e Select CPU family as M16C and Tool chain as Renesas M16C Standard R8C is supported by the same compiler as M16C e Select the RSKR8CL3AC Project type from the project list for the RSK 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 this name may be changed Note HEW 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 RSK Project Generator wizard The next dialog presents the example projects available Choose the Tutorial code which will be explained later in this manual There is also an option for Sample code which provides examples for using various peripherals This will open a new dialog allowing the selection of many code examples for the peripheral modules on the device The final option is for an application code bui
2. settings now is a good time to save the workspace e Select File Save Workspace Chapter 6 Downloading and Running the Tutorial Once the code has been built in HEW it needs to be downloaded to the RSK There will now be an additional category in the workspace view for Download Modules e Right click on the download module listed and E led c 107 x D man c 106 Disp d E resetpro c 109 Disp select Download paa Za Text Files LLL e G H RSE Header txt 112 EN ABI Download modules 113 MN ASER oLL3A O MM 5 Fl Dependencies Download last cstartdef h Download Debug Data Only E FlashLEDs h Ink F hwsetup h E initect h Download A New Module imer E Interrupts h Remove led h De On completion the debugger and code are ready to be executed To start debugging we need to reset the debugger and target e Press Reset CPU on the Debug Toolbar El Reset CPLI The File window should open the Tutorial code at the entry point An arrow marks the current position of the program counter Arcument gt none Return value none tA FUNE COMMENT EMD Cee ee eee eee kok k kokOROKOKOK OK KOK Kok kkk Ok ROKOKOKOKOKOK KOK KOK RARA AAA RARA RARAS old start void 1 Set interrupt stack pointer 5 Change protect mode register 5 PECE lxOZ 0 Set processor mode register prow UxOOU Change protect m
3. 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
4. aico 15 PA OlanGand Pro idilio 15 7 1 1 Initialisation code resetprg c resetprg h ccccccooonccncccoccnnonncccnoncnnnnonnnnnncnonancnnnnnonnncnnnonnnnnrnnnnnnnanennnns 16 7 1 2 Board initialisation code hwsetup c DWSetup h cccccoonncnnccccconcnnnccnnnnnnnnnononncnononanennnnnnnnnrnnnnnnnnncnnnnss 17 Zo MalnTulorlal code mae AMARA said Lla Sok ask ando 18 Shaplere Additional INIOMMIallON 1 seco eter GO a E KENO Sa du alas do Vuk la a SEG 19 Chapter 1 Preface Cautions 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 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 eu renesas com Glossary CD Compact Disc CPU Central Processing Unit E8a E8a On chip debugger module HEW High performance Embedded Workshop LCD Liquid Crystal Display MCU Microcontroller Unit PC Program Counter RAM Random Access Memory ROM Read Only Memory RSK Renesas Starter Kit USB Universal Serial Bus Chapter 2 Introduction This manual is designed to a
5. 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
6. build configurations this is possible by selecting All or Multiple from the Configuration drop down list E E e Review the options on each of the tabs and Category dropdown lists to be aware of the options available Options C c finfo dir CONFIGDIR R8C When complete close the dialog box by clicking lt OK gt Cancel 5 1 Building Code There are three shortcuts available for building the project 1 Select the Build All toolbar button This will build everything in the project that has not been excluded from the build This includes the standard library 2 Select the Build toolbar 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 Press F7 This is equivalent to pressing the Build button described above Build the project now by pressing F7 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 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 re
7. e protect mode register PECE OxO0U f Set flag register Elo 00080 fo Set user stack pointer ap_ stack top f Setting 400H Do not change sh O0x4000 Set variable vector s address inthh OUxOOU asmi lde itopof vector lt OFFFFH INTEL Initialize each sections initscti if HEAPSIZE O Initialize heap heap initi endif if STANDARD IO 0 Initialize standard I O 7 initi endif f Initialize FE register for debugger fh DU f5 Set up the hardware Hardwaresetupli f Call maini routine maint f Call exit exit foko ik ok ok a a a a KOKOKOK a KOKOK e a a ee KOKON KOKON End of function start aia ok Kok a a a a KOKOK a a a a KOKON a a a a a e a a a KOKOK i a a a a a a a a a a a a a a a Initialisation of the variables used in the C compilers and initialisation of stack pointers are completed in the INITSCT function for the M16C compilers The call to hardwaresetup will initialise the device hardware and peripherals ready for the tutorial software The call to main will start the main demonstration code 16 7 1 2 Board initialisation code hwsetup c hwsetup h There are four common stages to the configuration of the microcontroller device The code to demonstrate this is therefore split into four functions Each function is written specifically for the device supported The function calls a
8. ebug Toolbar PH P 10 The code window will open main c and show the new position of the program counter e FUNC COMMENT TAE FAA RAR RAR RAR RAR RRA RRA RRA A RR RA RRA RARA RARA RARA QuEllne maln Description Main program This function calls timer ADC LCD initialisation functions The segments of Renesas LCD flashes until the user presses a switch on the RSE Argument hone Return value none ree FUME COMMENT ENDO SY FORKON KON KOR OKOROKOR KOR OKOROKOROKOKOKOKOKOKOKOKOK KONKO KOR KOR KOROKOKOKORKOKOKOKORKOKKAROKAKOKKKKKOK oid main voidi i Reset the LCD module 5 Enable and configure LCD display InitialisebisplayFPanel fi Display the application name on LCD DisplayPanelString PANEL_ LCD LINE1 RSE T Display Delay bDisplayPanellelay Ox1FFFF Flash the user LEDs for some time or until a key is pressed FlashLCD 1 Enable and configure LCD display InitialiseDisnlayPanel 1 Demonstration of initialised variables Use this funtion With the debugger statics Testi Flash the user LEDs at a rate set by the user potentiomenter ADC using interrupts TimerADC End of the user program This function must not exit while 1 Pi a ee ROK KOR a KOK OKOK KOK KOK a End of function malu Kok ORR OK ROK KOK RARA RRA RARA RARA RANA RARA RARA RARA RARA RAR RARA RARA RARA RANA NANA NANA NANA NAS Insert a breakpo
9. he file in the workspace view e Review this file and find the interrupt function that flashes the Renesas LCD Panel in _timer_rc e Seta breakpoint on LCD_ON function e Press lt Go gt or lt F5 gt to run the code from the Inl rl Uh HH position of the PC E a The code will stop in the interrupt routine lt is now possible to step through the interrupt function e Remove the breakpoint in the interrupt by double clicking again before exiting the function e Press lt Go gt to run the code from the current Uh HH t position of the PC El a 12 The code will now run to the infinite loop at the end of main function All the segments on the Renesas LCD Panel should now be flashing You can modify the flashing rate by adjusting the potentiometer on the board e Click Stop icon available on Debug toolbar D Press CTRL B to open the breakpoint window e Select Remove All Breakpoints Press lt OK gt Open the file main c Insert a breakpoint at Statics_Test function flash to RAM The Statics_Test is used to demonstrate that the initialisation routine has successfully copied all the initialised variables from storage in e Press lt Reset Go gt on the Debug Toolbar lA e Press lt Step In gt on the Debug Toolbar The code will stop at the breakpoint Press any user switch to bypass the Flashing LCD test FP It is possible to monitor variables while debugg
10. ing the code To set up a watch on a variable place the mouse over the variable If the variable is available in the current context a tool tip will be displayed with the current value of the variable Watch Hover the mouse over the ucStr variable to see the tool tip value Then Right click on the variable name and select Instant A dialog will open showing the variable and allowing further details to be explored e Press lt Add gt The dialog will close and a new pane will open in the workspace containing the variable It is possible to see that the string has been successfully initialised to RSK e position Set a breakpoint on the call to DisplayPanelDelay inside the for loop Press Go to run the code from the current PC When the program stops you can see the modified string displayed Renesas LCD Panel replacement string Inspection of the watch pane will show that the first character of the variable string has been replaced with the first character of the constant Remove the breakpoint e Right click on the ucStr uiCount function call after the loop and select Go to cursor 13 This shows that the variable was initialised at program start up and can be overwritten with TEST You have now run the tutorial code and used many of the common features of the debugger We suggest that you review the rest of the tutorial code as many functions have important information on the ope
11. int on the call to the TimerADC function 11 e Right click on the FlashLCD function and select Toggle Breakpoint Fa Go to cursor Define Column Format Columns j Turn Header Cn CFF Go To Cursor Set PC Here Display PC The code will execute to the selected line and stop An automatic breakpoint was inserted in the code and then removed after calling the break e Press Go on the Debug Toolbar The code will run and all the segments on the Renesas LCD panel flashes 200 times The debugger will not exit until all 200 flashes have completed or a switch is pressed on the RSK e If the LCD is still flashing press the SW1 switch on the RSK to exit the FlashLCD function The code will run to the breakpoint we previously set on the TimerADC function Please note it will run through the static test in between and will take approximately 10 sec to run to TimerADC function The TimerADC function initialises an interrupt on an available internal timer On overflow of the timer module an interrupt is generated In the TimerADC code version the interrupt reads the last ADC conversion for the external potentiometer and uses the result to set the next overflow value The ADC conversion is then re started The interrupt initialisation is completed as part of the hardware setup This is contained in the file interrupts c e Open the file interrupts c by double clicking on t
12. ld 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 e Select Tutorial as the type of project to generate and then click Next e Click Finish to create the project The project generator wizard will display a confirmation dialog Press OK to create the project and insert the necessary files A tree showing all the files in this project will appear in HEW e To view 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 HEW User s Manual 4 3 1 Build Configuration The build configurations are selected from the left hand drop down list on the toolbar 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 optimization settings With the optimization turned on the debugger may seem to execute code in an unexpected order To assist in debugging it is often helpful to turn off optimizatio
13. 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
14. move some devices and try again Alternatively an external 5V power source can be connected at PWR1 connector taking care to ensure the correct polarity and voltage The Quick Start Guide provided with the RSK board gives detailed instructions on how to connect the E8a to the host computer The following assumes that the steps in the Quick Start Guide have been followed and the E8a drivers have been installed e Fit the Renesas LCD Panel to the connector marked JA4 on the RSK Ensure all the pins of the connector are correctly inserted in the socket See LCDAPPV2 Quick Start Guide for more information e Connect the E8a debugger to the USB port on your computer e Connect the E8a debugger to the target hardware ensuring that it is plugged into the connector marked E8A on the RSK 5 3 Connecting to the target with the E8a This section will take you through the process of connecting to the device programming the Flash and executing the code e Select the SessionR8C_E8a_SYSTEM debug Emulator Setting Geplon Emulator mode Firmware Location Communication Baud Aate e Click the lt Connect gt button on the debug toolbar MCU Group REC L3AC Group E Device R5F2L3ACC ists de Mode e Erase Flash and Connect Please note that the Emulator Mode wizard C Keep Flash and Connect i B will appear the FIRST time you connect to the Segen Hem f Debugging of CPU rewrite mode target within a project The tabs and setting
15. n on the code being debugged SessionABC E a SVST e Select the Debug build Configuration 4 3 2 Debug Session The Debug sessions are selected from the right hand drop down list on the toolbar The options vary between RSK however one will always start Debug and include the type of debug interface The alternate selection will be Default Session The purpose of the Debug session is to allow the use of different debugger tools or different debugger settings on the same project Select SessionR8C_E8a_SYSTEM debug session EA Session Chapter 5 Building the Tutorial Project 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 exist on all the Renesas M16C Standard Toolchain Lei Configuration C Assembly Link Librarian Lme RTOS crial gt tool chain options It is important when changing any setting to be Cr EUN i i i adi All Loaded Projects aE ee En Include file directies H aware of the current configuration that is being modified If you AA rolo fie dec Nuu peda K a cold file s specified in Hinclude wish to modify multiple or all
16. 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
17. nction calls timer ADC LCD initialisation functions The segments of Renesas LCD flashes until the user presses a Switch on the RSE Argument hone Return value none Te FOLIC COMMENT END ROKON RON RON KOK ROKON KONKON RARA NARA RA ARANA NANA RRA NANA NARRA EAA AA AAA 1 oid main 01d Reset the LCD module 5 Initialisebisplavi Enable and configure LCD display InitialisebisplayPanel Display the application name on LCD 5 DisplayPanel tring P4NEL LCD LINEI RSE TUJ Display Delay DisplayPanelDelay 0x1FFFF f Flash the user LEDs for some time or until a key is pressed 5 FlashLCD 1 Enable and configure LCD display InitialisebisplayPanel i ff Demonstration of initialised variables Use this funtion With the debugger statics Test f Flash the user LEDs at a rate set by the user potentiomenter ADC using interrupts 5 TimerADC f End of the user program This function must not exit while 1 okok kk KON KON KOK RARA RARA RARA OK OKOROKOR KONKON KOKOKOKOR KOR KON KOK RARA NARA RRA RANA NARA ARA RANA NARA A RANAS End of function main kro kok KORKON KON KOK ROKOR KOR KOR CKON KOKOKOKOK KOR KONKON KOKOKOKOR KOR KORKON KOKOKOKOR KOR KOK A NARA RRA RANA NARRA RANAS 18 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 Furthe
18. nswer 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 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 the compiler tool chains or the E8a 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 and then downloaded without the deb
19. ode register PECE OxDODO Get flag register ilg F value if STACESIZE 0 Set user stack pointer 2p amp Stack top fendit Setting 4004 Do not change ho ONx40OU Set variable vector s address inthh Ox000 asmi lde H itopof vector SOFFFFh INTEL f Initialize each sections initscti if HEAPSIZE 0 Initialize heap heap initti fendit if STANDARD IO 0 Initialize standard I O initil endif Initialize FB register for debugger fh OU Set up the hardware 5 HardwareSetup i f Call mainii routine maint We will now skip over the initialisation code and proceed to the main tutorial e Open the file called resetprg c by double clicking it in the project navigator e Place a breakpoint at the call to main Breakpoints can be set by double clicking in the column containing the PC arrow next to the line to break at or selecting the line and pressing F9 or right click on the line and select Toggle breakpoint Alternatively set an eventpoint by clicking in the column to the left of the breakpoint column Maximum eight eventpoints can be set at a time Eventpoints do not require programming the flash memory and thus are faster to use e Press Go on the Debug Toolbar EI The code will execute to the breakpoint At this point all the device initialisation will have been completed e Press Step In on the D
20. 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 CD me T lt D S Renesas Starter Kit for R8C L3AC Tutorial Manual Renesas Single Chip Microcomputer R8C Family Renesas Prod ma Rev 1 00 2010 02 WWW FENESAS CO Table of Contents AA nn TT re re a TE TETTE one eee ee nee ee 1 Ghapter 2 lg kelo Vie alg ee boukso ios eiii 2 Ghaptero Tutorial Project WOrKSPaCE lactosa 3 Gnapler4 Pro ect WORKS pa CE usna a E N ci 4 A Nec Ma OCA GO 0 A o a E TAT EAA E A AS 4 4 2 Creating a new Project Workspace sa A AA o ae 4 4 3 Build Configurations and Debug SesslONs sssssss ssessssssssssccsssssssssssssscsnnnssnnnsssscsnnsssnnanssssstnntes 5 AB N BUI OONI UFAUON ots idas 5 43 2 Debug SESSION soso sce o ens ka osa 5 Ghapters Building the Tutorial Project a oh theres Meare 6 lt GOE sru oa TA ie Rs ete ka sm un LD a eae eee ee eee 6 3 27 GONNEClINY Me EDU di ica 6 5 3 Connecting to the target with Ne E 8a incandescente 7 Chapter 6 Downloading and Running the Tutorial oooocconcccccccoonncnnnnccnononannnonnnnnonononannnnnnnnnononannnnnnnnnnnnnnnnos 9 are Pro ec e ee ee ee l
21. r 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 website Global http www renesas com Regional English language sites can be 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 R8C L3AC Tutorial Manual Publication Date Rev 1 00 09 FEB 2010 Published by Renesas Technology Europe Ltd Dukes Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH UK 2010 Renesas Technology Europe and Renesas Solutions Corp All Rights Reserved Renesas Starter Kit for R8C L3AC Tutorial Manual LENESAS Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J2132 0100
22. ration of the code the compiler directives and comments on when they should or must be used Please refer to Chapter 7 for more information on the project files 14 Chapter 7 Project Files 7 1 Standard Project Files The RSK tutorials are configured so that it is possible to provide the same tutorial code on multiple RSK products This allows the evaluation of the different processor cores using equivalent code To achieve this the following files are common between all device cores and Tool chains Each of the tutorial files has detailed comment text describing the function of each code entry Please refer to the source code for greater detail on the purpose and operation of the compiler specific details 7 1 1 Initialisation code resetprg c resetprg h This is the entry point of the main tutorial code FF EUME COMMENTO RORROROK KOK AAAA REAA RERA EEA RARER ATAARE AEAEE AAAA AAAA Outline start Description PONEE on reset function E This function executes following a power on reset w It first calls hardware initialisation function amp then maint LU function Argument none Return value gt none k FIONC COMMENT ENDT UT FORKON OR KON RAR RR RARA RANA a RARA RARA RAR NARA RARA RAR AAT ARRAS void start void 1 fk Set interrupt stack pointer isn o istack top f Change protect mode register prer DxOz5O Tt Set processor mode register x pmi UxOUOU Chang
23. re shown below PTC COMMENTO RR OR RARA RARA RRA RARA RARA RARA AAA AAA AAA AAA AAA AAA AAA AAA Outline Hardwaresetup Description sets up the hardware This function calls the hardware initialization Functions ta ki confiqure the CPU operating frequency port pins required i on chip modules in order to setup the RSE for the main ki application Argument hone Return value none k FONC COMMENT END KOR KON ROK RARA RARA RRA RARA RARA ARANA RARA RARA RARA RARA ARANA EE void Hardwaresetup void i Configures CPU clock 5 ContigurelperatingFreg uencyi o fE Configures port pins 5 ContigurePortPins Enables required on chip peripherals EnablePeripheralModules i Configures the required interrupts Confiqurelnterrupts Ii i ir i i a r a a r a a a a a a a a r a a a r a a a r a a a a a a a a a a RARA RARA a a i End of function Hardwaresetup Ko ROKON KOR OKOROK KOR KOROK AAA RARA AAA RARA AAA RARA AAA RAR RARA RARA EASE EAA EASE AAA RANAS 17 The main tutorial code is common to all tutorial projects The display initialisation and string display functions operate on the LCD display module Check compatibility with ks0066u controller and pin connection on the schematic before connecting a LCD module not supplied by 7 1 3 Main tutorial code main c main h Renesas Ar EUNE COMMENTO RR ROK eee eee QUCLINE Wain Description Main program This fu
24. 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
25. s to be configured will be same as described below Power supply for Emulator Setting gt Power Target from Emulator Max JODma so e BOY e Select the correct MCU Group type R8C L3AC Group illustrated Cancel e Select the correct device type R5F2L3ACC as Do not show this dialog box again illustrated Emulator Setting e Select Erase Flash and Connect Emulator mode Firmware Location Communication Baud Rate e If the E8a is to provide power to the CPU board Please select firmware location select Power Target from Emulator and choose i the 5 0V option Otherwise connect a 5V centre positive supply e Choose User Flash Area in Firmware 7 Enable advanced setting Location tab Cancel Do not show this dialog box again e Choose 500000bps in Communication Baud Emulator Setting Rate tab Click lt OK gt E mulator mode Firmware Location Communication Baud Aate Please select communication baud rate between Emulator and MEU e The flash memory write program is then downloaded to the microcontroller e The Output window in HEW will state Connected Note The connection to the target will activate the debugger buttons on the HEW toolbar Cancel Do not show this dialog box again Now is a good time to save the HEW session e Select File Save Session If you have changed any workspace
26. ug monitor in a Release situation The build configuration menu in High performance Embedded Workshop 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 same files Maintaining only one set of project files means that projects are more controllable Chapter 4 Project Workspace 4 1 Introduction HEW is an integrated development tool that allows the user to write compile program and debug a software project on any of the Renesas Microcontrollers HEW will have been installed during the installation of the software support for the RSK product This manual will describe the stages required to create and debug the supplied tutorial code 4 2 Creating a new Project Workspace 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 Projects Workspace Name Project Types gal Fos ASKMIGCENK A ASEACLSAC Tutorial E alkado Project Name A AR ASKRELZAC Tutorial dal ESA RSKROCZ on

Download Pdf Manuals

image

Related Search

Related Contents

norme {Française  Mode d`emploi - Georg Schick Dental GmbH  scarica il manuale in formato pdf  取扱説明書 (801.38 KB/PDF)  or en en et ux  ロボット(メカトロニクス)開発の手法  bedienungsanleitung ps-200htp taschenwaage  

Copyright © All rights reserved.
Failed to retrieve file