R01UH0092EJ0110 Rev.1.10
Page 701 of 807
Jul 31, 2012
M16C/64C Group
30. Flash Memory
30.9.2
Forced Erase Function
Use the forced erase function in standard serial I/O mode. When the reserved word, “ALeRASE” in
ASCII code, is sent from the serial programmer as an ID code, the contents of program ROM 1 and
program ROM 2 will all be erased. However, if the ID codes stored in the ID code storage addresses
are set to a reserved word other than “ALeRASE” (other than the combination table listed in Table
30.20), the ROMCR bit in the OFS1 address is 1 (ROMCP1 bit enabled), and the ROMCP1 bit in the
OFS1 address is 0 (ROM code protect enabled), the forced erase function is ignored and ID code
check is executed by the ID code check function. Table 30.21 lists conditions and functions for forced
erase function.
When both the ID codes sent from the serial programmer and the ID codes stored in the ID code
storage addresses correspond to the reserved word “ALeRASE”, program ROM 1 and program ROM 2
will be erased. However, when the serial programmer sends other than “ALeRASE”, even if the ID
codes stored in the ID code storage addresses are “ALeRASE”, there is no ID match and no command
is accepted. The flash memory cannot be operated.
30.9.3
Standard Serial I/O Mode Disable Function
Use the standard serial I/O mode disable function in standard serial I/O mode. When the ID codes in
the ID code stored addresses are set to “Protect” in ASCII code (see Table 30.20 “Reserved Word of ID
Code”), the MCU does not communicate with the serial programmer. Therefore, the flash memory
cannot be read, written or erased by the serial programmer. User boot mode can be selected even
when the ID codes are set to “Protect”.
When the ID codes are set to “Protect”, the ROMCR bit in the OFS1 address is 1 (ROMCP1 bit
enabled), and the ROMCP1 bit in the OFS1 address is set to 0 (ROM code protect enabled), ROM
code protection cannot be disabled by the serial programmer. Therefore, the flash memory cannot be
read, written, or erased by the serial or parallel programmer.
Table 30.21
Forced Erase Function
Condition
Function
ID code from serial
programmer
Code in ID code
storage address
ROMCP1 bit in the
OFS1 address
ALeRASE
ALeRASE
–
Program ROM 1 and program ROM 2
all erase (forced erase function)
Other than
ALeRASE
1 (ROM code
protect disabled)
0 (ROM code
protect enabled)
ID code check (ID code check function)
Other than
ALeRASE
ALeRASE
–
ID code check (ID code check function.
No ID match)
Other than
ALeRASE
–
ID code check (ID code check function)
Note:
1.
When the combination of the stored addresses is “Protect”, refer to 30.9.3 “Standard Serial I/O
Mode Disable Function”.
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...