Renesas RSK H8S2215R Tutorial
Renesas RSK H8S2215R Tutorial

Renesas RSK H8S2215R Tutorial

Single-chip microcomputer

Advertisement

Quick Links

To our customers,
st
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.
Issued by: Renesas Electronics Corporation (http://www.renesas.com)
Send any inquiries to http://www.renesas.com/inquiry.
Old Company Name in Catalogs and Other Documents
Renesas Electronics website:
http://www.renesas.com
st
April 1
, 2010
Renesas Electronics Corporation

Advertisement

Table of Contents
loading

Summary of Contents for Renesas RSK H8S2215R

  • Page 1 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.
  • Page 2 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”...
  • Page 3 Renesas Starter Kit RSK H8S2215R Tutorial Manual RENESAS SINGLE-CHIP MICROCOMPUTER Rev.1.00   2007.01...
  • Page 4: Table Of Contents

    Table of Contents Chapter 1. Preface ...3 Chapter 2. Introduction...4 Chapter 3. Tutorial Project Workspace ...5 Chapter 4. Project Workspace ...6 4.1. Introduction...6 4.2. Creating a new Project Workspace ...6 4.3. Build Configurations and Debug Sessions ...7 4.3.1. Build Configuration ...7 4.3.2.
  • Page 5: Chapter 1. Preface

    All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or organisations. Copyright © Renesas Technology Europe Ltd. 2006. All rights reserved. © Renesas Technology Corporation. 2006. All rights reserved. Website: http://www.renesas.com/...
  • Page 6: Chapter 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: • How do I compile, link, download, and run a simple program on the RSK? •...
  • Page 7: Chapter 3. Tutorial Project Workspace

    Chapter 3. Tutorial Project Workspace The workspace includes all of the files for two build configurations. The tutorial code is common to both the Debug and the Release build configurations. The tutorial is designed to show how code can be written, debugged then downloaded without the debug monitor in a ‘Release’...
  • Page 8: 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 software installation for the RSK product.
  • Page 9: Build Configurations And Debug Sessions

    • Click OK 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 of the device.
  • Page 10: Chapter 5. Building The Tutorial Project

    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 selected tool-chain.
  • Page 11: Connecting The Debugger

    The first stage is to select the specific device from the installed kernels. The installer will have added the kernel to the FDT registry so it will appear under the device list drop down menu. If for any reason the kernel has to be re-build such as the crystal frequency on the board has changed, then the installation path is: <FDT Installation>\Kernels\ProtB\2215RU\Renesas\1_0_00.RSK...
  • Page 12 • Select the Device on the RSK from the drop down list. • In the sub pane, select the kernel version that ends in ‘.RSK’. • Press <Next>. If you have copied the kernel to another location to modify for a different crystal frequency, the device will not be listed in the sub pane.
  • Page 13 • Ensure that ‘USER Program Mode’ is selected. • Confirm that ‘Use Default’ is selected. • Press <Next>. • Confirm the default selections of ‘Automatic’ and ‘Advanced’. • Press <Next>. • The following warning dialog will be displayed. • Press <OK>. To communicate with the RSK FDT and HMon need to be able to change the operating mode of the microcontroller.
  • Page 14 Damage to the microcontroller can be sustained with incorrect settings. • Confirm the mode pin settings. • Press <Next>. • The following warning dialog will be displayed. • Press <OK>. Damage to the microcontroller can be sustained with incorrect settings. •...
  • Page 15: Connecting To Hmon

    5.3.1. Connecting To HMon We can now attempt to connect to the target device. • Press the Green ‘Connect’ Icon. HMon is able to discover the internal flash configuration of the device from the FDT kernel we configured earlier. HMon also needs information on the location of the IO registers and internal / external RAM.
  • Page 16 • Confirm the settings shown and press <OK>. HMon will attempt to connect to the RSK. If it succeeds then the Output window in HEW will show the ‘Connected’ message. In this case please proceed to Chapter 6. If the connection fails you will be returned to the previous dialog with the ‘Abort’ button enabled. This is likely to be caused by a connection error with the RSK and the E8.
  • Page 17 • Ensure ‘0x000D – 1 [Closed]’ is selected and click <OK>. On completion of the download HMon will automatically re-connect to the monitor and revert back to User programming mode.
  • Page 18: Chapter 6. Downloading And Running The Tutorial

    Chapter 6. Downloading and Running the Tutorial Once the code has been built in HEW it needs to be downloaded to the RSK. Now that you are connected to the target you should see an additional category in the workspace view called ‘Download Modules’ •...
  • Page 19 We will now skip over the initialisation code and proceed to the main tutorial. • Open the file called ‘resetprg.c’ by double clicking it in the project navigator. • Place a breakpoint at the call to main(); by double clicking in the column containing the PC arrow, next to the line to break at;...
  • Page 20 • Right click on the ‘FlashLEDs();’ function and select ‘Go to cursor’. The code will run to the selected line and stop. A temporary breakpoint was automatically inserted in the code and then removed when the program stopped at the breakpoint. •...
  • Page 21 The code will now run to the infinite loop at the end of Main(). The user LEDs should now be flashing. You can modify the flashing rate by adjusting the potentiometer on the board. • Press ‘Stop’ on the debug tool bar. •...
  • Page 22 • Press ‘Go’ to run the code from the current PC position. When the program stops you can see the modified string displayed on the second line of the LCD. 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 replacement string.
  • Page 23: Chapter 7. Project Files

    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 / Tool-chains.
  • Page 24: Board Initialisation Code (Hwsetup.c / Hwsetup.h)

    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 are shown below.
  • Page 25: Main Tutorial Code (Main.c / Main.h)

    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 a ks0066u controller and pin connection on the schematic before connecting an LCD module not supplied by Renesas.
  • Page 26: Chapter 8. Additional Information

    Manual Navigator installed with this product. For more information on the configuration and use of HMon please refer to the HMon User Manual installed from the CD. Further information available for this product can be found on the Renesas web site at: http://www.renesas.com/renesas_starter_kits General information on Renesas Microcontrollers can be found at the following URL.
  • Page 27 Renesas Starter Kit for H8S2215R Tutorial Manual Publication Date Rev.1.00 12.01.2007 Published by: Renesas Technology Europe Ltd. Dukes Meadow, Millboard Road, Bourne End Buckinghamshire SL8 5FH, United Kingdom ©2006 Renesas Technology Europe and Renesas Solutions Corp., All Rights Reserved.
  • Page 28 Renesas Starter Kit for H8S2215R Tutorial Manual 1753, Shimonumabe, Nakahara-ku, Kawasaki-shi, Kanagawa 211-8668 Japan REG10J0023-0100...

Table of Contents