Hitachi H8/3062 Hardware Manual page 512

Single-chip microcomputer
Hide thumbs Also See for H8/3062:
Table of Contents

Advertisement

MD2–MD0 = 101, 111
1
Reset-start
2
Transfer on-board programming
3
program to RAM
4
Branch to program in RAM
FWE = high
5
(user program mode)
Execute on-board programming
6
program in RAM
(flash memory rewriting)
Clear SWE bit, then release FWE
7
(user program mode clearing)
Execute user application program
8
in flash memory
Note: * For further information on FWE application and disconnection, see section 17.9, Flash
Memory Programming and Erasing Precautions.
Figure 17.9 User Program Mode Execution Procedure (Example)
Notes: 1. Do not apply a constant high level to the FWE pin. To prevent inadvertent
programming or erasing due to program runaway, etc., apply a high level to the FWE
pin only when the flash memory is programmed or erased (including execution of flash
memory emulation using RAM). Memory cells may not operate normally if
overprogrammed or overerased due to program runaway, etc. Also, while a high level
is applied to the FWE pin, the watchdog timer should be activated to prevent
overprogramming or overerasing due to program runaway, etc.
2. Flash memory rewriting should not be carried out in mode 6. When mode 6 is set, the
FWE pin must be driven low.
Procedure:
A program that executes operations 3 to 8
below must be written into flash memory by the
user beforehand.
1. Set the mode pins to an on-chip ROM
enabled mode (mode 5 or 7).
2. Start the CPU with a reset. (The CPU can
also be started from user program mode by
applying a high level to the FWE pin during
the reset, i.e. while the RES pin is low.)
3. Transfer the on-board programming
program to RAM.
4. Branch to the program in RAM.
5. Apply a high level to the FWE pin*.
(Transition to user program mode)
6. Check that the FWE pin is high, then
execute the on-board programming
program in RAM. As a result, rewriting of
the user application program in flash
memory is performed.
7. After rewriting, clear the SWE bit. Drive the
FWE pin from high to low, and clear user
program mode.*
8. On completion of programming, branch to
the user application program in flash
memory and run the program.
495

Advertisement

Table of Contents
loading

Table of Contents