English
Language : 

SH7047 Datasheet, PDF (602/764 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTMRISC engine Family/SH7000 Series
19.6.2 Programming/Erasing in User Program Mode
On-board programming/erasing of an individual flash memory block can also be performed in user
program mode by branching to a user program/erase control program. The user must set branching
conditions and provide on-board means of supplying programming data. The flash memory must
contain the user program/erase control program or a program that provides the user program/erase
control program from external memory. As the flash memory itself cannot be read during
programming/erasing, transfer the user program/erase control program to on-chip RAM or
external memory. Figure 19.6 shows a sample procedure for programming/erasing in user program
mode. Prepare a user program/erase control program in accordance with the description in section
19.8, Flash Memory Programming/Erasing.
Reset-start
No
Program/erase?
Yes
Transfer user program/erase
control program to RAM
Branch to user program/erase
control program in RAM
Branch to flash memory
application program
FWP = low*
Execute user program/erase control
program (flash memory rewrite)
FWP = high
Branch to flash memory
application program
Note: * Do not constantly apply a low level to the FWP pin. Only apply a low level to the FWP pin when
programming or erasing the flash memory. To prevent excessive programming or excessive erasing,
while a low level is being applied to the FWP pin, activate the watchdog timer in case of handling CPU
runaways.
Figure 19.6 Programming/Erasing Flowchart Example in User Program Mode
Rev. 2.00, 09/04, page 562 of 720