CHAPTER 21 FLASH MEMORY
Preliminary User’s Manual U16846EJ1V0UD
349
21.7 Flash Memory Programming by Self-Writing
The 78K0/KB1+ supports a self-programming function that can be used to rewrite the flash memory via a user
program, so that the program can be upgraded in the field.
The programming mode is selected by bits 0 and 1 (FLSPM0 and FLSPM1) of the flash programming mode control
register (FLPMC).
The procedure of self-programming is illustrated below.
Remark
For details of the self programming function, refer to a separate document to be published (document
name: 78K0/Kx1+ Application Note, release schedule: Pending).
Figure 21-17. Self-Programming Procedure
Mask interrupts again
FLSPM1, FLSPM0 = 0, 1
Secure entry RAM area
Mask all interrupts
FLMD0
pin = High level
CALL #8100H
Set parameters
to entry RAM
Start self-programming
Read parameters on RAM
and access flash memory
according to parameter contents
FLMD0
pin = Low level
FLSPM1, FLSPM0 = 0, 0
End of self-programming
Entry program
(user program)
Firmware
Entry program
(user program)