h8s-2158 Renesas Electronics Corporation., h8s-2158 Datasheet - Page 784

no-image

h8s-2158

Manufacturer Part Number
h8s-2158
Description
Renesas 16-bit Single-chip Microcomputer H8s Family/h8s/2100 Series
Manufacturer
Renesas Electronics Corporation.
Datasheet
Section 24 ROM
24.7.2
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 which provides the user
program/erase control program from external memory. Because the flash memory itself cannot be
read during programming/erasing, transfer the user program/erase control program to on-chip
RAM, as like in boot mode. Figure 24.8 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 24.8, Flash Memory Programming/Erasing.
24.8
A software method, using the CPU, is employed to program and erase flash memory in the on-
board programming modes. Depending on the FLMCR1 and FLMCR2 settings, 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
Rev. 3.00 Jan 25, 2006 page 732 of 872
REJ09B0286-0300
Figure 24.8 Programming/Erasing Flowchart Example in User Program Mode
User Program Mode
Flash Memory Programming/Erasing
Execute user program/erase control
program (flash memory rewrite)
erase control program to RAM
erase control program in RAM
Branch to user program/
Branch to flash memory
Transfer user program/
application program
Program/erase?
Reset-start
Yes
No
Branch to flash memory
application program

Related parts for h8s-2158