CHAPTER 26 FLASH MEMORY
Preliminary User’s Manual U17260EJ3V1UD
574
26.9 Flash Memory Programming by Self-Programming
The 78K0/KE2 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/KE2 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. 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/KE2 self-programming library, refer to a
separate document to be published (document name: 78K0/Kx2 Application Note, release schedule:
Pending).
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).
5. Self-programming is executed with the internal high-speed oscillation clock. If the CPU
operates with the X1 clock or external main system clock, the oscillation stabilization wait
time of the internal high-speed oscillation clock elapses during self-programming.
6. Allocate the entry program for self-programming in the common area of 0000H to 7FFFH.
Figure 26-15. Operation Mode and Memory Map for Self-Programming (
µ
PD78F0537)
Memory bank 1
Memory bank 4
Memory bank 3
Memory bank 5
Memory bank 2
Normal mode
Flash memory
(common area)
0 0 0 0 H
8 0 0 0 H
7 F F F H
F F F F H
F B 0 0 H
F A F F H
C 0 0 0 H
B F F F H
F 8 0 0 H
F 7 F F H
E 0 0 0 H
D F F F H
F F 0 0 H
F E F F H
Internal high-
speed RAM
Internal
expansion RAM
SFR
Reserved
Reserved
Flash memory
control
firmware ROM
Disable
accessing
Flash memory
(memory bank 0)
Memory bank 1
Memory bank 4
Memory bank 3
Memory bank 5
Memory bank 2
Self-programming mode
Flash memory
(common area)
0 0 0 0 H
8 0 0 0 H
7 F F F H
F F F F H
F B 0 0 H
F A F F H
F A 2 0 H
F A 1 F H
F A 2 0 H
F A 1 F H
C 0 0 0 H
B F F F H
F 8 0 0 H
F 7 F F H
F A 0 0 H
F 9 F F H
F A 0 0 H
F 9 F F H
E 0 0 0 H
D F F F H
F F 0 0 H
F E F F H
Internal high-
speed RAM
Internal
expansion RAM
SFR
Reserved
Reserved
Buffer RAM
Buffer RAM
Reserved
Reserved
Flash memory
control
firmware ROM
Disable
accessing
Enable
accessing
Instructions can be fetched
from common area and
selected memory bank.
Instructions can be
fetched from common
area and firmware ROM.
Содержание 78K/0 Series
Страница 2: ...Preliminary User s Manual U17260EJ3V1UD 2 MEMO ...
Страница 10: ......
Страница 53: ...CHAPTER 3 CPU ARCHITECTURE Preliminary User s Manual U17260EJ3V1UD 53 Figure 3 6 Memory Map µPD78F0536 ...
Страница 120: ......