Renesas RL78 Series User Manual page 798

16-bit single-chip microcontrollers
Hide thumbs Also See for RL78 Series:
Table of Contents

Advertisement

RL78/G1D
26.6 Self-Programming
The RL78 microcontroller supports a self-programming function that can be used to rewrite the code flash memory via
a user program. Because this function allows a user application to rewrite the code flash memory by using the flash self-
programming library, it can be used to upgrade the program in the field.
Cautions 1. The self-programming function cannot be used when the CPU operates with the subsystem clock.
2. 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.
3. The high-speed on-chip oscillator should be kept operating during self-programming. If it is kept
stopping, the high-speed on-chip oscillator clock should be operated (HIOSTOP = 0). The self-
programming library should be executed after 30 μs have elapsed.
Remarks 1.
For details of the self-programming function, refer to RL78 Microcontroller Flash Self Programming
Library Type01 User's Manual (R01AN0350).
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 or LV (low voltage 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.
R01UH0515EJ0120 Rev.1.20
Dec 16, 2016
CHAPTER 26 FLASH MEMORY
777

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rl78/g1dR5f11aggR5f11aghR5f11agj

Table of Contents