CHAPTER 16 FLASH MEMORY (
µµµµ
PD70F3107A)
521
User’s Manual U14359EJ4V0UM
16.7 Flash Memory Programming by Self-Programming
The
µ
PD70F3107A supports a self-programming function to rewrite the flash memory using a user program. By
using this function, the flash memory can be rewritten with a user application. This self-programming function can be
also used to upgrade the program in the field.
16.7.1 Outline of self-programming
Self-programming implements erasure and writing of the flash memory by calling the self-programming function
(device’s internal processing) on the program placed in the block 0 space (000000H to 1FFFFFH) and areas other
than internal ROM area. To place the program in the block 0 space and internal ROM area, copy the program to
areas other than 000000H to 1FFFFFH (e.g. internal RAM area) and execute the program to call the self-
programming function.
To call the self-programming function, change the operating mode from normal mode to self-programming mode
using the flash programming mode control register (FLPMC).
Figure 16-3. Outline of Self-Programming
256 KB
Flash memory
00000H
3FFFFH
Erase area
Note
(128 KB)
Erase area
Note
(128 KB)
Flash memory
Normal operation mode
Self-programming mode
00000H
3FFFFH
FLPMC
←
02H
FLPMC
←
00H
Self-programming
function
(delete/write routine
incorporated)
Note
Data is deleted in area units (128 KB).