Cautions On Self Programming Function; Registers Used For Self Programming Function - NEC 78K0S/KB1+ User Manual

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

Advertisement

19.8.2 Cautions on self programming function

• No instructions can be executed while a self programming command is being executed. Therefore, clear and
restart the watchdog timer counter in advance so that the watchdog timer does not overflow during self
programming. Refer to Table 19-11 for the time taken for the execution of self programming.
• Interrupts that occur during self programming can be acknowledged after self programming mode ends. To avoid
this operation, disable interrupt servicing (by setting MK0 and MK1 to FFH, and executing the DI instruction)
when shifting from the normal mode to the self programming mode with a specific sequence.
• RAM is not used while a self programming command is being executed.
• If the supply voltage drops or the reset signal is input while the flash memory is being written or erased,
writing/erasing is not guaranteed.
• The value of the blank data set during block erasure is FFH.
• Set the CPU clock beforehand so that it is 1 MHz or higher during self programming.
<R>
• Execute self programming after executing the NOP and HALT instructions immediately after executing a specific
<R>
sequence to set self programming mode. At this time, the HALT instruction is automatically released after 10
(MAX.) + 2 CPU clocks (f
• If the clock of the oscillator or an external clock is selected as the system clock, execute the NOP and HALT
<R>
instructions immediately after executing a specific sequence to set self programming mode, wait for 8
releasing the HALT status, and then execute self programming.
<R>
• Check FPRERR using a 1-bit memory manipulation instruction.
• The state of the pins in self programming mode is the same as that in HALT mode.
• Since the security function set via on-board/off-board programming is disabled in self programming mode, the
self programming command can be executed regardless of the security function setting. To disable write or erase
processing during self programming, set the protect byte.
• Be sure to clear bits 5 to 7 of flash address pointer H (FLAPH) and flash address pointer H compare register
<R>
(FLAPHC) to 0 before executing the self programming command. If the self programming command is executed
with these bits set to 1, the device may malfunction.
• Clear the value of the FLCMD register to 00H immediately before setting to self programming mode and normal
<R>
mode.

19.8.3 Registers used for self programming function

The following registers are used for the self programming function.
• Flash programming mode control register (FLPMC)
• Flash protect command register (PFCMD)
• Flash status register (PFS)
• Flash programming command register (FLCMD)
• Flash address pointers H and L (FLAPH and FLAPL)
• Flash address pointer H compare register and flash address pointer L compare register (FLAPHC and FLAPLC)
• Flash write buffer register (FLW)
The 78K0S/KB1+ has an area called a protect byte at address 0081H of the flash memory.
CHAPTER 19 FLASH MEMORY
).
CPU
User's Manual U17446EJ3V1UD
μ
s
μ
s after
283

Advertisement

Table of Contents
loading

Table of Contents