CHAPTER 19 FLASH MEMORY
User’s Manual U17446EJ3V1UD
280
Table 19-9 shows the relationship between the security setting and the operation in each programming mode.
Table 19-9. Relationship Between Security Setting and Operation In Each Programming Mode
On-Board/Off-Board Programming
Self Programming
Programming Mode
Security Setting
Security Setting
Security Operation
Security Setting
Security Operation
Batch erase (chip erase)
Block erase
Write
Possible Valid
Note 1
Impossible
Invalid
Note 2
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.
19.8 Flash Memory Programming by Self Writing
The 78K0S/KB1+ 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.
Remarks 1.
For usage of self programming, refer to the examples from 19.8.4. onward.
2.
To use the internal flash memory of the 78K0S/KB1+ as the external EEPROM for storing data, refer
to
78K0S/Kx1+ EEPROM Emulation Application Note (U17379E)
.
19.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
19.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.
Table 19-10. Self Programming Mode
Mode
User Program Execution
Execution of Write/erase for Flash
Memory with HALT Instruction
Normal mode
Enabled
−
Self programming mode
Enabled
Note
Enabled
Note
Maskable interrupt servicing is disabled during self programming mode.
Figure 19-10 shows a block diagram for self programming, Figure 19-11 shows the self programming state
transition diagram, Table 19-11 lists the commands for controlling self programming.
<R>
Содержание 78K0S/KB1+
Страница 2: ...User s Manual U17446EJ3V1UD 2 MEMO ...