113
The flash memory itself cannot be read while the SWE bit is set to 1 to perform programming or
erasing, so the control program that performs programming and erasing should be run in on-chip
RAM.
Figure 7.8 shows the procedure for executing the program/erase control program when transferred
to on-chip RAM.
Reset SWE bit to 0
Set SWE bit to 1
Branch to flash memory application
program
Branch to program/erase control
program in RAM area
Execute program/erase control
program (flash memory rewriting)
Transfer program/erase control
program to RAM
Reset-start
(user mode)
Write the transfer program (and the
program/erase control program if
necessary) beforehand
Figure 7.8 User Program Mode Execution Procedure
7.6
Programming/Erasing Flash Memory
A software method, using the CPU, is employed to program and erase flash memory in the on-
board programming modes. There are flash memory operating modes: program mode, program-
verify mode, erase mode, and erase-verify mode. Transitions to these modes are made by setting
FLMCR1. The programming control program and the program/erase control program in on-board
programming mode are used by combining these operating modes. The programming into the
flash memory should be followed by “7.6.1 Program/Program-Verify Mode” and the erasing of
the flash memory should be followed by “7.6.2 Erase/Erase-Verify Mode”.
Summary of Contents for H8/3660
Page 4: ......
Page 26: ...10 ...
Page 82: ...66 ...
Page 152: ...136 ...
Page 154: ...138 ...
Page 260: ...244 ...