Flash Memory Programming By Self Writing; Outline Of Self Programming - NEC 78K0S/KA1+ User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KA1+:
Table of Contents

Advertisement

Table 18-9 shows the relationship between the security setting and the operation in each programming mode.
Table 18-9. Relationship Between Security Setting and Operation In Each Programming Mode
Programming Mode
Security Setting
Batch erase (chip erase)
Block erase
Write
Notes 1. Execution of each command is prohibited by the security setting.
2. Execution of self programming command is possible regardless of the security setting.

18.8 Flash Memory Programming by Self Writing

The 78K0S/KA1+ supports a self programming function that can be used to rewrite the flash memory via a user
program, making it possible to upgrade programs in the field.
Caution Self programming processing must be included in the program before performing self writing.
Remark
To use the internal flash memory of the 78K0S/KA1+ as the external EEPROM for storing data, refer to
"78K0S/Kx1+ EEPROM Emulation AN" (U17379E).

18.8.1 Outline of self programming

To execute self programming, shift the mode from the normal operation of the user program (normal mode) to the
self programming mode. Write/erase processing for the flash memory, which has been set to the register in advance,
is performed by executing the HALT instruction during self programming mode. The HALT state is automatically
released when processing is completed.
To shift to the self programming mode, execute a specific sequence for a specific register. Refer to 18.8.4
Example of shifting normal mode to self programming for details.
Remark
Data written by self programming can be referenced with the MOV instruction.
Mode
Normal mode
Self programming mode
Note Maskable interrupt servicing is disabled during self programming mode.
Figure 18-10 shows a block diagram for self programming, Figure 18-11 shows the self programming state
transition diagram, Table 18-11 lists the commands for controlling self programming.
CHAPTER 18 FLASH MEMORY
On-Board/Off-Board Programming
Security Setting
Security Operation
Note 1
Possible
Valid
Table 18-10. Self Programming Mode
User Program Execution
Enabled
Note
Enabled
User's Manual U16898EJ3V0UD
Self Programming
Security Setting
Security Operation
Note 2
Impossible
Invalid
Execution of Write/erase for Flash
Memory with HALT Instruction
Enabled
273

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents