English
Language : 

M16C29 Datasheet, PDF (359/499 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/Tiny SERIES
M16C/29 Group
20. Flash Memory Version
20.3 Functions To Prevent Flash Memory from Rewriting
The flash memory has a built-in ROM code protect function for parallel I/O mode and a built-in ID code
check function for standard input/output mode to prevent the flash memory from reading or rewriting.
20.3.1 ROM Code Protect Function
The ROM code protect function disables reading or changing the contents of the on-chip flash memory in
parallel I/O mode. Figure 20.4 shows the ROMCP address. The ROMCP address is located in a user
ROM area. To enable ROM code protect, set the ROMCP1 bit to “002”, “012”, or “102” and set the bit 5 to
bit 0 to “1111112”.
To cancel ROM code protect, erase the block including the the ROMCP register in CPU rewrite mode or
standard serial I/O mode.
20.3.2 ID Code Check Function
Use the ID code check function in standard serial input/output mode. Unless the flash memory is blank,
the ID code sent from the programmer and the 7-byte ID code written in the flash memory are compared
for match. If the ID codes do not match, the commands sent from the programmer are not acknowledged.
The ID code consists of 8-bit data, starting with the first byte, into addresses, 0FFFDF16, 0FFFE316,
0FFFEB16, 0FFFEF16, 0FFFF316, 0FFFF716, and 0FFFFB16. The flash memory must have a program
with the ID code set in these addresses.
Rev. 1.12 Mar.30, 2007 page 335 of 458
REJ09B0101-0112