
CHAPTER 27 FLASH MEMORY
User’s Manual U17473EJ2V0UD
609
Table 27-13. Processing Time for Each Command When PG-FP4 Is Used (Reference) (2/2)
(3)
μPD78F0393 (internal ROM capacity: 32 KB)
Port: UART-Ext-FP4CK (External main system clock (fEXCLK)),
Speed: 115,200 bps
Command of
PG-FP4
Port: CSI-Internal-OSC
(Internal high-speed
oscillation clock (fRH)),
Speed: 2.5 MHz
Frequency: 2.0 MHz
Frequency: 20 MHz
Signature
0.5 s (TYP.)
Blankcheck
0.5 s (TYP.)
Erase
0.5 s (TYP.)
Program
2.5 s (TYP.)
5 s (TYP.)
Verify
1.5 s (TYP.)
4 s (TYP.)
3.5 s (TYP.)
E.P.V
3.5 s (TYP.)
6 s (TYP.)
Checksum
0.5 s (TYP.)
Security
0.5 s (TYP.)
27.10 Flash Memory Programming by Self-Writing
The 78K0/LG2 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 78K0/Kx2 self-
programming sample 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. To execute interrupt servicing, restore the normal operation mode after self-programming
has been stopped, and execute the EI instruction.
After the self-programming mode is later restored, self-
programming can be resumed.
Remark
For details of the self-programming function and the 78K0/Kx2 self-programming library, refer to
78K0/Kx2 Flash Memory Self Programming User’s Manual (U17516E).
Cautions 1. The self-programming function cannot be used when the CPU operates with the subsystem
clock.
2. Input a high level to the FLMD0 pin during self-programming.
3. Be sure to execute the DI instruction before starting self-programming.
The self-programming function checks the interrupt request flags (IF0L, IF0H, IF1L, and IF1H).
If an interrupt request is generated, self-programming is stopped.
4. Self-programming is also stopped by an interrupt request that is not masked even in the DI
status. To prevent this, mask the interrupt by using the interrupt mask flag registers (MK0L,
MK0H, MK1L, and MK1H).