Beruflich Dokumente
Kultur Dokumente
R01AN3294EJ0100
Rev.1.00
Jun 30, 2016
Overview
This application note explains Flahs ROM rewrite program (hereinafter referred to as Updater), which uses USB
peripheral controllers.
Target Devices
RX111, RX113, RX231
RX62N/RX621, RX630, RX63N/RX631, RX63T
RX64M, RX71M
When implementing this application note in the user system, conduct an extensive evaluation to ensure compatibility.
Table of Contents
1.
2.
3.
4.
5.
6.
Internal Flash ROM rewrite program via USB and User Program Settings............................. 25
7.
8.
9.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 1 of 66
Document Outline
This application note explains the Updater used for USB peripheral controllers. Please use in combination with the documents listed
in Section 1.2 Related Documents.
1.1
Functions
This updater updates the user program using the Communication Device Class of the Universal Serial Bus Specification (referred to
as USB herein).
1.2
Related Documents
1.3
a.
Cautions
The operations described in this application note are not guaranteed. When using this application note for your system,
conduct an extensive evaluation to ensure compatibility.
b.
The program settings are based on Little Endian. If the user program is based on Big Endian, please modify this program to
Big Endian as well. Please refer to 6.2 Internal Flash ROM rewrite program via USB Settings about the endian setting.
c.
When implementing this program into your system, please refer to the contents of section 6
program via USB and User Program Settings and 7.3 Cautions section.
d.
Please refer to the following about the term "USB0 module" and "USB1 module" described in this documentation.
Term
USB0 module
(start address:0xA0000)
USB1 module
(start address:0xA0200 / 0xD0400)
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
MCU
RX62N/RX621
RX63N/RX631
RX630
RX63T
RX64M
RX71M
RX111
RX113
RX231
RX62N/RX621
RX63N/RX631
RX64M
RX71M
Page 2 of 66
1.4
:
:
:
:
:
:
:
:
:
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 3 of 66
the evaluation board via a USB connection. The transferred user program is written to an address in the ROM using the Flash
self-programming library
The program is configured as follows:
(1).
For use on RX-RSK board (samples are currently available for RX111, RX63N, and RX71M).
Program 1: LEDs on RSK board light up in consecutive order.
Program 2: LEDs on RSK board light up simultaneously.
File transfer
application
User
program
USB
CDC
connection
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 4 of 66
2.1
Features
The program performs full-speed data transfers between the USB host and the evaluation board using CDC.
2.
The program occupies part of the internal flash memory (See Table 2-1). If your MCU supports user boot area, the Flash
ROM rewite program can be assigned to the user boot area.
3.
This program supports the Motorola S and Intel extended file formats as the user program format (.mot/.HEX files).
4.
5.
2.2
ROM/RAM Size
Usage
Size (Bytes)
name
ROM
Flash Type1
Internal Flash ROM rewrite program via USB
Flash Type2
7.6K (*1: 8K)
ROM size
RAM
Flash Type3
7.9K (*1: 8K)
(*2:16K)
1087
1680
(*2: 32K)
1792
RAM size
*1 Reserved block size
*2 User boot area usage size
2.3
details, please refer to the RX Family Flash Module Using Firmware Integration Technology Application Note.
Table 2-2
Flash Programming Type
R01AN3294EJ0100
Jun 30, 2016
Flash Type1
Flash Type2
Flash Type3
RX64M, RX71M
Rev.1.00
Page 5 of 66
2.
Hardware environment
(1). Evaluation board
RX RSK
(2). MCU
(3). Emulator
E1
(5). PC
Software environment
(1). Integrated Development Environment (IDE)
e2 studio
(2). Compiler
CC-RX
Note:
Operations for this program has not been confirmed when using USB1 module in RX62N.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 6 of 66
Folder Configuration
The following is the folder configuration for this program.
(Top Directory)
+reference
|
+--cdc_inf
|
|
CDC driver sample inf file (CDC_Demo.inf)
|
+--FirmupdateGUI
|
|
| File transfer application (UsbfUpdater.exe / UsbfUpdater.ini)
|
|
+---source
|
|
File transfer application sources
|
+--SampleProgram (Sample program for operation confirmation )
|
+-- (MCU name)
|
+-- src (Sample program sources)
|
+-- mot (Sample user program)
+workspace (Internal Flash ROM rewrite program via USB Sample projects)
+-- (MCU name_FirmwareUpdater)
The following provides a description of each folder.
(1).
referencecdc_inf
This folder stores the Windows CDC driver.
CDC_Demo.inf: Windows CDC driver (Windows 32bit/64bit)
(2).
referenceFirmupdateGUI
This folder stores the file transfer application.
UsbfUpdater.exe: File transfer application execution file
UsbfUpdater.ini: File transfer application setting file
(3).
referenceFirmupdateGUIsource
This folder stores the file transfer application source program. For more details, refer to section 8 File Transfer
(4).
referenceSampleProgram
This folder stores the sample user program.
sample1.mot: LEDs light up in consecutive order
sample2.mot: LEDs light up simultaneously
(5).
workspace
This file stores Internal Flash ROM rewrite program via USB for each MCU. For more details, refer to section 7 Internal
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 7 of 66
3.1
Project Setup
Select the folder with the name of the MCU you are using from the Workspace folder tab. Set up the project according to the
following sequence. This sequence is for setting up with e2 studio.
Start up e2 studio.
(1).
*If running e2 studio for the first time, the Workspace Launcher dialog box will appear first. Specify the folder which will store the
project.
(2).
(3).
Figure 3-1
(4).
Press [Browse] for [Select root directory]. Select the folder in which [.cproject ] (project file) is stored.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 8 of 66
Figure 3-2
Figure 3-3
(5).
Click [Finish].
This completes the step for importing a project to the project workspace.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 9 of 66
4.1
The File Transfer Application which transmits the user program starts up when the UsbfUpdater.exe file in the FirmupdateGUI folder
is executed.
Figure 4-1 shows how to set the following file transfer application.
Notes:
If the file transfer application does not start up, make sure the folder that contains the exe file also contains the UsbfUpdater.ini,
and then retry the process.
Size:
Device:
Name:
Select the MCU to which
data will be written.
Program/Erase area
setting
*8-digit hexadecimal input
Load File:
Selects the file to be
written.
Update:
Exit:
Figure 4-1
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Clear:
Clears the
message.
Page 10 of 66
Set the Program/Erase enable area so that this program area will not be written over when the user program is written to the MCU.
Note that this program does not allow access to the ROM block that includes fixed vectors (Block 0 in the RX Series). Please use
the settings listed in Table 4-1 to set the range for P/E Access Enable Area Address.
Table 4-1
MCU
RX71M
RX64M
RX63T
RX63N
RX630
RX62N
RX231
RX113
RX111
Any
Any
Any
Any
Any
Any
Any
Any
Any
0xFFFFBFFF
0xFFFFBFFF
0xFFFFDFFF
0xFFFFDFFF
0xFFFFDFFF
0xFFFFDFFF
0xFFFFE7FF
0xFFFFE7FF
0xFFFFE7FF
Notes:
1.
The block including the specified address will be erased during an erase operation. Be careful when setting the ROM block
size. For more details on ROM block size, refer to the users hardware manual corresponding to the target MCU.
2.
For details of the user program fixed vectors, see section 6.3 User Program Fixed Vectors.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 11 of 66
Writing Internal Flash ROM rewrite program via USB to Flash ROM write and
execution
This section explains the sequence for writing and executing the Internal Flash ROM rewrite program.
4.2.1
(1)
Hardware setup
The following figures show connection diagrams for writing Internal Flash ROM rewrite program via USB to the MCU.
a.
USB connection
Emulator
PC software:
Renesas Flash
Programmer (RFP)
Figure 4-2
b.
RSK Board
USB/Serial cable
PC software:
Renesas Flash
Programmer (RFP)
Figure 4-3
RSK Board
Notes:
a)
Note that when writing this program to the user boot area in USB boot mode, the existing USB boot mode program in the
user boot area will be overwritten.
b)
When writing this program to the user boot area without use of an emulator (as in Figure 4-3), write to the ROM in boot
mode. The user boot area cannot be programmed in USB boot mode.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 12 of 66
(2)
c)
This program can be written to the user boot area when using an emulator (as in Figure 4-2).
d)
When writing this program in USB boot mode, write the program to an area other than the user boot area.
e)
Refer to the target MCUs users hardware manual for more details on boot mode and USB boot mode.
rewrite program via USB file to be written from the Workspace/(MCU name) folder. Press Start to download the program to the
target board. The write operation is complete when PASS is displayed in the output panel and Download Complete appears in the
green area at the top of the panel.
Figure 4-4
File Specification
Notes:
a.
Refer to the following URLs for more details on the Renesas Flash Programmer:
URL:
https://www.renesas.com/en-us/products/software-tools/tools/programmer/renesas-flash-programmer-programming-gui.html
b.
Refer to section 4.2.2 Internal Flash ROM rewrite program via USB address assignment for more details concering
positioning of Internal Flash ROM rewrite program via USB.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 13 of 66
0000 0000 H
RAM
Part of RAM is used by Flash
self-programming library.
0002 0000 H
007F 8000 H
library.
FEFF E000 H
FEFF E000 H
FFE0 0000 H
Flash Block 69
Program area
ROM area
Vector table
FFFF DF80H
FFFF E000H
UserApp Header
Flash Block 2
Flash Block 1
Flash Block 0
FFFF FFFFH
Figure 4-5
Notes:
When compiling Internal Flash ROM rewrite program via USB, select 24 bits as the [Function branch width] in e2
studio. To specify the [Width of divergence of function], select [File] [Properties] [C/C+ Build] [Settings]. From the
[Tool Settings] tab, specify [CPU] [Advanced].
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 14 of 66
Internal Flash ROM rewrite program via USB can be assigned to the user boot area if it is supported by the target MCU.
Table 4-2 provides user boot area information.
Table 4-2
MCU
RX71M
RX64M
RX63T
RX63N
RX630
RX62N
RX231
RX113
RX111
32KB
0xFF7F8000
32KB
0xFF7F8000
16KB
0xFF7FC000
16KB
0xFF7FC000
16KB
0xFF7FC000
16KB
0xFF7FC000
User boot area not supported
User boot area not supported
User boot area not supported
0xFF7FFFFF
0xFF7FFFFF
0xFF7FFFFF
0xFF7FFFFF
0xFF7FFFFF
0xFF7FFFFF
Note:
When compiling Internal Flash ROM rewrite program via USB , select 32 bits as the [Function branch width] in e2
studio. To specify the [Width of divergence of function], select [File] [Properties] [C/C+ Build] [Settings]. From
the [Tool Settings] tab, specify [CPU] [Advanced].
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 15 of 66
The following shows the memory map when Internal Flash ROM rewrite program via USB is assigned to the user boot area
in RX63N (R5F563NF).
0000 0000 H
RAM
Part of RAM is used by the Flash
self-programming library
0002 0000 H
007F 8000 H
FCU Firm RAM
007F A000 H
FF7F C000H
FF80 0000H
FEFF E000 H
FEFF E000 H
FFE0 0000 H
Vector table
FCU Firm ROM
Flash Block 69
Program area
ROM area
FFFF DF80H
UserApp Header
Flash Block 2
Flash Block 1
Flash Block 0
FFFF FFFFH
Figure 4-6
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 16 of 66
Execution of Internal Flash ROM rewrite program via USB (user program write
operation)
This section explains the sequence for Internal Flash ROM rewrite program via USB execution and user program write
operation.
(1).
Hardware preparation
To execute the write operation, detach the emulator and connect the PC and evaluation board with the USB cable. Figure 4-7
shows the connection diagram.
USB connection
Figure 4-7
(2).
RSK Board
Note:
The PC used to run the file transfer application must be installed with a CDC driver. For details, refer to section 4.5 CDC Driver
Installation.
(3).
Note:
The COM number varies according to environment. Numbers 1 to 9 can be used the COM number.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 17 of 66
Figure 4-8
(4).
file to be written to the ROM. Then select the target MCU under Device:.
Figure 4-9
For details on how to use the file transfer application, refer to section 4.1 File Transfer Application (RX USB Function
Rev.1.00
Page 18 of 66
Sequence:
Check Use P/E Access Enable and specify the area.
Figure 4-10
(6).
Note:
If the user program write operation fails, the file transfer application interface will show a corresponding message. See section
8.4
(7).
When the file transfer or write operation processing ends, the file transfer application interface will display Success to indicate
the operation is complete. This ends the full write operation processing.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 19 of 66
Figure 4-11
(8).
(9).
program via USB, and repeat the sequence from step (4).
(10).
Rewrite complete
When the rewrite operation is complete, the evaluation board is reset, and the new user program is started. The RSK board LEDs
light up if sample program 2 (user program) is written.
4.4
1.
*Note that the ROM erase block unit differs depending on the MCU.
2.
Be careful not to erase any block that includes fixed vectors. Internal Flash ROM rewrite program via USB will not run if the
fixed vectors have been erased. For details concerning fixed vectors, refer to section 6.3 User Program Fixed Vectors.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 20 of 66
4.5
The PC used to run the file transfer application must be installed with a CDC driver. The wizard shown in Figure 4-12 will appear
on your screen and prompt the CDC driver installation when you connect your PC to target board used to write Internal Flash ROM
rewrite program via USB to the MCU.
(1). Select Update Driver Software from the device manager.
(2). Select Browse my computer for driver software.
Figure 4-12
(3).
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 21 of 66
Figure 4-13
(4). If the following installation confirmation screen appears, click Browse for driver software on your computer
Figure 4-14
(5).
When the following window appears, the CDC driver has been successfully installed. Click Close.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 22 of 66
Figure 4-15
Installation Complete
* An error may occur when installing the driver in the Windows 8 or Windows 8.1 environment. In this case the installation
confirmation screen will not appear.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 23 of 66
This sections explains cautions that apply when creating the user program
5.1
File Format
5.2
program. The size of the UserApp Header area should be a total of 8 bytes: 4 bytes for the user program start address storage area
and 4 bytes for the security code storage area (see Figure 5-1).
Refer to section 6.1 User Program Settings for details on how to create the UserApp Header area.
7 bit
User program start address
XXXXXXXXh
+4
Security code
55AA55AAh
Figure 5-1
This header information is read when Internal Flash ROM rewrite program via USB is started up and transitions to the
UserApp startup sequence. For details, refer to section 7.2.1 Power On Operation Flow.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 24 of 66
Internal Flash ROM rewrite program via USB and User Program Settings
This section provides the setting contents required for Internal Flash ROM rewrite program via USB and the user program.
6.1
1.
2.
Setting Content 2
Set the section for the UserApp Header area created in step 1 above, and set an arbitrary address to the section. Make sure
the location of the UserApp Header area does not overlap with Internal Flash ROM rewrite program via USB area
(including fixed vectors).
/*******************************************************************************
APPLICATION INTERFACE HEADER
The purpose of the header is for an external application to be able to read
certain values from known addresses.
- Start address of UserApp.
- Security code must match what PCDC Flashloader expects.
Section specification
- For revision purposes of applications etc.
- Do not change the order of these variables!
*******************************************************************************/
#pragma section C UserApp_Head_Sect
/* START ADDRESS of user application header data
- Appheader address + 0x00. */
const uint32_t userapp_entry_addr =
(uint32_t) userprog_start;
/*
const uint32_t userapp_sec_code =
Figure 6-1
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Header
information
Page 25 of 66
Sequence:
First select [Properties] [C/C+ Build] [Settings]. Next, select the Tool setting tab, and select [Linker] [Section].
Figure 6-2
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 26 of 66
Adjust the following definition setting to your system. The following definition is described in
"r_configr_usb_updater_config.h" file.
#define
#define
USB_CFG_USE_USBIP
USB_CFG_USE_USBIP
USB_CFG_IP0
USB_CFG_IP1
Note:
If the target MCU supports only one USB module, set USB_CFG_IP0 as the USB_CFG_USE_USBIP definition.
USB_CFG_ENDIAN
USB_CFG_ENDIAN
USB_CFG_LITTLE
USB_CFG_BIG
#define
#define
USB_CFG_CLKSEL
USB_CFG_CLKSEL
USB_CFG_24MHZ
USB_CFG_20MHZ
// 24MHz setting
// 20MHz setting
Note:
This definition is ignored when using USB module except USBAa/USBA module supported by
RX71M/RX64M.
(4). CPU buswait setting
Specify the value to the following definition (USB_CFG_BUSWAIT).
This value is set to BUSWAIT register in USBA/USBAa module.
#define
USB_CFG_BUSWAIT
// 7 wait setting
Notes:
a. Refer to the RX71M/RX64M hardware manual about the value which is set to USB_CFG_BUSWAIT
definition.
b. This definition is ignored when using USB module except USBAa/USBA module supported by
RX71M/RX64M.
(5). USB regulator setting
Specify whether your system uses USB regulator function supported by RX231 or not.
#define
#deefine
USB_CFG_REGULATOR
USB_CFG_REGULATOR
USB_CFG_OFF
USB_CFG_ON
// No use
// Use
Note:
This definition is ignored when using MCU except RX231.
(6). Other setting
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 27 of 66
Internal Flash ROM rewrite program via USB references the UserApp Header area in the user program. Therefore,
if you change the assigned address of the UserApp Header area, make sure you also change this program to reference the
revised UserApp Header area. In the same manner, if you change the security code value, make sure you make the
corresponding changes in this program. Refer to section 5.2 UserApp Header Area (user application header) about UserApp
Header area.
a.
b.
USB_CFG_USERAPP_HEADER_ADDR
2.
USB_CFG_USERAPP_SECURITY_CODE
Security code
Setting Content 2
This program jumps to Internal Flash ROM rewrite program via USB or the user program depending on the state of SW
(Switch) on the evaluation board. The process for determining the state of SW depends on the board specifications. Please adjust
the determination process to meet the target board specifications. This determination process is performed in the main function.
3.
FASTSTUP bit
(2).
(3).
(4).
MDE bit
Note that the updater does not write operation to the ROM in the user programs option setting memory. Because the firmware
update program option setting memory is also used by the user program, set the option setting memory in accordance with the
firmware update program.
Notes:
4.
a.
The initial settings for the firmware update option setting memory are all the default values.
b.
c.
For more details about the option setting memory, refer to the hardware version of the target MCU users manual.
Note:
To specify the [Width of divergence of function], select [File] [Properties] [C/C+ Build], [Settings]. From the [Tool
settings] tab, specify [CPU][Advanced].
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 28 of 66
When Internal Flash ROM rewrite program via USB is implemented to the user system, the fixed vectors of Internal Flash
ROM rewrite program via USB are used; and fixed vectors of the user program are not written to the MCU.
6.4
Make sure you assign the user program to ROM area which does not overlap with the area written by Internal Flash ROM rewrite
program via USB. Assign the user program locations according to section settings.
Note:
1. Set all sections of the user program other than fixed vectors according to the ROM area assignments shown in the list below.
MCU
RX71M
RX64M
RX63T
RX63N
RX630
RX62N
RX231
RX113
RX111
Any
Any
Any
Any
Any
Any
Any
Any
Any
0xFFFFBFFF
0xFFFFBFFF
0xFFFFDFFF
0xFFFFDFFF
0xFFFFDFFF
0xFFFFDFFF
0xFFFFE7FF
0xFFFFE7FF
0xFFFFE7FF
2. When writing the user program to the ROM, be careful not to write the program to the area containingInternal Flash ROM
rewrite program via USB as it is protected by P/E access limitations. For more details, refer to section 4.1.1 P/E Access
Enable Area Address.
3. Although the Flash self-programming library occupies part of the RAM area, it is only used when executing Internal Flash
ROM rewrite program via USB and will not affect the user program operations.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 29 of 66
7.1
File/Folder Configuration
(MCU name)
+HardwareDebug
Build result
+src
+r_config
[API setting file]
|
+r_flash_rx
[Simple Flash API]
|
+ src
[FlashAPI driver]
|
+flash_type_1
Flash write type 1 API
|
+flash_type_2
Flash write type 2 API
|
+flash_type_3
Flash write type 3 API
|
+targets
ROM information for each MCU
+r_bsp
[Renesas Board Support Package]
|
+ board
BSP setting for each RSK
|
+ mcu
BSP setting for each MCU
+SmplMain
[Sample application]
|
+ APL
Sample application program
+USB
[USB driver]
+ inc
USB driver common header file
+ src
USB driver
Figure 7-1
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 30 of 66
srcr_config Folder
This folder stores all the setting files for the target MCU.
Table 7-1
File Name
Description
r_bsp_config.h
r_flash_rx_config.h
r_usb_fwupdater_config.h
7.1.2
srcr_flash_rx Folder
This folder stores the simple flash API source files and header files. For more details, refer to the Flash Module Using
Firmware Integration Technology application note.
The flash write type is automatically selected when the MCU is selected in the board support package (r_bsp).
Table 7-2
File Name
Description
r_flash_rx_if.h
srcr_flash_rx.c
srcr_flash_rx.h
srcflash_type1r_codeflash.c
srcflash_type1r_codeflash.h
srcflash_type1r_codeflash_extra.c
srcflash_type1r_codeflash_extra.h
srcflash_type1r_flash_common.h
srcflash_type1r_flash_type1.c
srcflash_type1r_flash_type1_if.h
srcflash_type1r_flash_util.c
srcflash_type2r_flash_type2.c
srcflash_type2r_flash_type2_if.c
srcflash_type2r_flash_type3.c
srcflash_type2r_flash_type3_if.c
srctargets(MCU name)
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 31 of 66
srcr_bsp Folder
This folder stores the Renesas Board support package module source files and header files. For more details, refer to the RX
Family Support Package Module Application Note.
7.1.4
srcSmplMain Folder
This folder stores Internal Flash ROM rewrite program via USB source files.
Table 7-3
File Name
Description
main.c
APLmain_call_flashapi.c
APLmain_call_flashapi.h
7.1.5
srcUSB Folder
This folder stores the CDC (USB) source files and header file.
Table 7-4
File Name
Description
incr_usb_fwupdater_defreg.h
incr_usb_fwupdater_defusr.h
incr_usb_fwupdater_extern.h
Function Extern
incr_usb_ctypedef.h
Type definition
incr_usb_defvalue.h
incr_usb_usrconfig.h
incr_usb_sysdef.h
srcr_usb_fwupdater_api.c
srcr_usb_fwupdater_basic.c
srcr_usb_fwupdater_classcdc.c
srcr_usb_rx_mcu.c
srcr_usb_fwupdater_usbreg.c
7.1.6
This folder stores object files and mot files of Internal Flash ROM rewrite program via USB that can be executed during a
build.
Table 7-5
File Name
PCDC_FLASHLorder_mini.mot
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 32 of 66
Boot Processing
Boot processing indicates the processing executed after the MCU is reset and before the main function (C language description:
main()) is executed.
In RX MCUs, boot processing chiefly performs the following as initialization after reset:
Branch to user program and initialize MCU peripheral devices in hdwinit function
After reset, processing jumps from Internal Flash ROM rewrite program via USB to the user program. Therefore, make sure
Internal Flash ROM rewrite program via USB is complete and the above-described MCU initializations are executed.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 33 of 66
This section explains the operation flow after power is turned on for Internal Flash ROM rewrite program via USB.
Jud
branch
updat
use
Power ON
Note: This is a RSK board process. If
the user board does not have this
Startup routine
*Res
processing
main()
UsrApp Header
Branc
been written
routine
Bran
Branch to startup
00 5C00
Firmware update
contents
processing
End
End
User program startup
Firmware update
program startup
Figure 7-2
For information regarding branch address to security code and user program, refer to section 5.2
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 34 of 66
The user program set in the UsrApp Header area is started up when all of the following conditions are met:
a. Correct security code is set
b. Correct user program start address is set
If the security code does not match (is incorrect), only Internal Flash ROM rewrite program via USB will start up; the user
program will not run.
7.2.3
1.
2.
7.3
Cautions
Internal Flash ROM rewrite program via USB determines whether to jump to the user program or continue on with the
firmware update program by judging the state of SW on the evaluation board. This judgment process is dependent on the boards
specifications. Please change the judgment process to meet the specifications of your evaluation board. The judgment processing is
performed in the main function of Internal Flash ROM rewrite program via USB.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 35 of 66
7.4
This section describes all functions used in the Updater other than BSP and simple Flash API-related functions.
7.4.1
Data Type
Data types applicable in Internal Flash ROM rewrite program via USB are listed below.
Table 7-6
Data Type
7.4.2
Data Type
Specifier
Valid Range
int8_t
signed char
int16_t
signed short
int32_t
signed long
uint8_t
unsigned char
uint16_t
unsigned short
uint32_t
unsigned long
Structures
Table 7-7
Data Type
Variable Name
Description
uint8_t
device_type
uint8_t
rsv1[1]
Reserved
uint8_t
rom_start_addr[4]
uint8_t
rom_end_addr[4]
uint8_t
rsv2[1]
Reserved
uint8_t
checksum
Check sum
Table 7-8
Data Type
Variable Name
Description
uint8_t
record_type
Record type
uint8_t
record_len
Record length
uint8_t
dev_type
uint8_t
checksum
Check sum
Table 7-9
Data Type
Description
uint32_t
record_type
Record type
uint8_t
record_len
Record length
uint8_t
response_type
uint8_t
err_field
Error code
uint8_t
checksum
Check sum
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 36 of 66
Table 7-10
Data Type
Description
uint8_t
recv_data[ROM_WRITE_SIZE]
uint32_t
now_addr
uint32_t
next_addr
uint32_t
dest_addr
wr_count *
ROM_WRITE_SIZE]
will become destination
address
uint16_t
wr_count
uint16_t
counter
Each data type has a fixed Flash write size (ROM_WRITE_SIZE). Data is copied from the receive data buffer to the ROM
write buffer until the fixed number of write data is accumulated. (Flash type 1 allows a minimum 4-byte variable length data write,
but this program writes fixed 16-byte data.
The write base address is maintained while the data write continues. When the write address surpasses the ROM_WRITE_SIZE
from the previous address, the base address is re-established and the write data count is cleared.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 37 of 66
7.4.3
File Name
main.c
main.c
main.c
main.c
Function Name
main
cdc_read
cdc_main
cf_code_copy
main.c
send_response_record
main.c
main.c
main.c
main.c
main.c
sub_Byte2ddress
subproc_start_record
sub_write_initial
sub_flashwrite_proc
jump_to_userapp
main_call_flashapi.c
FSL_Func_Write
main_call_flashapi.c
FSL_Func_Erase
main_call_flashapi.c
FSL_Func_SetAccessWindow
main_call_flashapi.c
sub_get_blk_type1
main_call_flashapi.c
sub_get_addr_type1
main_call_flashapi.c
sub_get_blk
main_call_flashapi.c
sub_get_addr
Table 7-12
Function Name
main
Description
void
Processing Description
Initialization, judgment to jump to user program
CDC read detection
Receive data processing branch (erase/write/end judgment)
Copy code to RAM
main Function
main ( void )
Format
Function
I/O
Input
None
Output
None
Remarks
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 38 of 66
cdc_read Function
Function Name
cdc_read
Description
Format
Function
I/O
Input
None
Output
Remarks
Table 7-14
Function Name
cdc_main
Description
void
cdc_main Function
cdc_main ( void )
Format
Function
main processing for Internal Flash ROM rewrite program via USB
I/O
Input
None
Output
None
Remarks
Table 7-15
Function Name
cf_code_copy
Description
static void
cf_code_copy Function
cf_code_copy ( void )
Format
Function
I/O
Input
None
Output
None
Remarks
Access to ROM in Flash ROM write mode (ROM P/E mode) is restricted.
Therefore, codes used for ROM write and ROM erase must be restored
to RAM.
Table 7-16
subproc_start_record Function
Function Name
subproc_start_record
Description
flashseq_check )
Format
Function
I/O
Input
Output
None
Remarks
R01AN3294EJ0100
Jun 30, 2016
None
Rev.1.00
Page 39 of 66
Table 7-17
send_response_record Function
Function Name
send_response_record
Description
Format
Function
I/O
Input
None
Output
None
Remarks
Table 7-18
sub_Byte2num Function
Function Name
sub_Byte2num
Description
Format
Function
I/O
Input
Output
Remarks
None
Table 7-19
sub_write_initial Function
Function Name
sub_write_initial
Description
Format
Function
I/O
Input
None
Output
None
Remarks
None
Table 7-20
sub_flashwrite_proc Function
Function Name
sub_flashwrite_proc
Description
Format
Function
I/O
Input
None
Output
Remarks
R01AN3294EJ0100
Jun 30, 2016
None
Rev.1.00
Page 40 of 66
flash_prev_and_check Function
Function Name
flash_prev_and_check
Description
static flash_err_t
flash_prev_and_check ( void)
Format
Function
I/O
Input
None
Output
Remarks
None
Table 7-22
Function Name
jump_to_userapp
Description
static void
jump_to_userapp Function
jump_to_userapp ( void )
Format
Function
I/O
Input
None
Output
None
Remarks
Table 7-23
Function Name
FSL_Func_Write
Description
flash_err_t
FSL_Func_Write Function
FSL_Func_Write (void)
Format
Function
Call function for ROM erase API. Processing branch according to type.
I/O
Input
None
Output
Remarks
None
Table 7-24
FSL_Func_Erase Function
Function Name
FSL_Func_Erase
Description
Format
Function
Call function for ROM erase API. Processing branch according to type.
I/O
Input
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 41 of 66
Table 7-25
FSL_Func_SetAccessWindow Function
Function Name
FSL_Func_SetAccessWindow
Description
Format
Function
I/O
Input
Table 7-26
sub_get_blk_type1 Function
Function Name
sub_get_blk_type1
Description
Format
Function
Calculate number of erase blocks from start and end addresses (Flash
type 1)
I/O
Input
Output
Remarks
The definition used for this function is dependent on the definition of the
Simple Flash API ROM information. The function is prepared specifically
for type 1 only, as part of the definition for Flash types 2 and 3 differ from
the definition for type 1.
Table 7-27
sub_get_addr_type1 Function
Function Name
sub_get_addr_type1
Description
Format
Function
Calculate the ROM block start address from its corresponding ROM
address (Flash type 1)
I/O
Input
Output
Remarks
The definition used for this function is dependent on the definition of the
Simple Flash API ROM information. The function is prepared specifically
for type 1 only, as part of the definition for Flash types 2 and 3 differ from
the definition for type 1.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 42 of 66
Table 7-28
sub_get_blk Function
Function Name
sub_get_blk
Description
Format
Function
Calculate block count and block number information from ROM start and
end addresses (Flash types 2 and 3)
I/O
Input
Output
Remarks
The definition used for this function is dependent on the definition of the
Simple Flash API ROM information. This function is prepared specifically
for types 2 and 3, as part of the definition for Flash types 2 and 3 differ
from the definition for type 1.
Please not that block numbers are assigned from the back of the ROM
forward, so StartAddress=EndBlock and EndAddress=StartBlock.
Table 7-29
sub_get_addr Function
Function Name
sub_get_addr
Description
Format
Function
Calculate the ROM block start address from its corresponding ROM
address (Flash types 2 and 3)
I/O
Input
Output
Remarks
The definition used for this function is dependent on the definition of the
Simple Flash API ROM information. This function is prepared specifically
for types 2 and 3, as part of the definition for Flash types 2 and 3 differ
from the definition for type 1.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 43 of 66
7.4.4
Function Name
r_usb_fwupdater_api.c
r_usb_fwupdater_api.c
r_usb_fwupdater_api.c
r_usb_fwupdater_basic.c
bulk_in_start
bulk_out_start
usb_init
usbint
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
save_request
ctrl_read_data_stage
ctrl_write_nodata_stage
intr_int_pipe0
bemp_int_pipe0
intr_int
intr_int_read
intr_int_write
ctr_read_start
ctr_write_start
write_fifo
read_fifo
chg_port
r_usb_fwupdater_basic.c
r_usb_fwupdater_basic.c
r_usb_fwupdater_cdcclass.c
r_usb_fwupdater_classcdc.c
r_usb_fwupdater_classcdc.c
r_usb_fwupdater_classcdc.c
r_usb_fwupdater_classcdc.c
r_usb_fwupdater_classcdc.c
r_usb_rx_mcu.c
r_usb_rx_mcu.c
r_usb_rx_mcu.c
r_usb_rx_mcu.c
r_usb_rx_mcu.c
r_usb_rx_mcu.c
req_get_descriptor
req_set_configuration
serial_init
reset_ep
cdc_init
class_write_data_stage
class_read_data_stage
class_write_nodata_stage
usb_cpu_mcu_initialize
usb_int_init
delay_xus
usb_cpu_int_disable
usb_cpu_usbint_init
usb_cpu_FunctionUSB1IP
r_usb_rx_mcu.c
usb_cpu_FunctionUSB0IP
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Processing Description
USB bulk receive
USB bulk transfer
USB initialization processing
USB interrupt processing
Get request information
Data processing
Non-data processing
Pipe 0 interrupt initialization
Interrupt BEMP pipe0
Interrupt initialization
Receive interrupt initialization
Transmit interrupt initialization
Receive start
Transmit start
Write specified data to specified USB FIFO
Read specified data buffer from USB FIFO
Read specified buffer size from the USB
FIFO
Get descriptor
Configuration
CDC initialization
Pipe Configuration
Serial initialize
Class request is "get line coding".
Class request is "set line coding".
Class request is "set control line state".
MCU initialization
USB interrupt initialization
Wait
USB interrupt disable
USB interrupt initialization
USB1 port mode and switch mode
initialization
USB0 port mode and switch mode
initialization
Page 44 of 66
7.4.5
The main() function in Internal Flash ROM rewrite program via USB performs branch judgment to determine whether to jump
to the user program or to continue with Internal Flash ROM rewrite program via USB.
After conditional branching is performed, the CPU build-in functions and peripheral circuits are initialized and Internal Flash
ROM rewrite program via USB is executed.
void main(void)
{
if (SW3 != SW_ACTIVE)
{
if(*(USERAPP_HEADER_ADDR + SEC_CODE_OFFSET) == USERAPP_SECURITY_CODE)
{
Startup user application
usb_cpu_int_disable();
jump_to_userapp();
}
}
rr.record_type = REC_TYPE_RESPONSE;
rr.record_len = NR_RESPONSE_BYTES;
usb_init();
cdc_init();
g_rom_write_buff.prev_addr = 0x00000000;
memset(g_rom_write_buff.recv_data, 0xFF, ROM_WRITE_SIZE);
/*FCU firm ready*/
R_FLASH_Open();
while(1)
{
if ( CDC_BLK_OUT == cdc_read())
{
cdc_main();
}
}
}
Figure 7-3
7.4.6
Receive check
main() Function
The processing to jump to the user program is performed in the jump_to_userapp( ) function. Refer to section 5.2 UserApp
Header Area (user application header) for details on specifying the start address of the user program jump destination.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 45 of 66
Internal Flash ROM rewrite program via USB processing is performed by cdc_main() function. This function is called from
the main() function.
cdc_main()
Processing branches
according to receive record
type
Start record
No
No
Yes
Data record
Yes
End record
Yes
Software reset
Receive confirmed
ROM Erase
ROM Write
End
Figure 7-4
ROM erase is performed in block units; write size varies according to ROM specification.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 46 of 66
8.
This section explains how the file transfer application performs on the host PC.
8.1
Development Environment
The file transfer application is configured with the following environment:
OS:
8.2
Operation Overview
The file transfer application transitions to the direct re-write processing when it receives the name (or option) of a target re-write
file name as an argument at startup. If a file has not been specified, the setting dialog is displayed.
Startup
(Application dialog class)
GUI Display
Settings for all types
Transmission
processing
Figure 8-1
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
(Rewrite transmission
processing thread class)
Page 47 of 66
File Configuration
The following lists the file transfer application files (only key files are listed).
Table 8-1
File Name
Description
FlashSelfRewriteGUI.dsw
Workspace file
FlashSelfRewriteGUI.dsp
Project file
FlashSelfRewriteGUI.clw
FlashSelfRewriteGUI.rc
Resource file
FlashSelfRewriteGUI.cpp
FlashSelfRewriteGUI.h
FlashSelfRewriteGUIDlg.cpp
FlashSelfRewriteGUIDlg.h
CommandThread.cpp
CommandThread.h
8.3.1
CommonProc.cpp
CommonProc.h
SerialPort.cpp
SerialPort.h
Resource.h
UsbfUpdater.ini
This processing checks the arguments (options) at the initial startup, then calls the dialog class.
The following lists the application startup options.
Table 8-2
Option
/S nnnnnn
/C nn
Filename
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 48 of 66
This processing displays the rewrite specification dialog screen (refer to section 4 Execute Internal Flash ROM rewrite
program via USB for details). This screen allows the user to specify operation mode, rewrite address, rewrite file, and connection
COM port. In addition, if these items are already specified when the screen is displayed, the function reads the application
operation setting file and reflects the settings as default values.
Click the Update button to call the rewrite transmission processing thread class.
Added member variables are shown below.
Table 8-3
Member Variable
Type
Description
Name
Int
m_nCOM
TCHAR
m_tcAppDir[_MAX_PATH]
CString
m_strCurTargetSeries
CString
m_strCurTarget
CString
m_strCurDevice
Current device
CStringArray
m_arDeviceSeries
CStringArray
m_arDeviceVal
Device list
CStringArray
m_arDeviceText
Int
m_nDevSize
CWinThrread*
m_pCommandThread
BOOL
m_bExistThread
BOOL
m_bStartUp
DWORD
m_dwROMStartAddress
DWORD
m_dwROMEndAddress
DWORD
m_dwEnROMStartAddress
DWORD
m_dwEnROMEndAddress
COleDateTime
m_dtStart
COleDateTime
m_dtEnd
Table 8-4
Read_DeviceInfo Function
Function name
Read_DeviceInfo
Description
Function
I/O
R01AN3294EJ0100
Jun 30, 2016
Input
None
Output
TRUE()FALSE()
Rev.1.00
Page 49 of 66
Write_DeviceInfo Function
Function Name
Write_DeviceInfo
Description
Format
Function
I/O
Input
None
Output
TRUE(success)/FALSE(fail)
Table 8-6
Update_Message Function
Function Name
Update_Message
Description
Format
Function
I/O
Input
Output
None
Table 8-7
Initialize_Device Function
Function Name
Initialize_Device
Description
Format
Function
Initialization processing
I/O
Input
None
Output
None
DeviceListRefresh
Description
Format
Function
I/O
Input
None
Output
None
DeviceInfoRefresh
Description
Format
Function
I/O
Input
None
Output
None
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 50 of 66
Table 8-10
AppStatus Function
Function Name
AppStatus
Description
Format
Function
I/O
Input
8.3.3
None
This processing uses the serial COM port transmission class to send and receive the specified file based on the interface
specifications when connected to the target evaluation board. If the file is a HEX file, analysis is also performed.
Added member variables are shown below (files listed under application dialog class are not repeated here).
Table 8-11
Type
Description
Member Name
CDialog*
m_pAppDlg
CString
m_strAppDir
Directory in application
BOOL*
m_pbExistThread
CSerialPort
m_Serial
int
m_nCOM
CString
m_strFileName
EnMode
m_enMode
Rewrite mode
DWORD
m_dwStartAddress
DWORD
m_dwROMStartAddress
DWORD
m_dwROMEndAddress
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 51 of 66
Table 8-12
Cal_CheckSum Function
Function Name
Cal_CheckSum
Description
Format
Function
I/O
Output
Table 8-13
Change_strHex2Bibary Function
Function Name
Change_strHex2Binary
Description
VOID Change_strHex2Binary
Format
LONG size )
Function
I/O
Input
None
Table 8-14
Upsets_DWORD Function
Function Name
Upsets_DWORD
Description
Format
Function
I/O
Input
Output
Inverted value
Table 8-15
SET_StartRecord Function
Function Name
SET_StartRecord
Description
Format
Function
I/O
R01AN3294EJ0100
Jun 30, 2016
Output
None
Rev.1.00
Page 52 of 66
SET_EndRecord Function
Function Name
SET_EndRecord
Description
Format
Function
I/O
8.3.4
Output
None
Processes that are shared in the File Transfer Application are defined in this section. Added member functions are described
below.
Table 8-17
GetAppDir Function
Function Name
GetAppDir
Description
Format
Function
I/O
Input
sw:
0
1
Output
Get path as is
Get shortened path
None
Table 8-18
Change_Hex2Val Function
Function Name
Change_Hex2Val
Description
Format
Function
I/O
Input
Output
Converted value
Table 8-19
IsNumeric Function
Function Name
IsNumeric
Description
Format
Function
I/O
Input
TRUE
(indicates
numerical
value)
/FALSE
(indicates
non-numerical value)
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 53 of 66
IsExistFile Function
Function Name
IsExistFile
Description
Format
FALSE )
Function
I/O
Input
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 54 of 66
This class is used for serial transmission via the COM port.
Table 8-21
Member Variable
Type
HANDLE
Description
Member Name
m_hCom
DCB
m_Dcb
COMMTIMEOUTS
m_TimeoutSts
INT
m_nCOM
Table 8-22
Port_Open Function
Function Name
Port_Open
Description
Format
Function
I/O
Input
Output
0
1
Successful connection
Failed connection
Table 8-23
Port_Close Function
Function Name
Port_Close
Description
Format
Function
I/O
Input
None
Output
None
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 55 of 66
Port_Write Function
Function Name
Port_Write
Description
Format
Function
I/O
Input
Table 8-25
Port_Read Function
Function Name
Port_Read
Description
Format
Function
I/O
Input
Table 8-26
Get_PortNumber Function
Function Name
Get_PortNumber
Description
Format
Function
I/O
Input
None
Output
Table 8-27
AutoScanCom Function
Function Name
AutoScanCom
Description
Format
INT nNo = 0 )
Function
I/O
Input
Output
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 56 of 66
The application operation setting file is ini file format and retains setting values and device information. Please keep this file in
the folder that stores the exe file. Note that the application will not run normally without the ini file.
Definitions for the ini file are provided below.
Table 8-28
Section
Description
Application
SS_xxx
Device. XXXXXXXX
Table 8-29
Section
Application
Key
Value
Description
Series
XXX
COM
1 to 20
EnableStartAddress
FFFFFFFF
EnableEndAddress
FFFFFFFF
SS_XXX
Device
XXX
Device. XXX
TargetSeries
XXX
Name
XXX
Size
1 to 999
StartAddress
FFFFFFFF
Items other than the device information are stored as display information and will be updated automatically when the GUI software is
closed.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 57 of 66
[Application]
Series=RX111
COM=6
EnableStartAddress=FFFE0000
EnableEndAddress=FFFFDFFF
[Device.R5F51105]
TargetSeries=RX110
Name=R5F51105
Size=128
StartAddress=FFFE0000
[Device.R5F51104]
TargetSeries=RX110
Name=R5F51104
Size=96
StartAddress=xxxxxxx
[Application Information]
Displayed target series: RX111 (Retained information from previous display)
Connected COM port: 6 (Retained information from previous connection)
Write enabled address: Start address to End address
[Device Information]
Device target series: RX110
Device name: R5F51105
Size: 128K bytes
ROM Address 0xFFFE0000 to 0xFFFFFFFF
(Input address using 8 hex numbers)
information
[SS_RX63N]
Device=R5F563NF
[SS_RX71M]
Device=R5F571ML
Figure 8-2
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 58 of 66
8.4
Application Messages
The following lists the messages displayed by the application in the message column and the timing in which they are displayed.
Table 8-30
Application Messages
Message
Display Timing
Success.
COM port n.
ERR: Data transmission error.
illegal value.
selected).
over.
Process stop.
ERR: file size error.
When file size check shows data size exceeds ROM area
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 59 of 66
9.
9.1
9.1.1
The PC transmits the start record and end record. The write data is sent to the Flash memory in data record format.
Start record
PC
Evaluation
Response record
board
Data record
Response record
End record
Response record
Figure 9-1
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 60 of 66
The PC side sends the start record, data record, and end record.
Each record is transmitted one at a time and the next record is not sent until a response for the previously sent record is
received.
(1).
Start record
The start record is the first record to be transmitted when executing a rewrite: 14 bytes.
Check sum ( )
Reserve ( )
Erase end
Figure 9-2
address ( )
Erase start
address ( )
Reserve ( )
Device type ( )
Record length ( )
Record type ( )
ROM erase start address setting. The address is a 32-bit numerical value in Little Endian format.
Erase end address: 4 bytes
ROM end address specification. The address is a 32-bit numerical value in Little Endian format.
Reserve:1 byte
0x00 fixed
Check sum: 1 byte
Record check sum.
Check sum of the record length, device type, and date and time.
The lower 8 bits of the complement 1 of the sum of all the bytes received.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 61 of 66
Data record
Write data record: (7+number of data) bytes (MAX 64 bytes)
Check sum (
Load address (
Record length ( )
Record type (
Data ()
Figure 9-3
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 62 of 66
End record
The end record is sent after all data is transmitted: 4 bytes.
Check sum (
Device type ( )
Record length (
Record type ( )
Figure 9-4
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 63 of 66
The evaluation board sends a record in response to the record received from the PC: 5 to 8 bytes
(1).
Response record
Check sum (
Response type ( )
Record length (
Record type (
Field ()
Figure 9-5
0xf0
Field: 1 to 4 bytes
If error, error code is 1 byte
If not an error, content depends on record type
Start record: device type, write/erase access restriction address
Data record: load address
End record: device type
Check sum: 1 byte
Record check sum.
Check sum of the record length, response type, and field.
The lower 8 bits of the complement 1 of the sum of all the bytes received.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 64 of 66
The name of the folder which stores src folder and rcpc file has to be "MCU name_FirmwareUpdater".
For example, the folder name is "RX63N_FirmwareUpdater" when using RX63N.
2.
Uncheck the checkbox Backup the project composition files after conversion in Project Convert Settings window.
Figure 10-1
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 65 of 66
All trademarks and registered trademarks are the property of their respective owners.
R01AN3294EJ0100
Jun 30, 2016
Rev.1.00
Page 66 of 66
Revision Record
Rev.
1.00
Date
Page
-
Description
Summary
First edition issued.
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.
2.
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.
3.
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.
4.
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.
5.
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
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.
7.
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.
8.
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.
9.
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.
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.
http://www.renesas.com
SALES OFFICES
Refer to "http://www.renesas.com/" for the latest and detailed information.