CHAPTER 27 FLASH MEMORY
Page 818 of 920
27.5
Self-Programming
The RL78 microcontroller supports a self-programming function that can be used to rewrite the flash memory via a
user program. Because this function allows a user application to rewrite the flash memory by using the RL78
microcontroller self-programming library, it can be used to upgrade the program in the field.
Caution 1. The self-programming function cannot be used when the CPU operates with the subsystem
clock.
Caution 2. To prohibit an interrupt during self-programming, in the same way as in the normal operation
mode, execute the flash self-programming library in the state where the IE flag is cleared (0) by
the DI instruction. To enable an interrupt, clear (0) the interrupt mask flag to accept in the state
where the IE flag is set (1) by the EI instruction, and then execute the flash self-programming
library.
Caution 3. The high-speed on-chip oscillator should be kept operating during self-programming. If it is kept
stopped, it should be operated (HIOSTOP = 0). The flash self-programming library should be
executed after 30
μ
s have elapsed.
Remark 1.
For details of the self-programming function, refer to the
RL78 microcontroller Flash Self-
Programming Library Type01 User’s Manual (R01AN0350)
.
Remark 2.
For details of the time required to execute self-programming, see the notes on use that accompany the
flash self-programming library tool.
The self-programming function has two flash memory programming modes; wide voltage mode and full speed mode.
Specify the mode that corresponds to the flash operation mode specified in bits CMODE1 and CMODE0 in option
byte 000C2H.
Specify the full speed mode when the HS (high-speed main) mode is specified. Specify the wide voltage mode when
the LS (low-speed main) mode is specified.
If the argument fsl_flash_voltage_u08 is 00H when the FSL_Init function of the flash self-programming library
provided by Renesas Electronics is executed, full speed mode is specified. If the argument is other than 00H, the
wide voltage mode is specified.
Remark
Using both the wide voltage mode and full speed mode imposes no restrictions on writing, erasing, or
verification.
Содержание RL78/G1H
Страница 941: ...R01UH0575EJ0120 RL78 G1H...