Hitachi H8/3048 Hardware Manual page 597

Single-chip microcomputer
Table of Contents

Advertisement

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
www.DataSheet4U.com
RAM.
User Program Mode Execution Procedure: Figure 18-13 shows the procedure for user program
mode execution in RAM.
Store user application programs
1
Set MD
to MD
2
Apply 0 to 5 V to MD
2
V
(user program mode)
Transfer on-board update
3
program into RAM
Execute on-board update
program in RAM
Set V
4
Wait 5 to 10 µs
Update flash memory
5
Execute user application program
Note:
To prevent microcontroller errors caused by accidental programming or erasing, apply 12 V to V PP
only when the flash memory is programmed or erased, or when flash memory is emulated by RAM;
do not apply 12 V to the V PP 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 V PP on and
off, see section 18-10, Flash Memory Programming and Erasing Precautions.
Figure 18-13 User Program Mode Operation (Example)
to 101, 110, or 111
0
2
= 12 V
PP
E bit
PP
588
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.
V
E bit in FLMCR is set to update
PP
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 V
E bit then a branch is made to
PP
the updated user application program
and this program is executed.
After clearing the V
E bit, before the
PP
flash memory program executes, flash
memory read setup time (t
needed.
) is
PRS

Advertisement

Table of Contents
loading

Table of Contents