RL78/G13 CHAPTER 25 FLASH MEMORY
R01UH0146EJ0100 Rev.1.00 945
Sep 22, 2011
25.6 Security Settings
The RL78/G13 supports a security function that prohibits rewriting the user program written to the internal flash memory,
so that the program cannot be changed by an unauthorized person.
The operations shown below can be performed using the Security Set command. The security setting is valid when the
programming mode is set next.
• Disabling block erase
Execution of the block erase command for a specific block in the flash memory is prohibited during on-board/off-board
programming. However, blocks can be erased by means of self programming.
• Disabling write
Execution of the write command for entire blocks in the flash memory is prohibited during on-board/off-board
programming. However, blocks can be written by means of self programming.
• Disabling rewriting boot cluster 0
Execution of the block erase command and write command on boot cluster 0 (00000H to 00FFFH) in the flash
memory is prohibited by this setting.
The block erase, write commands and rewriting boot cluster 0 are enabled by the default setting when the flash
memory is shipped. Security can be set by on-board/off-board programming and self programming. Each security setting
can be used in combination.
Table 25-11 shows the relationship between the erase and write commands when the RL78/G13 security function is
enabled.
Remark To prohibit writing and erasing during self-programming, use the flash sealed window function (see 25.7.2 for
detail).