English
Language : 

HD6433044 Datasheet, PDF (597/867 Pages) Hitachi Semiconductor – Hitachi Single-Chip Microcomputer
The flash memory cannot be read while being programmed or erased, so the update program must
either be stored in external memory, or transferred temporarily to the RAM area and executed in
RAM.
User Program Mode Execution Procedure: Figure 18-13 shows the procedure for user program
mode execution in RAM.
1
Store user application programs
Set MD2 to MD0 to 101, 110, or 111
Apply 0 to 5 V to MD2
2
VPP = 12 V
(user program mode)
3
Transfer on-board update
program into RAM
Execute on-board update
program in RAM
Set VPPE bit
4
Wait 5 to 10 µs
Update flash memory
5
Execute user application program
Procedure
1. The user stores application programs in
flash memory. One of these is an on-
board update program that will execute
steps 3 to 5 below.
2. Pin inputs are set up for user program
mode.
3. A reset starts the CPU, which transfers
the on-board update program into RAM.
4. Following a branch to the program in
RAM, the on-board update program is
executed.
VPPE bit in FLMCR is set to update
flash memory.
Wait 5 to 10µs to stabilize internal
power supply.
Update program is executed.
5. After the on-board update ends, clear
the VPPE bit then a branch is made to
the updated user application program
and this program is executed.
After clearing the VPPE bit, before the
flash memory program executes, flash
memory read setup time (tPRS) is
needed.
Note:
To prevent microcontroller errors caused by accidental programming or erasing, apply 12 V to VPP
only when the flash memory is programmed or erased, or when flash memory is emulated by RAM;
do not apply 12 V to the VPP pin during normal operation. While 12 V is applied, the watchdog
timer should be running and enabled to halt runaway program execution, so that program runaway
will not lead to overprogramming or overerasing. For further information about turning VPP on and
off, see section 18-10, Flash Memory Programming and Erasing Precautions.
Figure 18-13 User Program Mode Operation (Example)
588