Rev. 3.0, 10/02, page 583 of 686
19.8
Flash Memory Programming/Erasing
A software method, using the CPU, is employed to program and erase flash memory in the on-
board programming modes. Depending on the FLMCR1 setting, the flash memory operates in one
of the following four modes: program mode, erase mode, program-verify mode, and erase-verify
mode. The programming control program in boot mode and the user program/erase control
program in user program mode use these operating modes in combination to perform
programming/erasing. Flash memory programming and erasing should be performed in
accordance with the descriptions in section 19.8.1, Program/Program-Verify Mode and section
19.8.2, Erase/Erase-Verify Mode, respectively.
19.8.1
Program/Program-Verify
When writing data or programs to the flash memory, the program/program-verify flowchart shown
in figure 19.11 should be followed. Performing programming operations according to this
flowchart will enable data or programs to be written to the flash memory without subjecting the
chip to voltage stress or sacrificing program data reliability.
1. Programming must be done to an empty address. Do not reprogram an address to which
programming has already been performed.
2. Programming should be carried out 128 bytes at a time. A 128-byte data transfer must be
performed even if writing fewer than 128 bytes. In this case, H’FF data must be written to the
extra addresses.
3. Prepare the following data storage areas in RAM: a 128-byte programming data area, a 128-
byte reprogramming data area, and a 128-byte additional-programming data area. Perform
reprogramming data computation and additional programming data computation according to
figure 19.11.
4. Consecutively transfer 128 bytes of data in byte units from the reprogramming data area or
additional-programming data area to the flash memory. The program address and 128-byte
data are latched in the flash memory. The lower 8 bits of the start address in the flash memory
destination area must be H’00 or H’80.
5. The time during which the P1 bit is set to 1 is the programming time. Figure 19.10 shows the
allowable programming times.
6. The watchdog timer (WDT) is set to prevent overprogramming due to program runaway, etc.
An overflow cycle of approximately (y + z2 +
α
+
β
)
µ
s is allowed.
7. For a dummy write to a verify address, write 1-byte data H’FF to an address whose lower 2 bits
are b’00. Verify data can be read in words from the address to which a dummy write was
performed.
8. The maximum number of repetitions of the program/program-verify sequence to the same bit is
(N1 + N2).
Содержание H8S/2215 Series
Страница 4: ...Rev 3 0 10 02 page iv of lviii ...
Страница 6: ...Rev 3 0 10 02 page vi of lviii ...
Страница 28: ...Rev 3 0 10 02 page xxviii of lviii ...
Страница 122: ...Rev 3 0 10 02 page 64 of 686 ...
Страница 132: ...Rev 3 0 10 02 page 74 of 686 ...
Страница 156: ...Rev 3 0 10 02 page 98 of 686 ...
Страница 198: ...Rev 3 0 10 02 page 140 of 686 ...
Страница 320: ...Rev 3 0 10 02 page 262 of 686 ...
Страница 384: ...Rev 3 0 10 02 page 326 of 686 ...
Страница 474: ...Rev 3 0 10 02 page 416 of 686 ...
Страница 481: ...Rev 3 0 10 02 page 423 of 686 I O pin Control OUT IN TDI pin TDO pin Figure 14 2 Boundary Scan Register Configuration ...
Страница 608: ...Rev 3 0 10 02 page 550 of 686 ...
Страница 614: ...Rev 3 0 10 02 page 556 of 686 ...
Страница 650: ...Rev 3 0 10 02 page 592 of 686 ...
Страница 652: ...Rev 3 0 10 02 page 594 of 686 ...
Страница 680: ...Rev 3 0 10 02 page 622 of 686 ...
Страница 721: ...Rev 3 0 10 02 page 663 of 686 ø A23 to A0 to tBRQS tBACD tBZD tBACD tBZD tBRQS Figure 24 11 External Bus Release Timing ...
Страница 732: ...Rev 3 0 10 02 page 674 of 686 ...
Страница 740: ...Rev 3 0 10 02 page 682 of 686 ...