To our customers, Old Company Name in Catalogs and Other Documents On April 1st, 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the old company name remains in this document, it is a valid Renesas Electronics document. We appreciate your understanding. Renesas Electronics website: http://www.renesas.
Notice 1. 2. 3. 4. 5. 6. 7. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm the latest product information with a Renesas Electronics sales office.
Application Note Flash Development Toolkit Application Note (Applications) User Program Mode (H8S/2378F) www.renesas-electoronics.com Rev.1.00 2006.
Notes regarding these materials 1. This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use. Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document. 2.
Renesas Flash Development Toolkit Application Note (Applications) User Program Mode (H8S/2378F) Revision 1.0 Renesas Technology Corp.
Contents 1. Introduction ............................................................................................................... 1 2. H8S/2378F (H8S Family)........................................................................................... 2 2.1 Flash Memory Configuration .......................................................................................... 2 2.2 Operating Modes............................................................................................................
4.3.8 4.4 Exiting...................................................................................................................................... 41 Boot Mode 2 (Programming the User Area) .................................................................. 42 4.4.1 Starting the Flash Development Toolkit................................................................................ 42 4.4.2 Selecting an Option ......................................................................................
7.1.2 I/O Register Definition (io2378.h) .......................................................................................... 84 7.1.3 Macro Definition (FDTUMain.h and KAIg.h) ....................................................................... 85 7.2 Main Processing and ROM Main Processing ................................................................ 86 7.2.1 Module Hierarchical Structure...............................................................................................
1.
2. H8S/2378F (H8S Family) 2.1 Flash Memory Configuration The flash memory of the H8S/2378F has two types of memory MATs: User MAT (user area) and user boot MAT (user boot area). In addition, it has an area for storing a flash memory programming and erasing control program that is called a boot MAT (boot area). This application note calls them the user area, user boot area, and boot area, respectively. The flash memory configuration is shown in Table 2-1.
2.3 On-Board Programming Modes There are three on-board programming modes: Boot mode, user program mode, and user boot mode. The on-board programming modes are listed in Table 2-3. Table 2-3 On-Board Programming Modes Item Operating mode Boot Mode User Program Mode Mode 3 Mode 4 (Expanded mode with on-chip ROM enabled) User Boot Mode Mode 5 Mode 7 (Single-chip mode) The user area can be programmed by using a desired interface.
3. Functions of the Flash Development Toolkit The Renesas Flash Development Toolkit is an on-board flash programming tool for Renesas F-ZTAT microcomputers, which offers a sophisticated and easy-to-use graphical user interface. When it is used with Renesas High-performance Embedded Workshop (HEW), it provides users who develop embedded application software using Renesas F-ZTAT microcomputers with an integrated development environment.
The graphical user interface screen of the Flash Development Toolkit is shown in Figure 3-1.
4. 4.1 Operating the Flash Development Toolkit Connecting the Adapter Board On-board programming adapter board for F-ZTAT* microcomputers HS0008EAUF1H (called the adapter board hereafter), which is connected between a host computer and user system, has a function which can write a user application program in flash memory incorporated in an F-ZTAT microcomputer on the user system (on-board) and erase it from the flash memory. The adapter board connection is shown in Figure 4-1.
The pin numbers and corresponding signals of the user system interface cable used for connecting the adapter board and user system are shown below. Table 4-1 Pin Numbers and Corresponding Signals of the HS0008EAUF1H User Interface Cable No Signal Name No.
Adapter board (HS0008EAUF1H) Vcc Pulled up at 47 kΩ or more. VIN 18,20 (Vcc) RXD 15 TxD1 TXD RxD1 17 SW6-1(MD0) MD0 SW6-2(MD1) MD1 SW6-3(MD2) MD2 MD2 9 (IO0) Pulled down at about 1 kΩ. H8S/2378F Vcc Pulled up at about 1 kΩ. RES 1 RES GND 2,4,6,8,10, 12,14,16 Connector*1 3428-6002LCSC Note: 1. Manufacturer: 3M Corporate Figure 4-2 Example of Connecting the H8S/2378F and Adapter Board 4.1.
4.2 Setting the Flash Development Toolkit Set the Flash Development Toolkit first to write a program in flash memory. 4.2.1 Starting the Flash Development Toolkit From the "All Programs" menu, select "Flash Development Toolkit 3.4." 4.2.2 Selecting an Option The "Welcome" screen of the Flash Development Toolkit appears. Select "Create a new project workspace.
4.2.3 Setting a New Project Workspace Set a new project workspace. Use "Browse..." and select a directory, and specify the device name in "Workspace Name." Specify a project name if required. In this example, the same name is specified in "Workspace Name" and "Project Name." When you have set the project workspace, click "OK.
4.2.4 Selecting the Device and Kernel Select the target device from the pull-down menu. Select "Generic BOOT Device" because the H8S/2378F is a 0.18-μm product. When you have selected the device, click "Next(N).
4.2.5 Selecting a Communications Port Select the adapter board (FDM) from the pull-down menu. When you have selected the communications port, click "Next(N).
4.2.6 Adapter Board Pin Settings Set the pins on the adapter board (FDM) for the boot mode. For example, set the output of FWx pin to high (1) (open jumper J15) and that of MD2 (IO0) to low (0). In this example, the FWx pin outputs 1 for setting a mode and MD2 (IO0) outputs 0 for serial communication connection. Turn off the power and select the boot mode (mode 3) using DIP switch 6. Set DIP switch 6 as follows. When you have set the pins, turn on the power.
An example of connecting the H8S/2378F and Renesas adapter board (HS0008EAUF1H) is shown in Figure 4-2. The pull-up and pull-down resistor values shown are only examples. Evaluate the microcomputer to determine the actual values on the user system. Adapter board (HS0008EAUF1H) Vcc Pulled up 47 k Ω or more. VIN 18,20 (Vcc) RXD 15 TxD1 TXD RxD1 17 SW6-1(MD0) MD0 SW6-2(MD1) MD1 SW6-3(MD2) H8S/2378F MD2 MD2 9 (IO0) Pulled down at about 1 k Vcc Pulled up at about 1 kΩ.
4.2.7 Selecting a USB Device Check the device. Select the adapter board (FDM). When you have selected USB device, click "OK.
4.2.8 Selecting a Device Check the device. Select HD64F2378. When you have selected the device, click "OK.
4.2.9 Selecting the Clock Mode Check the device. Select the clock mode. When you have selected the clock mode, click "OK.
4.2.10 Checking the Generic Device The device has been checked. Click "OK.
4.2.11 Setting the Device (Input Clock) In the first column enter the frequency of the clock used for the board in MHz. For example, enter 8.25 (MHz). Set 4 in "Select the multiplier for the Main clock frequency (CKM):." When you have set the values, click "Next(N)." The input clock is the frequency of the clock directly input to the microcomputer. Enter the frequency of the crystal or ceramic resonator connected to the user system with three significant digits.
4.2.12 Selecting the Connection Type (Communication Speed) Select a baud rate from the pull-down menu. For example, select 19200 (baud). When you have selected the baud rate, click "Next(N).
4.2.13 Selecting Programming Options (Protection Level and Messaging Level) Select the protection level and messaging level. For example, select "Automatic" for "Protection" and "Advanced" for "Messaging." When you have selected programming options, click "Next(N).
4.2.14 Reset Mode Pin Settings Set pins on the adapter board for restarting the device in the reset mode. These settings are not required for this procedure. When you have set the items, click "Finish.
4.2.15 Completion of Connection The H8S/2378F board has been connected to the Flash Development Toolkit in the boot mode. At this time, the contents of the user boot area and user area have been erased.
4.3 Boot Mode 1 (Programming the User Boot Area) Write a program in the user boot area in the boot mode. The program to be written is sample test program 2378F.mot (S-type file). The bit rate in this program has been modified according to the frequency. On how to modify the bit rate, refer to section 7.1.1, Bit Rate Setting (GenTest.h). 4.3.1 Selecting a File To select a file to be programmed, select "Add Files..." from the "Project" pull-down menu.
In the "Add File(s)" dialog, add file "2378F.mot." When you have selected the file, click "Add." File 2378F.mot is added to the project.
4.3.2 Programming To program the user boot area, set the user boot area. Click the right mouse button on file 2378F.mot to display the pop-up menu. Click "User Boot Area" so that the file can be downloaded to the user boot area.
Click the right mouse button on file 2378F.mot again to display the pop-up menu. Click "Download File to [User Boot Area]" to download file 2378F.mot to the user boot area.
You can check that the program has been downloaded to the user boot area.
4.3.3 Blank Check To confirm that the user boot area has been programmed, perform a blank check. Click "Device" to open the pull-down menu and select "Flash Area for Non-Write Ops," then "User Boot Area.
Click "Device" again to open the pull-down menu and click "Blank Check.
The result of the blank check for the selected area is displayed. The user boot area is not blank.
4.3.4 Checksum To confirm that the user boot area has been programmed, display a checksum. Click "Device" to open the pull-down menu and click "Flash Checksum.
The result of the checksum calculation is displayed.
4.3.5 Disconnecting the Device After programming has been completed, disconnect the device. Click "Device" to open the pull-down menu and click "Disconnect.
The device is disconnected.
4.3.6 Removing a File Remove a file. Click "Project" to open the pull-down menu and click "Remove Files....
The file is displayed. Click "Remove All." Click "OK.
The file is removed.
4.3.7 Removing a Folder Remove a folder. Click the right mouse button on a folder to display the pop-up menu and click "Remove Folder.
The folder is removed.
4.3.8 Exiting Save the work folder and exit the Flash Development Toolkit. Click "File" to open the pull-down menu and click "Exit." Choose to save the session. Click "Yes." The Flash Development Toolkit terminates operation. The work file space of the Flash Development Toolkit is saved as file 2378.AWS.
4.4 Boot Mode 2 (Programming the User Area) Write a program in the user area in the boot mode. The same program as used in section 4.3, Boot Mode 1 (Programming the User Boot Area) is to be written. In this section, the saved work file space file (2378.AWS) is used to start the Flash Development Toolkit. 4.4.1 Starting the Flash Development Toolkit From the "All Programs" menu, select "Flash Development Toolkit 3.4." 4.4.
Project 2378 is displayed. The Flash Development Toolkit can also be started by directly opening (or double-clicking on) project workspace file 2378.AWS.
4.4.3 Connecting the Device Connect the USB adapter board (FDM) to a PC and the H8S/2378F board to the adapter board and set the H8S/2378F board in the boot mode. To select the boot mode (mode 3), use DIP switch 6. Set DIP switch 6 as follows.
Select the adapter board (FDM). When you have selected USB device, click "OK." The adapter board is connected.
4.4.4 Selecting a File To select a file to be programmed, select "Add Files..." from the "Project" pull-down menu.
In the "Add File(s)" dialog, add file "2378F.mot." When you have selected the file, click "Add." File 2378F.mot is added to the project.
4.4.5 Programming Click the right mouse button on file 2378F.mot to display the pop-up menu. Click "Download File to [User Area]" to download file 2378F.mot to the user area. The default is "Download File to [User Area].
You can check that the program has been downloaded to the user area.
4.4.6 Blank Check and Checksum To confirm that the user area has been programmed, perform a blank check and calculate a checksum. Click "Device" to open the pull-down menu and click "Blank Check." Click "Device" to open the pull-down menu and click "Flash Checksum." The results of the blank check and checksum calculation are displayed.
4.5 User Boot Mode In the user boot mode, the user area can be programmed or erased. The user boot area cannot be programmed or erased. 4.5.1 Writing a Program in the User Boot Area Start "Flash Development Toolkit 3.4" and open project workspace file 2378.AWS. Write program file 2378F.mot in the user boot area in the boot mode. In this sample, toolbar positions are changed to display the Configure Project button.
4.5.2 Disconnecting the Device Click "Device" to open the pull-down menu and click "Disconnect.
4.5.3 Configuring the Project Click "Device" to open the pull-down menu and click "Configure Flash Project.
The configure project window appears.
4.5.4 Setting the User Program Mode Select the "Device" tab in the configure project window and double-click "Connection" and "Boot.
Set the connection type. Select "USER Program Mode" in "Select Connection:." Set the baud rate to 9600 bps. When you have set the connection type, click "Next.
Set the pins on the adapter board (FDM) for the user boot mode. For example, set the output of FWx to high (1) and that of MD2 to low (0). In this example, the FWx pin outputs 1 for selecting a mode (the jumper is open) and MD2 (IO0) outputs 0 for serial communication connection. Turn the power off and select the user boot mode (mode 5) using DIP switch 6. When you have set the pins, turn on the power.
The user boot mode has been set.
4.5.5 Connecting the Device Click "Device" to open the pull-down menu and click "Connect to Device." Select the adapter board (FDM). When you have selected the device, click "OK." The connection in the user boot mode is completed.
4.5.6 Programming Write a program in the user area in the user boot mode. To program a file in the user area, specify a download area. Click the right mouse button on file 2378F.mot to display the pop-up menu. Click "User Boot Area" to uncheck it so that the file can be downloaded to the user area.
Click the right mouse button on file 2378F.mot again to display the pop-up menu. Click "Download [User Area]" to download file 2378F.mot to the user area.
You can check that the program has been downloaded to the user area.
4.5.7 Blank Check and Checksum To confirm that the user area has been programmed, perform a blank check and calculate a checksum. Click "Device" to open the pull-down menu and click "Blank Check." Click "Device" to open the pull-down menu and click "Flash Checksum." The results of the blank check and checksum calculation are displayed.
4.6 User Program Mode In the user program mode, the user area can be programmed or erased. The user boot area cannot be programmed or erased. 4.6.1 Writing a Program in the User Area Start "Flash Development Toolkit 3.4" and open project workspace file 2378.AWS. Write program file 2378F.mot in the user area in the boot mode. After programming the file, disconnect the device and display the configure project window. On how to display the configure project window, refer to section 4.5.
4.6.2 Setting the User Program Mode Select the "Device" tab in the configure project window and double-click "Connection" and "Boot.
Set the connection type. Select "USER Program Mode" in "Select Connection:." Set the baud rate to 9600 bps. When you have set the connection type, click "Next.
Set the pins on the adapter board (FDM) for the user boot mode. For example, set the output of FWx to high (1) and that of MD2 to low (0). In this example, the FWx pin outputs 1 for selecting a mode (jumper J15 is open) and MD2 (IO0) outputs 0 for serial communication connection. Turn off the power and select an expanded mode with on-chip ROM enabled (mode 4) or single-chip mode (mode 7). To select the mode, use DIP switch 6. When you have set the pins, turn on the power.
The user program mode has been set.
4.6.3 Connecting the Device Click "Device" to open the pull-down menu and click "Connect to Device(C)." Select the adapter board (FDM). When you have selected USB device, click "OK." The connection in the user program mode is completed.
4.6.4 Programming Write a program in the user area in the user program mode. Click the right mouse button on file 2378F.mot to display the pop-up menu. Click "Download File to [User Area]" to download file 2378F.mot to the user area.
You can check that the program has been downloaded to the user area.
4.6.5 Blank Check and Checksum To confirm that the user area has been programmed, perform a blank check and calculate a checksum. Click "Device" to open the pull-down menu and click "Blank Check." Click "Device" to open the pull-down menu and click "Flash Checksum." The results of the blank check and checksum calculation are displayed.
5. Flash Development Toolkit Processing The Flash Development Toolkit can be connected in either of the following two modes: the boot mode or the user program mode. In both modes, the continuation of the execution from a previous session can be specified. The connection modes of the Flash Development Toolkit are listed in Table 5-1. Normally, a new connection processing is used. The hexadecimal code is a command code of the Flash Development Toolkit.
6. Sample Program This section describes the sample program in the user program mode of the H8S/2378F. 6.1 File Configuration The file configuration is shown in Figure 6-1. 2378 2378 folder ⏐⎯Project Project folder ⏐ ⏐⎯2378F 2378F folder ⏐ ⏐ ⏐⎯Release Release folder ⏐ ⏐ ⏐⎯2378f.hwp 2378f project database file ⏐ ⏐ ⏐⎯2378F.tps Current session file ⏐ ⏐ ⏐⎯defaultsession.hsf Session file ⏐ ⏐⎯Project.hws Project workspace file ⏐ ⏐⎯Project.
6.2 Source Files The source files are listed in Table 6-1. Table 6-1 Source Files File Baud rate File Name Description BaudRate.src BRR calculation assembly language file Command function CmdFunc.c Command processing source file Command function header CmdFunc.h Command function definition file Command header commands.h Command code definition file Device information header DeviceInfo.h Device information definition file Erase function FDTErase.
6.3 Modules The modules are listed in Table 6-2. Table 6-2 Modules File Module Module Name Function BaudRate.src BRR calculation cal_brr CmdFunc.c Reference function ReferFunc Reference function Device selection SelectDevice Selects a device. Clock mode selection SelectClockMode Selects a clock mode. New baud rate setting SetNewBaudRate Sets a new baud rate. Program status RequestBootPrgSts Program status Sum check SumCheck Sum check ACK transmission SendAck Sends ACK.
6.4 Module Hierarchical Structure The module hierarchical structure is shown in Figure 6-2.
(Continued) ⏐⎯RamMain (0xFF4000) RAM main processing ⏐⎯ProcessCommand ⏐⎯Get Command processing Reception ⏐⎯RequestBootPrgSts Program status ⏐⎯SumCheck Sum check ⏐ ⏐⎯UserBootSelect User boot area selection ⏐ ⏐ ⏐⎯nop NOP macro ⏐ ⏐⎯UserMatSelect User area selection ⏐ ⏐ ⏐⎯nop NOP macro ⏐ ⏐⎯Put Transmission ⏐⎯LibTrans Library transfer ⏐ ⏐⎯ScoBitSet ⏐ SCO bit setting ⏐⎯nop NOP macro ⏐⎯SendAck ACK transmission ⏐⎯EraseFLASH Flash erasing ⏐ ⏐⎯EraseInit Erase initial setting ⏐ ⏐ ⏐⎯UserMatSelect User area
(Continued) ⏐⎯ReadMemory Memory read ⏐ ⏐⎯UserBootSelect User boot area selection ⏐ ⏐⎯UserMatSelect User area selection ⏐ ⏐⎯ErrorCode Error code macro ⏐ ⏐⎯Put Transmission ⏐⎯CheckBlank Blank check ⏐ ⏐⎯UserBootSelect User boot area selection ⏐ ⏐⎯UserMatSelect User area selection ⏐ ⏐⎯ErrorCode Error code macro ⏐ ⏐⎯Put Transmission ⏐ ⏐⎯SendAck ACK transmission ⏐⎯Put Transmission Figure 6-2 Module Hierarchical Structure (3) 79
6.5 Flow of the Program This section describes the flow of the sample program with referencing the module hierarchical structure. 6.5.1 Program Processing Flow The processing flow of the sample program is shown in Figure 6-3. In the user program mode, bit rate adjustment and user area erase processing, which are performed during boot operation, are not performed. For this reason, the program and data written in flash memory can be saved.
6.5.2 Main Processing (main) The flow of main processing is shown below: (1) The reset vector causes a branch to start (startup). (2) Start (startup) sets the stack pointer and calls main processing (main). (3) Main processing (main) calls SCI initial setting (InitSCI) and branches to ROM main processing (RomMain). (4) ROM main processing (RomMain) transfers RAM main processing to RAM, receives and processes a command, and sets items.
6.5.4 RAM Main Processing (RamMain) The flow of RAM main processing (RamMain) is shown below: (1) Command processing (ProcessCommand) processes commands. The following commands are to be processed. The sample program cannot process user boot area programming selection or block erasing for the user boot area because it runs in the user program mode.
7. Source Files of the Sample Program This section describes main source files of the sample program. 7.1 Header Files This sample program uses the following header files. 7.1.1 Bit Rate Setting (GenTest.h) A bit rate is set. /* 33MHz 9600bps */ //#define MA_BRR_SCI 0x6A /* Bit rate register channel 1 */ /* 8.25MHz 9600bps */ #define MA_BRR_SCI 0x1A /* Bit rate register channel 1 */ In the user program mode, communications between the connected device is performed at 9600 bps.
7.1.2 I/O Register Definition (io2378.h) The registers and bits related to the SCI module and ROM are defined.
#define FECS (*(volatile unsigned char *)0xFFFFC6) #define FKEY (*(volatile unsigned char *)0xFFFFC8) #define FMATS (*(volatile unsigned char *)0xFFFFC9) #define FTDAR (*(volatile unsigned char *)0xFFFFCA) #define FLASH18 (*(volatile struct st_flash18 *)0xFFFFE800) /* FLASH18 Address*/ 7.1.3 Macro Definition (FDTUMain.h and KAIg.h) Labels used in the program are defined. (1) FDTUMain.
7.2 Main Processing and ROM Main Processing 7.2.1 Module Hierarchical Structure The module hierarchical structure of main processing and ROM main processing is shown in Figure 7-1.
7.2.3 Transfer Start (Ugenu.c and rom2ram.src) The following modules are transferred from ROM to RAM according to the transfer table (rom2ram.src) when RAM main processing and others are transferred. For the sections, ROM options are used. Table 7-2 Transfer Modules Section Module P_RAM_SCI Get, Put (GenTest.c) P_RAM_MAIN RamMain and others (FDTUMain.c) P_RAM_CMD RequestBootPrgSts and others (CmdFunc.c) P_RAM_WRITE WriteFLASH and others (FDTWrite.c) P_RAM_ERASE EraseFLASH (FDTErase.c) 7.2.
7.3 RAM Main Processing RAM main processing transfers a library, and erases and programs flash memory. This processing is executed in RAM. 7.3.1 Library Transfer (FDTUMain.c) (1) LibTrans When the command ID is prepareErase (0x48), FECS is set to EraseMode (0x01) and the erasing library is selected. When the command ID is other than the above (prepareUserAreaWrite, 0x43), FPCS is set to WriteMode (0x01) and the programming library is selected.
(2) ScoBitSet The library transfer destination address is set in the FTDAR register and the SCO bit of the FCCS register is set to 1. At least four NOP instructions are required after the SCO bit setting. To determine whether a transfer error occurs, 0xFF is programmed in the library transfer destination address before transfer and 0x00 is checked after transfer.
7.3.2 Area Selection (FDTUMain.c) To select the user boot area or user area, FmatsUserBootMat (0xaa) or FmatsUserMat (0x00) is set in the FMATS register. At least two NOP instructions are required after setting.
7.3.3 Flash Memory Erasing (FDTErase.c) (1) EraseInit The user area is selected, the operating frequency is specified, and the erasing library is initialized. The operating frequency specified with FDT is transmitted to the device with new bit rate selection. For initial setting of the library, this operating frequency is used.
7.3.4 Flash Memory Programming (FDTWrite.c) (1) WriteInit The user area is selected, the operating frequency is specified, and the initial setting of the programming library is performed.
(3) Executing programming end processing (WriteFLASH) Flash memory programming end processing is partially shown below. For details, refer to Source Files of the Sample Program. Programming data reception (GetWriteData) receives the programming data storage address and programming destination address. When the programming destination address is WRITE_END (0xFFFFFFFF), programming end processing is performed.
8. Programming Guide This section describes how to write a program using the 0.18-μm F-ZTAT microcomputer standard boot program. The section also contains tips on creating programs and notes. For details, refer to the Hardware Manual. 8.1 Overview The 0.18-μm F-ZTAT microcomputer standard boot program consists of a transfer library, erasing library, and programming library. The functions are listed below: (1) Transfers the programming library or erasing library to the specified RAM area.
8.2.3 Selecting a Library To select a library, set the corresponding bit of the FPCS or FECS register to 1. Table 8-3 Registers for Selecting a Program to Be Transferred Program to Be Transferred Register Bit Name Bit Programming program FPCS register PPVS bit Bit 0 Erasing program FECS register EPVB bit Bit 0 8.2.4 Selecting the User Boot Area To select the user boot area, set the FMATS register to H'AA.
8.3 Using the Libraries This section describes how to use the libraries. 8.3.1 Transfer Perform transfer operation using the procedure below: (1) Select the programming library or erasing library to be transferred. For the programming library, set the PPVS bit (bit 0) of the FPCS register to 1. For the erasing library, set the EPVB bit (bit 0) of the FECS register to 1. (2) Specify the transfer destination in RAM in the FTDAR register.
8.4 Modules There are the following libraries: Transfer library, erasing library, and programming library. The function of each module is shown below: Table 8-6 Libraries and Entries Library Module Name Entry Function Transfer Transfer start Setting the SCO bit to 1 Transfers the program corresponding to the specified program type and program code. Erasing Erase initial setting (Transfer destination + 32 bytes) Calculates the erasing wait time using the specified operating frequency.
8.5.2 Erase Initial Setting Name Erase initial setting Type typedef BYTE (*InitPtr)(WORD); Function Performs erase initial setting. Argument WORD: Operating frequency Return Value Processing result Normal termination: H'00 Operating frequency error: H'03 Processing 8.5.3 Calculates the erasing wait time using the operating frequency. Block Erasing Name Block erasing Type typedef BYTE (*ErasePtr)(BYTE); Function Erases a block.
8.5.5 Programming Name Programming Type typedef BYTE (*WritePtr)(BYTE *, BYTE *); Function Performs programming. Arguments BYTE * (first argument): Programming data storage address BYTE * (second argument): Programming destination address Return Value Processing result Normal termination: H'00 Programming data address error: H'03 Programming address error: H'05 FKEY error: H’11 Programming error: H'21 Error protection: H'41 Processing Checks FWE, FKEY, and programming addresses.
Flash Development Toolkit Application Note (Applications) User Program Mode (H8S/2378F) Publication Date: Jun. 28, 2006 Rev.1.00 Published by: Sales Strategic Planning Div. Renesas Technology Corp. Edited by: Microcomputer Tool Development Department Renesas Solutions Corp. © 2006. Renesas Technology Corp. and Renesas Solutions Corp., All rights reserved. Printed in Japan.
Flash Development Toolkit Application Note (Applications) 1753, Shimonumabe, Nakahara-ku, Kawasaki-shi, Kanagawa 211-8668 Japan REJ06J0003-0100