Renesas M16C/62P Hardware Manual page 271

Renesas 16-bit single-chip microcomputer
Hide thumbs Also See for M16C/62P:
Table of Contents

Advertisement

M16C/62P Group (M16C/62P, M16C/62PT)
22.3.5.4 Program Command (40h)
The program command writes 2-byte data to the flash memory.
By writing "xx40h" in the first bus cycle and data to the write address in the second bus cycle, an auto
program operation (data program and verify) will start. The address value specified in the first bus
cycle must be the same even address as the write address specified in the second bus cycle.
The FMR00 bit in the FMR0 register indicates whether an auto program operation has been com-
pleted. The FMR00 bit is set to "0" (busy) during auto program and to "1" (ready) when an auto
program operation is completed.
After the completion of an auto program operation, the FMR06 bit in the FMR0 register indicates
whether or not the auto program operation has been completed as expected. (Refer to 22.3.8 Full
Status Check.)
An address that is already written cannot be altered or rewritten.
Figure 22.8 shows a flow chart of the program command programming.
The lock bit protects each block from being programmed inadvertently. (Refer to 22.3.6 Data Protect
Function.)
In EW1 mode, do not execute this command on the block where the rewrite control program is allo-
cated.
In EW0 mode, the microcomputer enters read status register mode as soon as an auto program
operation starts. The status register can be read. The SR7 bit in the status register is set to "0" at the
same time an auto program operation starts. It is set to "1" when auto program operation is com-
pleted. The microcomputer remains in read status register mode until the read array command is
written. After completion of an auto program operation, the status register indicates whether or not the
auto program operation has been completed as expected.
NOTES:
Figure 22.8 Program Command
R
e
. v
2
3 .
0
S
e
p
0
, 1
2
0
0
4
R
E
J
0
9
B
0
1
8
5
0 -
2
3
0
Z
Write the command code "xx40h"
to an address to be written
Write data to an
address to be written
1. Write the command code and data to even addresses.
page 257
f o
3
6
4
Start
NO
FMR00=1?
YES
Full status check
Program operation
is completed
22. Flash Memory Version

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pt

Table of Contents