
703
22.6.2
User Program Mode
After setting FWP, the user should branch to, and execute, the previously prepared
programming/erase control program.
As the flash memory itself cannot be read while flash memory programming/erasing is being
executed, the control program that performs programming and erasing should be run in on-chip
RAM or external memory.
Use the following procedure (figure 22.12) to execute the programming control program that
writes to flash memory (when transferred to RAM).
Execute user application
program
Execute programming/
erase control program in RAM
(flash memory rewriting)
Transfer programming/erase
control program to RAM
FWP = 1
(user program mode)
Write FWP assessment program
and transfer program
1
2
3
4
5
Figure 22.12 User Program Mode Execution Procedure
Notes: 1. When programming and erasing, start the watchdog timer so that measures can be
taken to prevent program runaway, etc. Memory cells may not operate normally if
overprogrammed or overerased due to program runaway.
2. If an address at which a flash memory register resides is read in the mask ROM or
ZTAT version, the value will be undefined. When a flash memory version program is
used in the mask ROM or ZTAT version, the state of the FWP pin cannot be
determined. A modification must therefore be made to prevent operation of the flash
memory rewrite program.
Summary of Contents for SH7041 Series
Page 2: ......
Page 6: ......
Page 38: ...xvi ...
Page 44: ...6 ...
Page 46: ...8 ...
Page 48: ...10 ...
Page 82: ...44 ...
Page 114: ...76 ...
Page 118: ...80 ...
Page 124: ...86 ...
Page 170: ...132 ...
Page 250: ...212 ...
Page 492: ...454 ...
Page 506: ...468 ...
Page 604: ...566 ...
Page 684: ...646 ...
Page 706: ...668 ...
Page 778: ...740 ...
Page 780: ...742 ...
Page 818: ...780 ...
Page 850: ...812 ...
Page 923: ...SH7040 SH7041 SH7042 SH7043 SH7044 SH7045 Group Hardware Manual REJ09B0044 0600O ...