Flash Memory
263
Mitsubishi microcomputers
M16C / 62P Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
development
Preliminary Specifications Rev.1.0
Specifications in this manual are tentative and subject to change.
Boot Mode
After a hardware reset which is performed by applying a low-level signal to the P5
5
pin and a high-level
signal to the CNV
SS
and P5
0
pins, the microcomputer is placed in boot mode, thereby executing the pro-
gram in the boot ROM area.
During boot mode, the boot ROM and user ROM areas are switched over by the FMR05 bit in the FMR0
register.
The boot ROM area contains a standard serial input/output mode based rewrite control program which was
stored in it when shipped from the factory.
The boot ROM area can be rewritten in parallel input/output mode. Prepare an EW0 mode based rewrite
control program and write it in the boot ROM area, and the flash memory can be rewritten as suitable for the
system.
Functions To Prevent Flash Memory from Rewriting
To prevent the flash memory from being read or rewritten easily, parallel input/output mode has a ROM
code protect and standard serial input/output mode has an ID code check function.
ROM Code Protect Function
The ROM code protect function inhibits the flash memory from being read or rewritten during parallel
input/output mode. Figure 1.27.2 shows the ROMCP register.
The ROMCP register is located in the user ROM area.The ROMCP1 bit consists of two bits. The ROM
code protect function is enabled by clearing one or both of two ROMCP1 bits to “0” when the ROMCR bits
are not ‘00
2
,’ with the flash memory thereby protected against reading or rewriting. Conversely, when the
ROMCR bits are ‘00
2
’ (ROM code protect removed), the flash memory can be read or rewritten. Once the
ROM code protect function is enabled, the ROMCR bits cannot be changed during parallel input/output
mode. Therefore, use standard serial input/output or other modes to rewrite the flash memory.
ID Code Check Function
Use this function in standard serial input/output mode. Unless the flash memory is blank, the ID codes
sent from the programmer and the ID codes written in the flash memory are compared to see if they
match. If the ID codes do not match, the commands sent from the programmer are not accepted. The ID
code consists of 8-bit data, the areas of which, beginning with the first byte, are 0FFFDF
16
, 0FFFE3
16
,
0FFFEB
16
, 0FFFEF
16
, 0FFFF3
16
, 0FFFF7
16
, and 0FFFFB
16
. Prepare a program in which the ID codes
are preset at these addresses and write it in the flash memory.