Datasheet
Section 7 ROM
Page 218 of 982 REJ09B0465-0300 Rev. 3.00
Sep 17, 2010
H8S/20103, H8S/20203, H8S/20223, H8S/20115, H8S/20215, H8S/20235 Group
(3) Programming
A programming command is used to program data in the flash memory in 4-byte units.
Command or data size can be set depending on the FMWUS bit in FLMCR1. Setting the FMWUS
bit to 0 enables using byte instructions. When H'41 is written in the first command cycle and data
is written to the programming address in the second through fifth command cycles, programming
and verifying are automatically started*.
Setting the FMWUS bit to 1 enables using word instructions. When H'4141 is written in the first
command cycle and data is written to the programming address in the second and third command
cycles, programming and verifying are started*.
Completion of programming is indicated by the FMRDY bit in FLMSTR. The FMRDY bit is read
as 0 during programming, and read as 1 after programming completion.
After programming completion, the programming result can be checked by reading the FMPRSF
bit in FLMSTR. (See the description in (9) below, Full Status Checking.)
Figure 7.16 shows the programming flowchart.
Do not additionally program the already-programmed addresses.
Note that if the lock bit is 0 (locked) in the specified block and the FMLBD bit is 0 (lock bit
enabled), a programming command is not accepted for the specified block.
In EW1 mode, do not execute this command for the block in which the reprogramming-control
program is located.
The FMRDY bit in FLMSTR changes to 0 when programming is started, and changes to 1 when
completed.
Note: * The lower two bits of the programming addresses are ignored.