Datasheet

M16C/6S Group Flash Memory Version
R01DS0201EJ0502 Rev.5.02 page 181 of 203
Dec 25, 2012
Standard Serial I/O Mode Disable Function (D-version only, see Table 1.1.4 for D-
version)
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 1.22.1 “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.
When the ID codes are set to “Protect”, and the ROMCP1 bits in the ROMCP register are set to other than
“11” (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.
Forced Erase Function (D-version only, see Table 1.1.4 for D-version)
Use the forced erase function in standard serial I/O mode. When the reserved word, “ALeRASE” in ASCII
code, are sent from the serial programmer as ID codes, the contents of the user ROM area will be erased
at once. 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 1.22.1), and the ROMCP1 bits in the
ROMCP register are other than “11” (ROM code protect enabled), the forced erase function is ignored and
ID code check is executed by the ID code check function. Table 1.22.2 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”, the user ROM area 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 any command is ignored. The flash memory
cannot be operated.
Table 1.22.2. Forced Erase Function
The user ROM area all erase
(forced erase function)
ID code check (ID code check function.
No ID match)
ID code check (ID code check function)
ID code check (ID code check function)
Condition
Function
ID code from serial
function programmer
Other than ALeRASE
ALeRASE
Other than ALeRASE
(1)
Other than ALeRASE
(1)
ALeRASE
ALeRASE
Code in ID code
storage address
ROMCP1 bits in the
ROMCP register
“11” (ROM code
protect disabled)
Other than “11” (ROM
code protect enabled)
Note 1: For the combination of the stored addresses is “Protect”, refer to “Standard Serial I/O Mode Disable
Function”.