REN R20ut4813ej0100-Rfp MAN 20201001
REN R20ut4813ej0100-Rfp MAN 20201001
REN R20ut4813ej0100-Rfp MAN 20201001
User’s Manual
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 Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).
Trademarks
Renesas and the Renesas logo are trademarks of Renesas
Electronics Corporation. All trademarks and registered trademarks
are the property of their respective owners.
It is assumed that the readers of this manual have a basic knowledge of microcontrollers, Windows, and
Linux, and some knowledge of electrical and logic circuits.
Use this software after sufficiently confirming the manual of the microcontroller in use.
2. Conventions
• Note: Footnote for item marked with “Note” in the text.
• Caution: Information requiring particular attention
• Remark: Supplementary information
• Numeral representations: Binary ... xxxx or xxxxB
Decimal ... xxxx
Hexadecimal ... 0xXXXX or xxxxH
• “ ”: Any character or item on the screen that can be selected or input
• : Name of a button
• [ ]: Name of a command, dialog box, tabbed page, option, or area on the screen
3. Terminology
The meanings of the terms used in the Renesas Flash Programmer manual are as follows.
(1/2)
Term Meaning
RFP Abbreviation of “Renesas Flash Programmer”, software for programming flash
memory
E1/E20/E2/E2 Lite Abbreviation of “the E1, E20, E2, or E2 emulator Lite”
J-Link SEGGER-produced debug probe for MCUs
Tool used General term for the tool used by the customer, whether an E1, E20, E2, E2 Lite, or
J-Link.
MCU Abbreviation of “microcontroller unit”
Target MCU The Renesas Electronics MCU with on-chip flash memory which is in use by the user
Target system User-designed board on which the target MCU is mounted
Input clock A clock from an oscillator or a resonator which is externally input to the target MCU
Project file Project files hold the data required to write programs. In the RFP, a project file holds
the settings related to the programming environment, such as target MCU settings
and command option specifications. Project files have the filename extension *.rpj.
Parameter file Parameter files include information required to program the flash memory of the
target MCU, and are created by acquiring information from the MCU. Parameter files
have the extension *.fcf.
ID code Authentication code used in flash programming and in on-chip debugging. For
details, refer to the user’s manual of the target MCU.
Lock bit One of the safety functions of the MCU. For details, refer to the user’s manual of the
target MCU.
HEX file Program file without flash option data
RPI file RPI files are image files generated by the RFP that combine usable HEX files and
flash options data.
RPE file An encrypted program file that has been generated by the encryption utility program
Program file “Program file” refers to a file that contains a program to be written to the MCU. The
RFP supports the following program file formats.
a. HEX files in Intel HEX format
b. HCUHEX files in Intel HEX format
c. HEX files in Motorola S format
d. HCUHEX files in Motorola S format
e. RPI files
Refer to section 1.5.1, RPI File.
The only supported character code is ASCII (one byte). Unicode (two bytes) is not
supported.
f. RPE files
Refer to section 1.5.2, RPE File.
COMx COMx is a serial interface port of the host PC.
When writing data to the target system by using a serial interface of the host PC,
select COMx as the tool to be used. Any value from 1 to 256 can be specified for x.
(2/2)
Term Meaning
USB Direct USB Direct is a method of writing to the MCU in the USB boot mode by using the
USB interface port of the host PC.
FINE FINE is a single- or dual-line communications interface operating through the FINE
pin or pins of an MCU. Some of our MCUs support writing via single line FINE.
ID authentication mode One of the security functions of the MCU. Connection of the flash programmer is
protected by ID authentication.
OTP A security function of the MCU. For details, refer to the user’s manual of the target
MCU.
Access window (AW) This is also referred to as the “flash shield window”. The specified range is selected
as the access window (and window area), and functionality in other ranges is
restricted to a degree which depends on the operating mode. For details, refer to
the user’s manual of the target MCU.
Flash options Flash options are settings which determine the state after the MCU is reset, and is
a general term for settings which must be specified separately from the HEX file.
TSIP Dedicated hardware secure IP (trusted secure IP) for managing the encryption key.
For details, contact a Renesas Electronics sales office.
DLM Management to maintain security in the entire life cycle of the device (device life-
cycle management).
For details, refer to the user’s manual of the target MCU.
Authentication code A collective term for authentication codes, including ID codes, passwords, and
DLM keys.
4. Replacing Terms
Some terms in this manual should be replaced as shown in the table below, depending on the MCU to be
used.
All trademarks and registered trademarks are the property of their respective owners.
Table of Contents
1. Overview .......................................................................................................................... 10
1.1 Features ................................................................................................................................................... 10
1.2 Supported Microcontrollers ...................................................................................................................... 10
1.3 System Overview ..................................................................................................................................... 11
1.3.1 Connection with the Target System ............................................................................................... 11
1.4 Operating Environment ............................................................................................................................ 12
1.4.1 Hardware Environment .................................................................................................................. 12
1.4.2 Software Environment .................................................................................................................... 12
1.5 Formats of Program Files ........................................................................................................................ 13
1.5.1 RPI File........................................................................................................................................... 13
1.5.2 RPE File ......................................................................................................................................... 13
1.6 Relative Paths for Files ............................................................................................................................ 13
1. Overview
The Renesas Flash Programmer (hereafter referred to as the RFP) is software that uses an E1 emulator
(hereafter referred to as the E1), E20 emulator (hereafter referred to as the E20), E2 emulator (hereafter
referred to as the E2), or E2 emulator Lite (hereafter referred to as the E2 Lite) via a serial or USB interface or
a J-Link debug probe (hereafter referred to as the J-Link) to erase, write, and verify programs on a target
system on which a Renesas Electronics MCU with on-chip flash memory is mounted.
1.1 Features
• Writing controlled by the host PC
• High-speed writing by using an emulator
• Simple operation for writing with a simple GUI specific to development
• Automatic writing from a command line
• Programming of a unique code to a designated area of flash memory
• Support of encrypted program files
https://www.renesas.com/rfp
E1
PC
Target system
+ USB cable Target cable
E20
Renesas E2
Flash Programmer
E2 Lite
J-Link
USB cable
For examples of programming circuits by using the E1, E20, E2, or E2 Lite, refer to the user’s manuals for the
individual products.
For examples of programming circuits by using the USB, refer to the hardware manual of the target MCU you
are using.
Examples of programming circuits by using the serial interface of the host PC are provided on the web page at
the following link.
https://www.renesas.com/rfp
(1) Host PC
• E1
• E20
• E2
• E2 Lite
• J-Link
Note: The following restrictions apply to the J-Link.
Target MCUs: RA series
Communications method: 2-wire UART
Communications rates: 115200 bps or 9600 bps
Remark: The supported target MCUs differ with the tool. For the target MCUs supported by the different
tools, refer to List of MCUs Supported by Renesas Flash Programmer V3.
Remarks: 1. We recommend having the latest service pack or version of Windows installed.
2. The GUI (RFPV3.exe) does not run under Linux.
• The format file ends with the end record (S7, S8, or S9).
• All lines consist solely of record types S0 to S9 (excluding S4).
An RPI file is an image file that the RFP can generate. An RPI file combines program code and flash options
data. Refer to section 2.4.1 for the generation of these files.
An RPE file is a file generated by using the encryption utility program to encrypt a program file. Refer to
section 2.7 for the generation of such files.
• Program file
• Unique code file
2. Descriptions of Functions
This chapter describes the window structure and functions of the RFP.
(1)
(2)
(3)
(4)
Operations on the tabbed pages enable controlling the RFP for writing, setting options, and so on. For details
on the individual tabbed pages, refer to section 2.3, Operation of the Tabbed Pages.
The version information of RFP and the contents and results of command execution are displayed here.
Caution: Log entries older than the 1500th line are automatically removed.
Pressing this button clears the contents of the log output window and the status information on the [Operation]
tabbed page.
Selecting [File] → [Create a new project] in the menu bar makes the [Create New Project] dialog box appear.
The configuration of the dialog box is shown below.
(1)
(2)
(4)
(3)
(5)
(1) Microcontroller
Specify the name of a project which is to be newly created and the project folder which will hold the created
project file.
Remark: Since the project name is used in the file name, characters that are not usable in file names cannot
be used.
(3) Communication
• “Tool”
Select the tool to be used for connection with the target MCU.
Caution: For the USB connection of RX65x, RX66x, RX72x, RA, RE devices with Renesas SynergyTM, select
“COM”, since serial communications are performed through a virtual USB COM port.
Remark: The usable tools may differ with the selected target MCU.
• “Interface”
When this item is selectable, select the method for communicating with the target MCU.
• Tool Details…
Make detailed settings for the tool to be used. The tool in use and the setting for the supply of power
supply are shown to the right of Tool Details…. For details on Tool Details…, refer to section 2.2.2, [Tool
Details] Dialog Box.
When “Wide Voltage” is selected, each command can be executed with the target microcontroller set to wide
voltage mode. When writing to the target MCU proceeds with a voltage lower than 2.4 V, deselect this
checkbox. For details on the wide voltage mode, refer to the user’s manual of the target MCU.
Remark: “Wide Voltage” is not displayed for those target MCUs which do not support it.
(5) Connect
At this time, the following dialog boxes might be displayed according to the type of the target MCU; enter a
value in each dialog box to continue processing to make the connection.
Caution: If the connection is made with incorrect settings, the tool or the target system might be damaged.
For details, refer to chapter 5, Points for Caution.
The [Tool Details] dialog box consists of the following tabbed pages.
(3)
(1)
(2)
(5)
(4)
(6)
Tools which are currently available are shown; select the tool to be used.
When the “Auto Select” checkbox is selected, the tool which is shown at the top of the list is automatically
selected. To directly select the tool to be used, deselect the “Auto Select” checkbox and select a tool from the
list.
Remark: For the E1, E20, E2, or E2 Lite, the serial number of the emulator is shown.
For the power-supply function, refer to the user’s manual of the tool you are using.
Caution: Do not use the power-supply function from the tool in processing for mass-production; instead,
supply power which matches the MCU’s specifications from the target system. Since the voltage
supplied from the tool depends on the performance of the USB power supply of the host PC, its
precision cannot be guaranteed.
Remark: [Custom] only appears in the [Tool Details] dialog box when the E2 emulator is selected. A voltage
within the range from 1.8 V to 5.5 V can be specified.
Sets the operation of the reset signal when the RFP is disconnected from the target MCU.
Make settings for pins to be used for the output of reset signals to the target MCU.
Remark: Reset signals are only displayed when the COM port is selected for the tool.
Remark: For the recommended circuit, refer to the user’s manual and the additional document of the tool
you are using.
Remark: “Boot Mode Entry by User” might not be selectable depending on the target MCU or tool in use and
the communications interface.
Selecting “Boot Mode Entry by User” for boot mode entry enables the setting of outputs.
The boxes set the output of the io0 to io5 pins of the tool in use when the target MCU is connected.
• Pin Output
Selected: The target pin is used as an output pin.
Deselected: The target pin is used as hi-Z.
For pin assignments of io0 to io5 in the E1, E20, E2, and E2 Lite, refer to table 2-1 and table 2-2.
Table 2-1 Pin Assignments for the E1, E20, E2, and E2 Lite
20 Pins Pin Name (RA Family) Pin Name (RE Family) Remark
1 VCC VCC
2 ― RxD
3 GND GND
4 io4 io4 / TxD E2 Lite cannot use
5 GND GND
6 TxD ―
7 ― ―
8 RxD ―
9 GND GND
10 RESET RESET
11 ― ―
12 io3 io3 E2 Lite cannot use
13 ― ―
14 io1 io1 E2 Lite cannot use
15 GND GND
16 io5 io5 E2 Lite cannot use
17 GND GND
18 io0 io0 E2 Lite cannot use
19 GND GND
20 io2 io2 E2 Lite cannot use
Remark
- TxD and RxD are signal names of the MUC side.
- E2 Lite does not support the RE family.
The input clock must be set to suit the type of the target MCU.
If setting of the input clock is required, the [Set Clock] dialog box will appear.
The value for frequency is entered in MHz. If you want to enter a value in smaller units than MHz, use a
decimal point.
If entering an authentication code is required, the [Authentication] dialog box will appear.
Remark: Whether or not there is an authentication code function depends on the target MCU.
• Authentication Code
Enter the authentication code in hexadecimal notation (0 to 9 and A to F).
• Auto Authentication
When this checkbox is selected, the authentication code is saved in the project file and authentication
automatically proceeds from the next time the project is opened.
Caution
- If the value of the input field takes up fewer than the number of effective bytes, the RFP
automatically pads the input data with 0xFF after the input value.
- When an RX-family device is connected via the RFP, input the value in the order ID1, ID2, ..., ID16.
However, for a device with control code, enter the value of the code as the first of the effective
bytes.
Example:
When the number of effective bytes = 16, control code = 0x45, ID code = ID1=0x01, ID2=0x02,
ID3=0x03, ID4=0x04, ID5=0x05, ID6=0x06, ID7=0x07, ID8=0x08, ID9=0x09, ID10=0x0A,
ID11=0x0B, ID12=0x0C, ID13=0x0D, ID14=0x0E, and ID15=0x0F, the value will be
‘450102030405060708090A0B0C0D0E0F’.
- When RX72x, RX71x, RX66x, RX65x, or RX64x device is connected via a debug tool which has
been specified with the CS+ or e2 studio, the order for input of the authentication code changes to
that shown below.
ID4 ID3 ID2 ID1 ID8 ID7 ID6 ID5 ID12 ID11 ID10 ID9 ID16 ID15 ID14 ID13
- When an RA-family, Renesas Synergy-family, or RE-family device is connected to the RFP, input
values to be specified for registers of the target MCU in order of bits 127 to 0 in byte units. Since the
input specification may also differ with the tool, confirm the input specification of the tool you will be
using.
Remark: The default authentication code in some target MCUs at the time of shipment is all FFs. For details,
refer to the user’s manual of the target MCU.
Operating the tabbed pages in the main window allows you to make detailed settings of the RFP.
The following describes the configuration and operation of each tabbed page.
The [Operation] tabbed page shows information on the project and flash operation.
(1)
(2)
(3)
(4)
(5)
(2) Endian
This item does not appear for target MCUs which do not support changing the endianness in the RFP.
• “Little”
Set the handling of files for programming as little endian.
• “Big”
Set the handling of files for programming as big endian.
Set the path to a file to be programmed in the flash memory of the target MCU.
Multiple files for programming are also selectable simultaneously. Refer to 2.3.1.1, Selecting Multiple Program
Files, for details.
Caution: This CRC-32 is a check sum for whole of file, not for HEX data. The file check sum is different from
the check sum of the one obtained from MCU.
Clicking on Start leads to the execution of commands to handle the processing shown above Start.
Information on the state is indicated with color and characters in the status display to the right of Start. For the
status display, refer to table 2-3.
The type of flash operation can be changed on the [Operation Settings] tabbed page. For the [Operation
Settings] tabbed page, refer to section 2.3.2, [Operation Settings] Tabbed Page.
Immediately after the RFP has been started or after clicking on the Clear button under
the output panel
When selecting multiple files, specify all desired files beforehand then press the [Start] button to run the actual
programming. Selecting Browse… opens the [Specify a program file] dialog box. The files can be recorded by
selecting them by mouse or by using the CTRL or SHIFT keys with the mouse or mouse and cursor keys, and
then selecting Open.
(1)
(2)
Figure 2-8 [Program File] Group Box after the Selection of Multiple Files for Programming
Only the file names are displayed when multiple files have been selected. That is, the path is separately
displayed.
Caution
- An error occurs if an RPI, HCUHEX, or RPE file is specified in the selection of multiple files.
- An error occurs when writing to the flash area in cases of overlapping between the addresses of the
data files for programming.
- The selected multiple files must be in the same folder.
Settings for the flash operation can be changed on the [Operation Settings] tabbed page.
Remark: Some items will not be shown according to the selected program file or the type of the target MCU.
(3)
(1)
(4)
(5)
(2) (6)
(1) Command
Specify the type of processing that will proceed after clicking on Start in the main window.
When multiple operations are specified for “Command”, each operation is executed from the top item in order.
The following five types of processing can be specified for “Command”, and are described in more detail
following the summaries below.
• Erase
Erase the flash area.
The range of areas to be erased conforms to the setting made with “(3) Erase Option”.
• Program
Program the flash area.
The operation reflects the setting made under “(4) Program & Verify Option”.
• Verify
Perform verification.
The operation reflects the setting made under “(4) Program & Verify Option”.
• Checksum
Acquire the checksum.
The checksum is calculated by the method selected under “(5) Checksum Type”.
Remark: The results are output in units of areas of flash memory. Use the verify command if you want to
check the consistency of data in units of blocks.
Select the method for handling ranges for which files have no data in each area of flash memory.
Caution: Even if “Fill with 0xFF” is not selected, this action always applies for the minimum unit of
programming by the MCU.
Caution: Erasure processing may be skipped for certain blocks reserved by the MCU due to security
functions and so on.
• Erase Chip
Erase all blocks and clear the flash options.
Caution: This processing does not restore the MCU to its state at shipment. If correct settings are not
programmed for the flash options after erasing the chip, the MCU will not operate.
When this processing is used on an RH850 family product, be sure to refer to chapter 5, Points for
Caution.
Set options here when you have selected “Program” or “Verify” for “Command”.
Caution: The range to be erased depends on the minimum unit of erasing by the MCU.
• Verification type
Select the type of verification as one of the following items. Depending on the target MCU, only one type
may be available.
Select the method for handling cases where the program file attempts access to data which is out of the range
of memory in the MCU.
The blocks for operations can be set on the [Block Settings] tabbed page.
Remark: The columns to be displayed differ according to the type of the target MCU.
Information on the ranges of the block areas for the target MCU is shown.
Caution: Common area names and block numbers are used in the RFP; note that they may differ from those
described in the user’s manuals of the target MCUs.
When “Erase Selected Blocks” is selected for “Erase Option” on the [Operation Settings] tabbed page, blocks
with checkboxes selected in the Erase column are to be erased.
Blocks with checkboxes selected in the P.V column are to be programmed or verified.
While “Program Flash Option” is selected, the settings are only reflected in the MCU when the type of setting
is enabled on the [Flash Option] tabbed page.
• Lockbit column
Select blocks for which the lock bit is to be set.
A lock bit is set for blocks with the checkbox selected.
• OTP column
Select blocks to be set as OTP.
Blocks with the checkbox selected are set as OTP.
The flash options of the MCU can be set in the [Flash Option] tabbed page.
Remark: Only those items the target MCU supports are shown. For the meanings and details of the settings
of the individual items, refer to the user’s manual of the target MCU in use.
(1) Lock-Bit
The blocks for which the lock bit is to be set are selected on the [Block Settings] tabbed page.
(2) OTP
Specify OTP.
The blocks to be set as OTP are selected on the [Block Settings] tabbed page.
• “Set Option”
“Do Nothing”: Access window is not set.
“Set”: The setting of access window is enabled.
• “Operation Setting”
“Prohibit outside the range”: Programming or erasing of blocks outside the range from the start block to
the end block is prohibited.
“Prohibit inside the range”: Programming or erasing of blocks within the range from the start block to
the end block is prohibited.
• “Disable Rewriting”
“No”: Making changes within the access window is not disabled.
“Yes”: Making changes within the access window is disabled.
• “Set Option”
“Do Nothing”: Option bytes are not set.
“Set”: The setting of option bytes is enabled.
Caution: Since the extended option bytes contain important settings for the MCU, take care with the data to
be programmed if you enable this operation. Normally use this option as “disabled” unless you have
a particular reason to do otherwise.
• “OPBT0∼OPBT7”
Enter the settings for option bytes in units of four bytes in hexadecimal notation (bit31....bit0).
• “OPBT8” or later
Enter the settings for extended option bytes in units of four bytes in hexadecimal notation (bit31....bit0).
(5) ICU-S
Set ICU-S.
• “Set Option”
“Do Nothing”: ICU-S is not set.
“Set”: The ICU-S function is enabled.
Caution: Once the ICU-S function is set for the MCU, it cannot be canceled by the RFP.
(6) Security
• “Set Option”
“Do Nothing”: The security function is not set.
“Set”: The security function is enabled.
• “Disable Block Erase / Disable Program / Disable Read / Disable Rewriting boot cluster / Disable Initialize
Command”
“No”: The security function is not set for the target command.
“Yes”: The use of the target command is prohibited.
Caution
- Once the Disable Block Erase, Disable Rewriting boot cluster, or Disable Initialize Command
functions has been set for an MCU, the setting cannot be reversed.
- Even if the security setting is “No”, the security setting for the MCU is not reversed.
Make the setting for disabling connection in serial programming mode or both the debugger and serial
programming mode.
Caution: Once the Connection Prohibited function is set for an MCU, the setting cannot be reversed.
• “Set Option”
“Do Nothing”: An ID code or access password is not set.
“Set”: The setting of an ID code or access password is enabled.
• “ID Code”
Enter the ID code in hexadecimal notation.
(9) DLM
• “Set Option”
“Do Nothing”: A transition of the DLM state is not to be set.
“Set”: The setting of DLM transitions is enabled.
• “Target State”
Select the destination of the DLM transition from the pull-down menu.
Specify the DLM key file for use in DLM authentication which is to be set for the target MCU.
For details on how to generate DLM keys, refer to section 2.8, Renesas Flash Programmer Utility Program.
• “Set Option”
“Do Nothing”: A DLM key is not to be set.
“Set”: The setting of a DLM key is enabled.
Remark: If a DLM key file is not specified, programming of the flash memory will not proceed.
(11) Boundary
Set the size of the secure and non-secure areas of the target MCU.
• “Set Option”
“Do Nothing”: Boundaries are not to be set.
“Set”: The setting of boundaries is enabled.
• “Secure [KB]”
Enter the size of the secure area in KB units.
• “NSC [KB]”
Enter the size of the non-secure callable area in KB units.
Note: Confirm the specifiable sizes in the user’s manual of the target MCU since limits will apply.
• “Set Option”
“Do Nothing”: Flash read protection is not to be set.
“Set”: The setting for flash read protection is enabled.
• “Operation Setting”
“Prohibit outside the range”: Programming or erasing of blocks outside the range from the start block to
the end block is prohibited.
“Prohibit inside the range”: Programming or erasing of blocks within the range from the start block to
the end block is prohibited.
• “Disable Rewriting”
“No”: Rewriting of flash read protection is not disabled.
“Yes”: Rewriting of flash read protection is disabled.
• “Set Option”
“Do Nothing”: An extra option is not to be set.
“Set”: The setting of an extra option is enabled.
• “Disable Rewriting”
“No”: Rewriting of an extra option is not disabled.
“Yes”: Rewriting of an extra option is disabled.
Caution: Once the Extra Option function is set for an MCU, the setting cannot be reversed.
The information required to connect the MCU can be set on the [Connect Settings] tabbed page.
Remark: The items displayed differ according to the type of the target MCU.
(1) (2)
(3)
(4)
(5)
(1) Communication
For details, refer to section 2.2.1, [Create New Project] Dialog Box.
(2) Speed
Select the bit rate for use in communications with the target MCU.
The available bit rates differ according to the environment of the target MCU and the target system.
Caution: The speed is only directly specifiable for a COM connection. Since using this may lead to the RFP
being unable to detect a bit-rate error, set the speed only after confirming that it will not cause a
problem.
Remark: The maximum rate that the E2 Lite can support is 1.5 Mbps. However, only rates which are
selectable from the external clock of the target MCU or system are displayed for the RX family. The
baud rate which was selected for the E1, E20, or E2 emulator might not be selectable.
For details, refer to section 2.2.1, [Create New Project] Dialog Box.
Change the frequency of the input clock from that which was set when the project was created.
When “Auto Authentication” is set to “Yes” in the dialog box which is displayed in response to clicking on the
Settings… button, the ID code or access password that has been entered is used for authentication. To
change the value used for automatic authentication, enter a new value.
Remark: If “Auto Authentication” is set to “No”, the ID code or access password will not be saved in the
project file.
The [Unique Code] feature is for the embedding in a specified area of a unique code for the loaded program
file. The feature becomes effective when a unique code and specified area are written to a unique code file,
and the file name is set on the [Unique Code] tabbed page. A unique code file can contain a single
specification of an area and multiple unique codes, with an index for each of the unique codes. The next index
will be specified when a [Program] command ends normally; however, no index will be specified when a
[Flash Option Program] command ends normally.
(1)
(2)
(4)
(3)
Usage or non-usage of the unique code feature can be set in this checkbox.
Open the [Open] dialog box by clicking on Browse…, and specify a unique code file.
• “All”
Obtain the first and last indices from the unique code file. This starts from the first index when the RFP is
rebooted.
[Remark] If the checkmark is removed, an error message is displayed and the process is cancelled, in cases
of contention with existing data during embedding of the unique code.
*.ruc
A unique code file is a text file. A file consists of a header and a code part. Write a list of the combinations of
indices and unique codes after the header, which defines the location where the unique code is to be
embedded. The only supported formats for the codes are ASCII (one byte) character codes. Unicode is not
supported.
• Comment line
Line starting with “//” are considered as comments and ignored in processing. Lines consisting only of
blanks are also ignored.
• Separating characters
Tabs, spaces, or commas can be used as separating characters in the header definitions and the settings
of the indices and unique codes.
• Header part
The header part has the following definitions that are case-insensitive.
• Codes
The list of unique codes consists of indices and codes, with only one code and index per line. Indices need
not be prefixed by padding with“0” as in the example. They are assumed to be base-10 ordinal numbers in
ascending order.
• Limit on size
The size of a unique code file should be no greater than 2 GB.
format hex
address 0xf000
size 6
index data
000001 abcdef000001
000002 abcdef000002
000003 abcdef000003
The [User Keys] feature is for storing the encrypted user keys in the TSIP. For the type of user keys and the
features, refer to the user’s manual of the TSIP.
Remark: Whether or not a user key function is available depends on the target MCU.
(1)
(2)
(3)
(4)
Usage or non-usage of the feature for writing the user key can be set in this checkbox.
Specify a user key file or the address to which the file is to be written.
For details on how to generate user key files, refer to section 2.8, Renesas Flash Programmer Utility Program.
• “Address”
Enter the address to which the user key file is to be written.
• “Add Key”
Register the user key file in the list of key files by clicking on the Add Key button.
When a file to be removed is selected from a list of key files, clicking on the Remove Selected Keys button
removes the file from the list.
• [New Project]
Create a new project.
For details, refer to section 2.2, Creating a New Project.
• [Open Project]
Open an existing project file.
• [Save Project]
Save the changes to the current project.
Cautions:
- The memory ranges are in accord with those selected in the P.V column on the [Block Settings]
tabbed page.
- The setting of [Fill with 0xFF] on the [Operation Settings] tabbed page is applicable.
- Data which exceed the address range of the MCU in use are not deleted.
- Only values which represent valid settings can be saved as flash options.
• [File Checksum]
The checksum of the program file is displayed in the [Log output] panel.
Remark: For the checksum operation, use the method specified on the [Operation Settings] tabbed page.
• [Exit]
Exit the RFP.
Selecting [File] → [Set File Password] in the menu bar makes the [File Password] dialog box appear, allowing
you to set the password for use in decryption. The password for decrypting an RPE file is encrypted and
saved on the host PC.
Remark: You must run the RFP as an administrator to set a file password. The password cannot be set
without administrator rights.
(1)
(2) (3)
Remark: The alphanumeric characters are handled as case-sensitive; the usable symbols are as follows.
(3) [Show]
When an RPE file is decrypted, the [File Password] dialog box appears to allow the entry of a password if a
password has not been saved on the host PC or decryption of the file has failed.
Remark: The password that has been entered is only retained while the RFP is running.
(1) (2)
Remark: The alphanumeric characters are handled as case-sensitive; the usable symbols are as follows.
(2) [Show]
Caution: Selecting items from the [Device Information] menu leads to transfer to and from the target MCU to
acquire information. Before selecting an item, check the connection between the host PC and the
target MCU. If a connection is not found, an error will occur.
Remark: Some menu items will not be usable according to the type of the target MCU.
• [Read Memory…]
Connect the target MCU and read and save the contents of the flash areas.
For details, refer to section 2.4.2.1, Read Memory.
• [Blank Check]
Connect the target MCU for blank checking.
• [Initialize Device]
For a connected target MCU, initialize the settings for flash memory, boundaries and so on, and cause the
DLM state to change to SSD.
• [DLM Transition…]
Cause a transition of a connected target MCU to the DLM state.
For details, refer to section 2.4.2.4, DLM Transition.
When [Device Information] → [Read Memory] is selected from the menu bar, the [Save As] dialog box will
appear. Specify the file and folder where the data that have been read are to be stored.
Clicking on the Save button shows the [Read Memory Information] dialog box. Specify the range of the flash
area to be read.
Remark: The Motorola S format or the Intel HEX format is selectable as the file format for saving.
(1)
(4)
(2)
(3)
(5)
Information on the area that has been selected from the list of areas or on all areas is shown.
Remark: The size of the area for judging whether a range is blank or not differs according to the target MCU.
Furthermore, in some target MCUs, selecting this option will significantly increase time for reading.
(5) Read
Connect the target MCU, start reading the range specified in “Select Address”, and save the data in the
specified file and folder.
When [Device Information] → [Read Block Information] is selected from the menu bar, the [Read Block
Information] dialog box will appear after connecting the target MCU, and information on blocks, including lock
bits, OTP flags, and access window, will be read. Note that the columns to be shown differ according to the
type of the target MCU in use.
(2) (3)
(1)
(4)
For details on each item, refer to section 2.3.3, [Block Settings] Tabbed Page.
Clicking on OK reflects the read contents of the checked items in the corresponding columns of the [Block
Settings] tabbed page.
When [Device Information] → [Read Flash Option] is selected from the menu bar, the [Read Flash Option]
dialog box will appear after connecting the target MCU and information on Option Bytes and Security will be
read out. Note that the items to be shown differ according to the type of the target MCU in use.
(1)
Selecting the checkbox and clicking on OK reflects the read contents on the [Flash Option] tabbed page.
In the dialog box that is displayed by selecting [Device Information] → [DLM Transition] from the menu bar,
selecting the target DLM state and clicking on Transition cause the required transition of the DLM state.
Caution: This item is only displayed when the DLM state of the MCU is “RMA_REQ”.
The loading of a license file and the version of the RFP can be confirmed from this menu.
• [Activate License]
Refer to the documentation which comes with the product for the usage of this menu item.
• [Deactivate License]
This menu item is only available for the Commercial Edition.
Use this menu to release authentication of the license.
• [About]
The [About] message box is opened and displays the RFP version number.
An option may have one or more parameters; the number of parameters is determined by the option.
Otherwise, 1 is returned.
2.5.2 Restriction
When command-line statements specifying the same project file are started at the same time, the same value
may be written as the index of the unique code.
Item Description
RFPV3.exe A name of a file to be executed.
RFPV3.Console.exe A name of a file to be executed with the standard output facility. This
file always starts the RFP in silent mode.
Option… Option names prefixed by a slash (/).
• Specify parameters as required.
• If [Option…] is omitted, operation of the RFP is the default.
• Options and parameters are not case sensitive.
• Absolute or relative paths can be used for the name of the file.
ProjectFile Specifies the name of a project file.
• If this item is omitted, operation of the RFP is as follows.*
When there is a project that has been recently used, that project
will be opened. When no such project has been set up yet, the
RFP is started without opening a project.
• Absolute or relative paths can be used for the name of the file.
Note: An error will occur if RFPV3.Console.exe is used.
Caution: Pathnames that include spaces must be enclosed in double-quotation marks (").
The following lists start options for the RFP. If a command that cannot be used with the specified project file is
specified, the E0000017 error message will be displayed.
The following options for the command can only be specified in silent mode.
writebit Address None Writes data to the device in 1-bit units. The endianness is
BitPos specified by the settings for the project. If the endianness is
not specified for the project, little endian will be used.
BitData
• Address: Specify the start address as a hexadecimal
number.
• BitPos: Specify the start bit number (0 to 31). For 4-byte
data, the most significant bit is 31 and the least
significant bit is 0.
• BitData: Specify the data to be written in binary. Write
the bit data in descending order from the specified bit
number to the least significant bit (up to 32 characters
are specifiable).
Command Command Setting in Specifies processing to be executed. This depends on the
the project settings in the project. When the read option is specified, the
command option is ignored.
Select the commands to be executed from among the
following. Some commands can be specified in combination
but their order is ignored.
• Commands
e: Erase
p: Program*
v: Verify
o: Program Flash Options*
y: Verify Flash Options
s: Checksum
Regarding the usage of the command line, refer to the separate guide “rfp_cli.md”.
Remark: rpe.exe is stored in the same location as that for RFPV3.exe in the folder where the RFP has been
installed.
Otherwise, 1 is returned.
The following lists start options for the encryption utility program.
Option Description
file Specifies the file to be input (this specification is mandatory).
• The file can be specified as a relative path from the working directory.
• Files to be encrypted: Intel Hex, S-Record, HCUHEX, and RPI
• Files to be decrypted: RPE
password Specifies the password for use in encrypting or decrypting the file (this specification is
mandatory).
If the password includes symbols, enclose each in double-quotation marks (").
decrypt Decrypts an encrypted file (RPE).
If this option is not specified, the file is encrypted.
output Specifies the destination for output of a file.
If this option is not specified, the directory holding the input files is used.
• The file can be specified as a relative path from the working directory.
nooverwrite Prohibits overwriting of output files.
? Displays help information on the options.
Caution: Pathnames that include spaces must be enclosed in double-quotation marks (").
Remark: Enter a password made up of alphanumeric characters and symbols (up to 64 characters). The usable symbols
are as follows.
!, @, #, $, ^, &, *, (, ), _, -, +, =, [, ], {, }, ;, :, <, >, |, ., /, ?
Example:
Remark: rfp-util.exe is stored in the same location as RFPV3.exe; that is, in the folder where the RFP has
been installed.
• Encryption with the use of user factory programming keys (UFPKs) as DLM keys and user keys
• Generation of random UFPKs and initialization vectors (IVs)
• Output of UFPK files for the Renesas Key Wrapping Service
• Generation of Renesas key files
• Generation of RMA authentication codes with unique IDs
Otherwise, 1 is returned.
Item Description
rfp-util.exe A name of a file to be executed.
command Command names prefixed by a slash (/) or a hyphen (-).
command: genufpk, genkey, or calcresponse
options… Option names prefixed by a slash (/) or a hyphen (-).
• Specify parameters as required.
• Options and parameters are not case sensitive.
• Absolute or relative paths can be used for the name of the file.
? Displays help information on the options.
Caution: Pathnames that include spaces must be enclosed in double-quotation marks (").
Command Description
genufpk Generates a UFPK file.
When generation was successful, the generated UFPK is displayed in
the console.
genkey Generates a Renesas key file.
When generation was successful, a wrapped UFPK (W-UFPK), IV,
and encrypted key (including a message authentication code, MAC)
are displayed in the console.
calcresponse Calculates a response value for use in challenge-and-response
authentication and outputs it to the console.
The following lists start options for the key encryption utility program.
Remark: A hexadecimal data or binary file can be specified for the parameters indicated as Hex data. To
specify a file, use the path to the file with “file=” as a prefix.
Example:
(genufpk)
(genkey)
(calcresponse)
The operations of creating, erasing, programming, and verifying a new project file are explained here. The
conditions for the series of operations used in the examples are as follows.
Create a new project file. Start the RFP. Open a created workspace.
Execute a command.
Connect the USB port of the host PC to the tool you will be using via the USB cable.
Caution: If power is to be supplied on the target system, be sure to connect the tool in use to the target
system before switching the power on.
(3) Select the [Select Tool] tabbed page and the [Auto Select] checkbox.
After that, select “5.0V (USB VBUS)” in [Power Supply].
Click on OK.
(5) When a project is created, the display of the main window changes with the addition of new tabbed pages.
Check the information displayed in Project Information.
(4) Check that the commands above Start are displayed as “Erase >> Program >> Verify”.
Click on Browse… in “Program File” on the [Operation] tabbed page and select a program file from among
those displayed in the dialog box (in this example, “C:\RFP_ProgramFile\sample.hex”).
Check that the path to the program file selected in the “Program File” box is indicated.
(2) The [Progress Report] dialog box shows the state of command execution.
The state information is changed to “Run” and details of the processing are output as a log in the log
output panel of the main window.
When command execution is completed, the [Progress Report] dialog box is automatically closed and the
main window is displayed.
(3) When command processing is completed normally, the message “Operation completed.” is displayed in
the log output panel and the state information is displayed as “OK”.
(1) Remove the target cable of the tool in use from the target system.
Caution: If VDD is being supplied on the target system, turn off the supply power before removing the target
cable of the tool in use from the target system.
(2) If you do not need to program another target MCU, select [File] → [Exit] and exit the RFP. Since all
settings that you have made are saved in the project file, they can be reused when the RFP is restarted.
When you intend to continue to program other target MCUs, connect the target system (step (2)) and
execute the required commands (step (6)).
4. Troubleshooting
This chapter explains how to troubleshoot the RFP.
Remark If an error occurs during the sequence of a procedure, refer to this chapter and the user’s manual of
the target MCU. Also refer to the user’s manual of the tool you are using and execute diagnostic
tests. If this still does not resolve the problem, refer to the FAQ (at <https://www.renesas.com/rfp> ->
Design Support -> FAQ). If you are using the product version of the RFP, contact Renesas via the
Renesas website (http://www.renesas.com/contact) after writing down the PID number printed on
the back of the CD case for the RFP.
(1) When the tool is connected to the host PC via a USB interface, plug and play does not recognize
the driver.
Cause:
The USB connector might not be inserted properly into the USB port of the host PC.
Action:
Check that the USB connector is fully inserted into the USB port of the host PC. Alternatively, disconnect the
USB connector, and then insert the USB connector again after a while.
(2) The tool is connected to the host PC but the power LED on the tool is not turned on.
Cause:
Action:
Check the tool for defects by using the diagnostic tool for the tool in use. If you find a defect, consider repairs.
If there is no defect, try connecting the tool to another host PC.
(1) When an error produces the message ‘E3000105 There is no response from the device.’
Cause 1:
Action 1:
(1) Check that the connection with the target system is in accord with the recommended circuits shown in the
user’s manual of the tool in use. Also check that all required pins of the tool have been connected.
(2) For the RL78 family, check that the EMVDD pins of the E1, E20, E2, or E2 Lite have been correctly
connected.
Cause 2:
Action 2:
(1) Refer to the user’s manual for the target MCU and check that all required mode pins are being handled
correctly.
(2) For the RX family, check that the settings for I/O signals in the [Tool Details] dialog box match the wiring of
the target system.
Cause 3:
The wrong MCU might be selected in the [Create New Project] dialog box.
Action 3:
Cause 4:
Action 4:
Cause 5:
Action 5:
Cause:
The wrong driver may be being recognized as the driver for booting via the USB. “Generic Boot USB Direct”
should normally be recognized.
Action:
Install the correct driver through the following steps (Windows 7 is used in this example).
(1) When the wrong driver is being recognized, Windows Device Manager will show the following state.
(2) When you select “Update Driver Software”, the following dialog box is displayed. Select “Browse my
computer for driver software”.
(4) The dialog box below is shown. If “Generic Boot USB Direct” is not displayed, use the RFP installer to re-
install the USB driver for the USB boot MCU Type A. Select “Generic Boot USB Direct” and click on Next.
(5) Installation of the driver for booting via the USB is finished.
Action:
Refer to the address in the program file at which the ID code was set.
When the control code for the ID code is set so that the whole flash memory is erased after consecutively
entering a wrong ID code three times, you can program the flash memory after returning to boot mode.
(1) When the following errors occur while the tool is connected
Action 1:
When using USB Direct, Refer to section 4.2, Problems during Operation.
Action 2:
The tool you are using might have locked up. Try disconnecting and then reconnecting the USB cable.
Action 3:
The host PC might be unstable or the USB port might be broken. Restart the host PC or connect the tool to a
USB port other than that you are trying to use.
Action 4:
On the E1, E20, or E2, the tool might be damaged. Refer to the user’s manual of the tool you are using and
run the self-diagnostic test.
Action:
The setting of the target MCU might be wrong or communications might not be stable. Check the following
items.
Remark Good communications may not be possible if you are using a USB-to-serial converter, a self-made
cable, a self-made extension cable, or the like for connection with a tool.
E1000002 Message A fatal error occurred during control of the flash memory. (Response XX:XX)
Description −
E1000004 Message A transmission data error occurred in the device. (Response XX:XX)
Description Refer to section 4.3, Problems during Communications.
E1000005 Message An input frequency error occurred in the device. (Response XX:XX)
Description This error occurs when the value specified for the input clock signal cannot be used
in the MCU.
For details, refer to the user’s manual of the target MCU.
E1000006 Message A frequency error occurred in the device. (Response XX:XX)
Description This error occurs when the MCU failed to make the clock settings.
Check the value of the input clock or the settings of the target MCU.
For details, refer to the user’s manual of the target MCU.
E1000007 Message An authentication code error occurred in the device. (Response XX:XX)
Description This error occurs when an ID code different from that set in the target MCU is
entered (the message is the same for an incorrect access password).
If you have forgotten the configured ID code, connection to the MCU for serial
programming is basically disabled. However, erasure of the whole flash memory is
enabled as an exception in some MCUs; for details, refer to the user’s manual of
the target MCU.
E1000008 Message An address error occurred in the device. (Response XX:XX)
Description −
E1000009 Message A baudrate error occurred in the device. (Response XX:XX)
Description This error occurs when a bit rate which the MCU cannot generate is selected.
Check the settings for the bit rate and the clock.
E100000A Message A sequencer error occurred in the device. (Response XX:XX)
Description This error will occur in the following cases.
• When an operation is attempted in an area reserved by the security function of
the MCU
• When the MCU is malfunctioning
E100000C Message A serial programming connection is prohibited for this device.
Description This error occurs when the security setting to prohibit connection has been made.
The serial programming function then cannot be used.
E100000D Message A flow error occurred in the device. (Response XX:XX)
Description −
E100000E Message A protection error occurred in the device. (Response XX:XX)
Description Execution of a specified command might have failed because the security setting to
prohibit it in the target MCU has already been made. Although some security flags
can be cleared by erasing the chip, others cannot.
For details, refer to the user’s manual of the target MCU.
E100000F Message A blank error occurred in the device. (Response XX:XX)
Description −
If a valid ID code has not been set before the MCU is connected (i.e. the device is not protected),
manipulation of the user boot mat is not possible on completion of the connection. To enable manipulation of
the user boot mat, set a valid ID code before connecting the MCU.
5.2 Host PC
Applies to: All MCUs
Some tools (the E1, E20, E2, E2 Lite, serial interface, and USB interface) may not work with the host PC you
are using. Check the connection between the tool and the host PC. If the tool still does not work, you may
need to use a different host PC.
We do not recommend the use of a USB-to-serial converter because it may cause delays in timing and data
being lost due to the specifications of the converter. Check the operation of the USB-to-serial converter you
are using. If timing is delayed or data are being lost, you may consider using a different USB-to-serial
converter.
Connection of the target MCU in the cases listed below may damage the tool in use or the target system due
to conflicts between signals. Be sure to check that the settings and circuit connection are correct.
When a chip is erased, the configuration data are cleared after all other data have been erased. In other
words, the option settings of the MCU are all erased. Since all settings, including the settings at the time of
shipment, are erased at this time, be sure to make the required settings at the same time.
In addition, processing to clear the configuration data is prohibited in some MCUs. When you wish to erase a
chip, refer to the user’s manual of the target MCU in use and determine whether or not processing to clear the
configuration data can be used.
When the connection is through a COM port or USB Direct, the RFP does not control the reset pin of the
MCU. Reset the MCU in advance when connecting with a target MCU.
When an amount of data is less than the minimum unit for writing to a flash memory, the data are always
padded with 0xFF before writing especially when writing to the configuration setting area.
Setting the following protection functions of the MCU restricts the verification function.
• ID code protection
Proceeding with verification (“Verify by reading the device”) without issuing a reset after the ID code
protection bit has been set (written) will cause a protection error. To avoid this type of error, be sure to
reset the MCU after setting (writing to) the ID code protection bit. The RFP enters the ID authentication
mode and verification is enabled.
For MCUs that support a dual-bank structure, the RFP recognizes MCUs in the dual and linear modes as
different MCUs. Thus, when the bank mode of an MCU has been changed, the error “E3000107 This device
does not match the connection parameters.” will occur. In the RFP, newly create and change projects if you
change the bank mode.
The bank mode for the MCU is changed by the following actions.
• Resetting the MCU after a setting for bank mode which differs from the current setting has been written to
the Bank Mode Select bit
• Resetting the MCU after selecting [Erase Chip] to erase a chip that is currently in dual mode
[How to switch a chip from the linear mode to the dual mode]
The following describes the steps in switching a chip from the linear mode to the dual mode.
• 1. Connect the MCU in the linear mode and create a new project for the linear mode.
• 2. Select the erasure option as [Erase Chip] to erase the chip.
• 3. Program the option-setting memory with a file that specifies the dual mode.
• 4. Reset the MCU.
R20UT4813EJ0100