To our customers,
Old Company Name in Catalogs and Other Documents
On April 1st, 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 1st, 2010
Renesas Electronics Corporation
Issued by: Renesas Electronics Corporation (http://www.renesas.com)
Send any inquiries to http://www.renesas.com/inquiry.
Notice
1. 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.
2. 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, is granted hereby under any patents, copyrights or other intellectual property rights
of Renesas Electronics or others.
3. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part.
4. 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.
5. 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 is prohibited
under any applicable domestic or foreign laws or regulations.
6. 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.
7. 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 equipment; 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.
8. 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.
9. 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 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.
10. 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.
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.
PRELIMINARY
APPLICATION NOTE
H8/300L
Boot mode In-circuit Programming (Boot)
Introduction
The Renesas Flash Development Toolkit (FDT) is an onboard flash programming tool with user-friendly Graphical User Interface
(GUI) for Renesas F-ZTAT (Flash Zero Turn Around Time) microcomputers. To shorten the development cycle, especially on re-
programming time of the mounted flash micon, it becomes essential to incorporate onboard programming feature onto the target
board. This application note describes the hardware requirements for the H8/38024 flash micon in boot mode using FDT.
Target Device
H8/300L Super Low Power (SLP) Series - H8/38024F
AN0303002/Rev1.00 September 2003 Page 1 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Contents
1. Overview ........................................................................................................................................... 3
1.1 Boot Mode & Micro Kernel ................................................................................................................ 3
2. Hardware Requirements ................................................................................................................... 4
2.1 Crystal Oscillator Block ..................................................................................................................... 4
2.2 Boot Mode’s Setting Block ................................................................................................................ 5
2.3 Serial Communication Block ............................................................................................................. 5
3. Block Diagram of Onboard Flash Circuitry........................................................................................ 6
4. Basic Operation of FDT v2.2............................................................................................................. 7
4.1 Creating a New Workspace .............................................................................................................. 7
4.2 Data Programming to the Flash Memory in Boot Mode ................................................................. 12
4.3 Viewing or Erasing The Device Data .............................................................................................. 14
APPENDIX A: Circuit Diagram................................................................................................................ 15
Appendix B: BOM List ............................................................................................................................. 16
Reference................................................................................................................................................ 16
AN0303002/Rev1.00 September 2003 Page 2 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
1. Overview
HD64F38024 micon has a 32-kbytes built-in flash memory. Onboard programming/erasing can be done in boot mode, in which the
boot program built into the chip is started to erase or program of the entire flash memory.
Renesas Flash Development Toolkit (FDT) is an onboard programming GUI software, which connects the target board to the Host
PC. This target board is mounted with HD64F38024 micon and built with onboard programming circuitry. The boot mode
programming is achieved via SCI3 channel in asynchronous mode.
1.1 Boot Mode & Micro Kernel
Boot Mode conditions the internal FLASH circuitry and initiates an Auto Bootload sequence at
RESET for programming/erasing the entire flash memory. Once the chip is set to boot mode, it
will run a protected section of code known as the boot code. First, boot code negotiates a bit rate
for an asynchronous serial connection (SCI3) with the host. Next, the boot code downloads the
Micro Kernel (µKernel) at 9600 bps from the FDT software running on host PC.
µKernel in FDT is responsible for initialising the device, particularly to set up a valid stack pointer,
enable flash memory and configure the required communication ports. It also downloads the FDT
Main Kernel, which interfaces with the write, read, erase and blank check modules at 38400 bps for
flash operations. The design of FDT is based on a split kernel approach.
In boot mode, µKernel uGen38024.cde is fixed at pre-defined baud rate of 38400 and clock
frequency of 9.83 MHz, so no customisation of the µKernel is allowed.
AN0303002/Rev1.00 September 2003 Page 3 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
2. Hardware Requirements
A simple onboard programming circuitry consists of the following three blocks: Crystal oscillator
block, Boot mode’s setting block and Serial communication block.
2.1 Crystal Oscillator Block
The clock circuitry comprises of a 9.8304 MHz quartz crystal for the main clock and a 32.768 kHz
quartz crystal for the sub clock. This 9.8304 MHz crystal on the H8/38024F target board allows
FDT to download programming data at a baud rate of 38400 bps with bit error rate of 0%.
n = 0 for φ = 9.8304/2 (MHz)
= 4.9152 (MHz)
OSC × 10 6
N= − 1 …………………………………………………………………………….[1]
64 × B × 2 2 n
Given OSC = 9.8304 (MHz), B = 38400 (bps) and n = 0,
Hence, N = 3
φ × 10 6
Error = [ − 1] × 100% ……..………………………………………………[2]
( N + 1) × 64 × B × 2 2 n −1
Hence, Error = 0 %.
Therefore, a baud rate of 38400 bps is chosen for a main clock of 9.8034 MHz.
2.1.1 Conditions
Stable VCC with decoupling capacitor of 0.1µF to GND
AN0303002/Rev1.00 September 2003 Page 4 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
2.2 Boot Mode’s Setting Block
To enter into boot mode, it requires the conditions of TEST = 0, P95 = 0 and P34 = 1. After /RES_N ends, HD64F38024 micon will
be set to boot mode. The Reset Timing diagram is as follows:
20
States +5 v
/RES_N
P95
0v
TEST
0v
P34
0v
Figure 2.1 Reset Timing of Boot Mode
2.2.1 Conditions
P95 is set HIGH after /RES_N goes LOW for 20 states
2.3 Serial Communication Block
FDT links the Target board to the Host PC using the on-chip, three-wire serial communication channel [SCI3] on the H8/38024F
micon. This requires a RS232 transceiver [eg. SP3232ECT] to translate the RS232 signals. The connection between the Target
board and the Host PC is using serial cable with DB-9 connectors.
HOST PC CPUBD
DB9P DB9S
DB9P DB9S
RXD (2) (2) TXD
TXD (3) (3) RXD
GND (5) (5) GND
Figure 2.2 Serial Connection
AN0303002/Rev1.00 September 2003 Page 5 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
3. Block Diagram of Onboard Flash Circuitry
The block diagram of an onboard flash circuitry for H8/38024F is shown in Fig 3.1. The detailed circuit diagram and BOM List can
be found in Appendix A and Appendix B respectively.
0.1 uF
VCC
VCC
/RES
OSC2
T1 OUT RXD
VCC
TXD32 T1 IN
P95 H8/38024F RS232
PC
RXD32 R1 OUT
TEST R1 IN
OSC2 TXD
P34
OSC1 OSC2
9.8034 MHz
1M ohms
0.1uF 0.1uF
Figure 3.1 Block Diagram of Onboard Flash Circuitry
AN0303002/Rev1.00 September 2003 Page 6 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
4. Basic Operation of FDT v2.2
4.1 Creating a New Workspace
Click on Start menu of Windows® and select Program -> Renesas -> FLASH Development Toolkit 2.2 to open the Welcome to
the FLASH Development Toolkit dialog box.
Fig 4.1 Welcome to FLASH Development Toolkit dialog box
Enter the workspace name and click OK button.
Fig 4.2 New Workspace dialog box
AN0303002/Rev1.00 September 2003 Page 7 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Click Yes button to run Project Wizard
Fig 4.3 FLASH Workspace Manager dialog box
Enter the project name, then click Next button
Fig 4.4 Project Name dialog box
AN0303002/Rev1.00 September 2003 Page 8 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Select Device H8/38024F from the drop-down list, otherwise click Other… button to specify the kernel file (.fcf)
Fig 4.5 Choose Device And Kernel dialog box
Select a port and use the default baud rate of 38400 bps, then click the Next button.
Fig 4.6 Communication dialog box
AN0303002/Rev1.00 September 2003 Page 9 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Enter the numerical values for the input clock of 9.83 MHz
Fig 4.7 Device Setting dialog box
Choose BOOT Mode as the operating mode, then click Next
Fig 4.8 Communication dialog box
AN0303002/Rev1.00 September 2003 Page 10 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Select the Protection Level and Message Level during programming, then click the Finish button
Fig 4.9 Programming Options dialog box
An empty workspace will appear
Fig 4.10 FLASH Development Toolkit V2.2 Window
AN0303002/Rev1.00 September 2003 Page 11 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
4.2 Data Programming to the Flash Memory in Boot Mode
Press Reset Switch (S1) once and select [Device -> Connect to device]
Fig 4.11 Connect to Device pop-up menu
Select Target Files and right-click to Add Files to Project …
Fig 4.12 Add Target to Project dialog box
AN0303002/Rev1.00 September 2003 Page 12 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Select the target module and right-click to Download to Device. This will program the flash device.
Fig 4.13 Download to Device pop-up menu
AN0303002/Rev1.00 September 2003 Page 13 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
4.3 Viewing or Erasing The Device Data
Select [Device -> Upload image …] to display Upload Image dialog box
Enter the Start and End addresses
Click Upload button to read the Flash Memory data
Fig 4.14 Upload Image dialog box
AN0303002/Rev1.00 September 2003 Page 14 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
APPENDIX A: Circuit Diagram
AN0303002/Rev1.00 September 2003 Page 15 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Appendix B: BOM List
Designators Part Description Qty Remarks
1. C1, C3 Cap Electrolytic 100nF/50V 2
2. C2 Cap Ceramic 10nF/50V 10% 1
3. C4, C14 – 15 Cap Ceramic 100nF/50V 10% 3
4. C5 – 6 Cap Ceramic 15pF/50V 5% 2
5. C7 – 8 Cap Ceramic 12pF/50V 5% 2
6. C9 – 13 Cap Electrolytic 1uF/50V 5
7. R1 Res 1/4w 1MΩ 2% 1
8. R2 – 6 Res 1/8w 10kΩ 5% 5
9. U1 H8/38024F, FP-80A 1
10. U2 IC SP3232ECT RS 232 Driver/Receiver 1
11. Y1 Crystal 32.768 kHz Cylinder 2x6 1
12. Y2 Crystal 9.8304 MHz HC49/U-S 1
13. P1 Connector D-Sub Female 9-way 1
14. S1 – 2 Switch Tactile Round 2
Reference
1. Renesas FLASH Development Toolkit 2.2: User’s Manual
2. H8/300L Super Low Power Series – Low-cost CPU Board CPUBD-38024F User’
CPUBD-38024F User’s Manual
3. H8/38024 Series, H8/38024F-ZTATTM Hardware Manual
4. FLASH Development Toolkit Kernel Guide [for FDT v1.5]
AN0303002/Rev1.00 September 2003 Page 16 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Revision Record
Description
Rev. Date Page Summary
1.00 Sep.03 - First edition issued
AN0303002/Rev1.00 September 2003 Page 17 of 18
PRELIMINARY
H8/300L
Boot Mode In Circuit Programming
Keep safety first in your circuit designs!
1. Renesas Technology Corporation puts the maximum effort into making semiconductor products
better and more reliable, but there is always the possibility that trouble may occur with them. Trouble
with semiconductors may lead to personal injury, fire or property damage.
Remember to give due consideration to safety when making your circuit designs, with appropriate
measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of nonflammable material or
(iii) prevention against any malfunction or mishap.
Notes regarding these materials
1. These materials are intended as a reference to assist our customers in the selection of the Renesas
Technology Corporation product best suited to the customer's application; they do not convey any
license under any intellectual property rights, or any other rights, belonging to Renesas Technology
Corporation or a third party.
2. Renesas Technology Corporation assumes no responsibility for any damage, or infringement of any
third-party's rights, originating in the use of any product data, diagrams, charts, programs,
algorithms, or circuit application examples contained in these materials.
3. All information contained in these materials, including product data, diagrams, charts, programs and
algorithms represents information on products at the time of publication of these materials, and are
subject to change by Renesas Technology Corporation without notice due to product improvements
or other reasons. It is therefore recommended that customers contact Renesas Technology
Corporation or an authorized Renesas Technology Corporation product distributor for the latest
product information before purchasing a product listed herein.
The information described here may contain technical inaccuracies or typographical errors.
Renesas Technology Corporation assumes no responsibility for any damage, liability, or other loss
rising from these inaccuracies or errors.
Please also pay attention to information published by Renesas Technology Corporation by various
means, including the Renesas Technology Corporation Semiconductor home page
(http://www.renesas.com).
4. When using any or all of the information contained in these materials, including product data,
diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total
system before making a final decision on the applicability of the information and products. Renesas
Technology Corporation assumes no responsibility for any damage, liability or other loss resulting
from the information contained herein.
5. Renesas Technology Corporation semiconductors are not designed or manufactured for use in a
device or system that is used under circumstances in which human life is potentially at stake.
Please contact Renesas Technology Corporation or an authorized Renesas Technology Corporation
product distributor when considering the use of a product contained herein for any specific
purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear,
or undersea repeater use.
6. The prior written approval of Renesas Technology Corporation is necessary to reprint or reproduce
in whole or in part these materials.
7. If these products or technologies are subject to the Japanese export control restrictions, they must
be exported under a license from the Japanese government and cannot be imported into a country
other than the approved destination.
Any diversion or reexport contrary to the export control laws and regulations of Japan and/or the
country of destination is prohibited.
8. Please contact Renesas Technology Corporation for further details on these materials or the
products contained therein.
AN0303002/Rev1.00 September 2003 Page 18 of 18