English
Language : 

UPD78F1502AGK-GAK-AX Datasheet, PDF (861/1031 Pages) Renesas Technology Corp – 16-Bit Single-Chip Microcontrollers
78K0R/Lx3
CHAPTER 27 FLASH MEMORY
27.8 Flash Memory Programming by Self-Programming
The 78K0R/Lx3 microcontrollers support 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 78K0R/Lx3
microcontrollers self-programming library, it can be used to upgrade the program in the field.
If an interrupt occurs during self-programming, self-programming can be temporarily stopped and interrupt servicing
can be executed. If an unmasked interrupt request is generated in the EI state, the request branches directly from the
self-programming library to the interrupt routine. After the self-programming mode is later restored, self-programming can
be resumed. However, the interrupt response time is different from that of the normal operation mode.
Cautions 1. The self-programming function cannot be used when the CPU operates with the subsystem clock.
2. In the self-programming mode, call the self-programming start library (FlashStart).
3. To prohibit an interrupt during self-programming, in the same way as in the normal operation
mode, execute the 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 self-programming library.
4. In low-power-consumption mode, use the regulator with fCLK fixed to 1 MHz when executing self
programming. For details of the low-power-consumption mode, see CHAPTER 25 REGULATOR.
5. Disable DMA operation (DENn = 0) during the execution of self programming library
functions.
R01UH0004EJ0501 Rev.5.01
845
Jun 20, 2011