Rev. 5.00, 12/03, page 638 of 1088
17.16
Programming/Erasing Flash Memory
In the on-board programming modes, flash memory programming and erasing is performed by
software, using the CPU. There are four flash memory operating modes: program mode, erase
mode, program-verify mode, and erase-verify mode. Transition to these modes can be made for
addresses H'000000 to H'03FFFF by setting the PSU1, ESU1, P1, E1, PV1, and EV1 bits in
FLMCR1, and for addresses H'040000 to H'07FFFF by setting the PSU2, ESU2, P2, E2, PV2, and
EV2 bits in FLMCR2.
The flash memory cannot be read while being programmed or erased. Therefore, the program that
controls flash memory programming/erasing (the programming control program) should be
located and executed in on-chip RAM, external memory, or flash memory except for the above
address areas. When the program is located in external memory, an instruction for programming
the flash memory and the following instruction should be located in on-chip RAM. The DTC
should not be activated before or after the instruction for programming the flash memory is
executed.
Notes: 1. Operation is not guaranteed if setting/resetting of the SWE1, ESU1, PSU1, EV1, PV1,
E1, and P1 bits in FLMCR1 or setting/resetting of the SWE2, ESU2, PSU2, EV2, PV2,
E2, and P2 bits in FLMCR2 is executed by a program in flash memory.
2. Perform programming in the erased state. Do not perform additional programming on
previously programmed addresses.
3. Do not program addresses H'000000 to H'03FFFF and H'040000 to H'07FFFF
simultaneously. Operation is not guaranteed when programming is performed
simultaneously.
17.16.1
Program Mode (n = 1 for addresses H'000000 to H'03FFFF, and n = 2 for
addresses H'040000 to H'07FFFF)
Follow the procedure shown in the program/program-verify flowchart in figure 17-45 to write data
or programs to flash memory. Performing program operations according to this flowchart will
enable data or programs to be written to flash memory without subjecting the device to voltage
stress or sacrificing program data reliability. Programming should be carried out 128 bytes at a
time.
For the wait times (x, y, z1, z2, z3
α
, ß,
γ
,
ε
,
η
, and
θ)
after bits are set or cleared in flash memory
control register n (FLMCRn) and the maximum number of programming operations (N), see
section 20.3.6, Flash Memory Characteristics.
Following the elapse of (x)
µ
s or more after the SWEn bit is set to 1 in flash memory control
register n (FLMCRn), 128-byte program data is stored in the program data area and reprogram
data area, and the 128-byte data in the reprogram data area is written consecutively to the write
addresses. The lower 8 bits of the first address written to must be H'00 or H'80. The 128
consecutive byte data transfers are performed. The program address and program data are latched
Содержание H8S/2318 series
Страница 2: ......
Страница 6: ...Rev 5 00 12 03 page vi of xxx...
Страница 12: ...Rev 5 00 12 03 page xii of xxx...
Страница 30: ...Rev 5 00 12 03 page xxx of xxx...
Страница 54: ...Rev 5 00 12 03 page 24 of 1088...
Страница 98: ...Rev 5 00 12 03 page 68 of 1088...
Страница 128: ...Rev 5 00 12 03 page 98 of 1088...
Страница 138: ...Rev 5 00 12 03 page 108 of 1088...
Страница 168: ...Rev 5 00 12 03 page 138 of 1088...
Страница 212: ...Rev 5 00 12 03 page 182 of 1088...
Страница 324: ...Rev 5 00 12 03 page 294 of 1088...
Страница 436: ...Rev 5 00 12 03 page 406 of 1088...
Страница 546: ...Rev 5 00 12 03 page 516 of 1088...
Страница 580: ...Rev 5 00 12 03 page 550 of 1088...
Страница 822: ...Rev 5 00 12 03 page 792 of 1088...
Страница 876: ...Rev 5 00 12 03 page 846 of 1088...
Страница 901: ...Rev 5 00 12 03 page 871 of 1088 A 2 Instruction Codes Table A 2 shows the instruction codes...
Страница 1121: ...H8S 2319 Group H8S 2318 Group Hardware Manual REJ09B0089 0500O...