User Program Mode; Flash Memory Programming/Erasing; Figure 24.8 Programming/Erasing Flowchart Example In User Program Mode - Renesas H8S/2158 User Manual

16-bit single-chip microcomputer h8s family/h8s/2100 series
Table of Contents

Advertisement

Section 24 ROM
24.7.2

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 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.
erase control program to RAM
erase control program in RAM
Execute user program/erase control
program (flash memory rewrite)

Figure 24.8 Programming/Erasing Flowchart Example in User Program Mode

24.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 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
Reset-start
No
Program/erase?
Yes
Transfer user program/
Branch to user program/
Branch to flash memory
application program
Branch to flash memory
application program

Advertisement

Table of Contents
loading

Table of Contents