English
Language : 

TMP91FY42FG Datasheet, PDF (271/332 Pages) Toshiba Semiconductor – Original CMOS 16-Bit Microcontroller
TMP91FY42
3.14.5.2 (1-B) Program/Erase Procedure Example 2
In this example, only the boot program (minimum requirement) is stored in the
flash memory and other necessary routines are supplied from the controller.
(Step-1) Environment setup
First, the condition (e.g. pin status) for entering User Boot mode must be set and the
I/O bus for transferring data must be determined. Then, the device’s peripheral
circuitry must be designed and a corresponding program must be written. Before
mounting the device on the board, it is necessary to write the following two routines
into one on the sectors in the flash memory.
(a) Mode select routine : Selects Normal mode or User Boot mode.
(b) Transfer routine
: Loads the program/erase routine from an external
source.
The following routines are prepared on the controller.
(c) Program/erase routine : Programs/erases the flash memory.
(d) Copy routine 1
: Copies routines (a) and (b) into the internal RAM or
external memory.
(e) Copy routine 2
: Copies routines (a) and (b) from the internal RAM or
external memory into the flash memory.
New user application
program
(I/O)
(TMP91FY42)
Flash memory
Old user application
program
(c) Program/erase routine
(d) Copy routine 1
(e) Copy routine 2
(Controller)
[Reset processing routine]
(a) Mode select routine
(b) Transfer routine
RAM
(Step-2) Entering User Boot mode (using the reset processing)
The following explanation assumes that these routines are incorporated in the reset
processing program. After reset release, the reset processing program first
determines whether or not the device should enter User Boot mode. If the condition
for entering User Boot mode is true, User Boot mode is entered to program/erase the
flash memory.
(TMP91FY42)
Flash memory
Old user application
program
[Reset processing routine]
(a)Mode Select routine
(b)Transfer routine
(I/O)
RAM
0 → 1 RESET
Condition for
entering User Boot
mode
(user-specified)
New user application
program
(c) Program/erase routine
(d) Copy routine 1
(e) Copy routine 2
(Controller)
91FY42-269
2006-11-08