User’s Manual
16
RL78 Family
EEPROM Emulation Library Pack02
Japanese Release
ZIP file name: JP_R_EEL_RL78_P02_Vx.xx_x_E
16-Bit Single-Chip Microcontroller
Supported Devices:
RL78/D1A
RL78/F12
RL78/F13
RL78/F14
RL78/G13
RL78/G14
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corporation without notice. Please review the latest information published
by Renesas Electronics Corporation through various means, including the Renesas Electronics
Corporation website (http://www.renesas.com).
RL78/G1A
RL78/I1A
RL78/L13
RL78/L1C
www.renesas.com
Rev.1.00
Mar 2014
Notice
1.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software,
and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you
or third parties arising from the use of these circuits, software, or information.
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.
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.
You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part.
Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration,
modification, copy or otherwise misappropriation of Renesas Electronics product.
Renesas Electronics products are classified according to the following two quality grades: “Standard” and “High Quality”. The
recommended applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below.
“Standard”:
Computers; office equipment; communications equipment; test and measurement equipment; audio and visual
equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
2.
3.
4.
5.
“High Quality”: Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anti-
crime systems; and safety equipment etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to
human life or bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property
damages (nuclear reactor control systems, military equipment etc.). You must check the quality grade of each Renesas
Electronics product before using it in a particular application. You may not use any Renesas Electronics product for any
application for which it is not intended. Renesas Electronics shall not be in any way liable for any damages or losses incurred
by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas
Electronics.
6.
You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics,
especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation
characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or
damages arising out of the use of Renesas Electronics products beyond such specified ranges.
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 systems 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.
Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose
manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. You should not use
Renesas Electronics products or technology described in this document for any purpose relating to military applications or use
by the military, including but not limited to the development of weapons of mass destruction. When exporting the Renesas
Electronics products or technology described in this document, you should comply with the applicable export control laws and
regulations and follow the procedures required by such laws and regulations.
7.
8.
9.
10. It is the responsibility of the buyer or distributor of Renesas Electronics products, who distributes, disposes of, or otherwise
places the product with a third party, to notify such third party in advance of the contents and conditions set forth in this
document, Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of
unauthorized use of Renesas Electronics products.
11. This document may not be reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document
or Renesas Electronics products, or if you have any other inquiries.
(Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its majority-
owned subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
(2012.4)
NOTES FOR CMOS DEVICES
(1) VOLTAGE APPLICATION WAVEFORM AT INPUT PIN: Waveform distortion due to input noise or a
reflected wave may cause malfunction. If the input of the CMOS device stays in the area between VIL
(MAX) and VIH (MIN) due to noise, etc., the device may malfunction. Take care to prevent chattering noise
from entering the device when the input level is fixed, and also in the transition period when the input level
passes through the area between VIL (MAX) and VIH (MIN).
(2) HANDLING OF UNUSED INPUT PINS: Unconnected CMOS device inputs can be cause of malfunction. If
an input pin is unconnected, it is possible that an internal input level may be generated due to noise, etc.,
causing malfunction. CMOS devices behave differently than Bipolar or NMOS devices. Input levels of
CMOS devices must be fixed high or low by using pull-up or pull-down circuitry. Each unused pin should be
connected to VDD or GND via a resistor if there is a possibility that it will be an output pin. All handling
related to unused pins must be judged separately for each device and according to related specifications
governing the device.
(3) PRECAUTION AGAINST ESD: A strong electric field, when exposed to a MOS device, can cause
destruction of the gate oxide and ultimately degrade the device operation. Steps must be taken to stop
generation of static electricity as much as possible, and quickly dissipate it when it has occurred.
Environmental control must be adequate. When it is dry, a humidifier should be used. It is recommended
to avoid using insulators that easily build up static electricity. Semiconductor devices must be stored and
transported in an anti-static container, static shielding bag or conductive material. All test and measurement
tools including work benches and floors should be grounded. The operator should be grounded using a wrist
strap. Semiconductor devices must not be touched with bare hands. Similar precautions need to be taken
for PW boards with mounted semiconductor devices.
(4) STATUS BEFORE INITIALIZATION: Power-on does not necessarily define the initial status of a MOS
device. Immediately after the power source is turned ON, devices with reset functions have not yet been
initialized. Hence, power-on does not guarantee output pin levels, I/O settings or contents of registers. A
device is not initialized until the reset signal is received. A reset operation must be executed immediately
after power-on for devices with reset functions.
(5) POWER ON/OFF SEQUENCE: In the case of a device that uses different power supplies for the internal
operation and external interface, as a rule, switch on the external power supply after switching on the internal
power supply. When switching the power supply off, as a rule, switch off the external power supply and then
the internal power supply. Use of the reverse power on/off sequences may result in the application of an
overvoltage to the internal elements of the device, causing malfunction and degradation of internal elements
due to the passage of an abnormal current. The correct power on/off sequence must be judged separately
for each device and according to related specifications governing the device.
(6) INPUT OF SIGNAL DURING POWER OFF STATE : Do not input signals or an I/O pull-up power supply
while the device is not powered. The current injection that results from input of such a signal or I/O pull-up
power supply may cause malfunction and the abnormal current that passes in the device at this time may
cause degradation of internal elements. Input of signals during the power off state must be judged
separately for each device and according to related specifications governing the device.
How to Use This Manual
Target Readers
This manual is intended for users who wish to understand the features of the RL78
microcontrollers EEPROM Emulation Library Pack 02 and to use the library in
designing and developing application systems.
The target products are as follows.
RL78/D1A, RL78/F12, RL78/F13, RL78/F14, RL78/G13, RL78/G14, RL78/G1A,
RL78/I1A, RL78/L13, RL78/L1C
Purpose
This manual is intended to give users understanding of how to use EEPROM
Emulation Library Pack 02 to rewrite the flash data memory in RL78-family
microcontrollers (i.e. write constant data by the application).
Organization
The RL78 EEPROM Emulation Library Pack 02 user’s manual is separated into the
following parts
:
•
Overview of EEPROM Emulation
•
Using EEPORM Emulation
•
EEPROM Emulation Function
How to Read This Manual
It is assumed that the readers of this manual have general knowledge of electrical
engineering, logic circuits, and microcontrollers.
•
To gain a general understanding of features
-> Read this manual in order of the table of contents.
•
For details on the functions of the library
-> Refer to section 5, User Interface, of this user’s manual.
Conventions
Data significance:
Note:
Higher-order digits to the left and lower-order digits to the right
xxx
(overscore over pin and signal name)
Active low representations:
Caution:
Remark:
Footnote for item marked with
Note
in the text.
Information requiring particular attention
Supplementary information
Binary ... xxxx or xxxxB
Decimal ... xxxx
Hexadecimal ... xxxxH or 0xXXXX
Numeral representation:
All trademarks and registered trademarks are the property of their respective owners.
EEPROM is a registered trademark of Renesas Electronics Corporation.
RL78 Family
EEPROM Emulation Library Pack02
Contents
Chapter 1 Overview ..................................................................................................... 7
1.1
1.2
1.3
Outline ....................................................................................................................................... 7
Target Devices .......................................................................................................................... 7
Definition of Terms .................................................................................................................. 7
Chapter 2 EEPROM Emulation ................................................................................... 9
2. 1 Specifications of EEPROM Emulation ...................................................................................... 9
2. 2 Outline of Function ..................................................................................................................... 9
2. 3 EEL architecture ....................................................................................................................... 11
2. 3. 1 System Structure ........................................................................................................ 11
2. 3. 2 EEL Pool ...................................................................................................................... 11
2. 3. 3 Structure of EEL Block ............................................................................................... 13
2. 3. 4 EEL Block Header ....................................................................................................... 14
2. 3. 5 Structure of Stored Data ............................................................................................ 15
2. 3. 6 EEL Block Overview ................................................................................................... 16
Chapter 3 EEL Functional Specifications ................................................................ 17
3.1
EEL Functions / Commands of the EEL_Execute Function .............................................. 17
3. 1. 1 EEL_CMD_STARTUP command [Startup processing] ........................................... 17
3. 1. 2 EEL_CMD_SHUTDOWN command [Shutdown processing] .................................. 17
3. 1. 3 EEL_CMD_REFRESH command [Refresh processing] .......................................... 17
3. 1. 4 EEL_CMD_FORMAT command [Format processing] ............................................. 18
3. 1. 5 EEL_CMD_WRITE command [Write processing] .................................................... 18
3. 1. 6 EEL_CMD_READ command [Read processing] ...................................................... 18
3. 1. 7 EEL_CMD_VERIFY command [Verify processing] .................................................. 18
3.2
3.3
3.4
3.5
State Transitions .................................................................................................................... 19
Basic Flowchart ...................................................................................................................... 21
Command Operation Flowchart ........................................................................................... 23
BGO(Back Ground Operation)function ........................................................................... 24
Chapter 4 Using EEPROM Emulation....................................................................... 25
4.1
4.2
4.3
Caution Points ........................................................................................................................ 25
Number of stored user data items and total user data size ............................................... 27
Initial Values to be set by User ............................................................................................. 28
Chapter 5 User Interface ........................................................................................... 31
5. 1 Request Structure (eel_request_t) Settings........................................................................... 31
5.1.1
5.1.2
User Write Access ...................................................................................................... 32
User Read Access ...................................................................................................... 32
5. 2 EEL Function Calls ................................................................................................................... 33
5. 3 Data Types ................................................................................................................................. 33
5. 4 EEL Function ............................................................................................................................. 34
FDL_Init ................................................................................................................................... 35
FDL_Open ............................................................................................................................... 36
FDL_Close............................................................................................................................... 37
EEL_Init ................................................................................................................................... 38
R01US0068EJ0100 Rev.1.00
Mar. 28, 2014
Page 5 of 53