Flash Memory Register Descriptions; Flash Memory Control Register (Flmcr) - Hitachi H8/3062 Hardware Manual

Single-chip microcomputer
Hide thumbs Also See for H8/3062:
Table of Contents

Advertisement

17.3

Flash Memory Register Descriptions

17.3.1

Flash Memory Control Register (FLMCR)

FLMCR is an 8-bit register used for flash memory operating mode control. Program-verify mode
or erase-verify mode is entered by setting SWE to 1 when FWE = 1, then setting the
corresponding bit. Program mode is entered by setting SWE to 1 when FWE = 1, then setting the
PSU bit, and finally setting the P bit. Erase mode is entered by setting SWE to 1 when FWE = 1,
then setting the ESU bit, and finally setting the E bit. FLMCR is initialized by a reset, and in
hardware standby mode and software standby mode. Its initial value is H'80 when a high level is
input to the FWE pin, and H'00 when a low level is input. In mode 6 the FWE pin must be fixed
low, as flash memory on-board programming is not supported. Therefore, bits in this register
cannot be set to 1 in mode 6. When on-chip flash memory is disabled, a read will return H'00, and
writes are invalid. When setting bits 6 to 0 in this register to 1, each bit should be set individually.
Writes to bits ESU, PSU, EV, and PV in FLMCR are enabled only when FWE = 1 and SWE = 1;
writes to the E bit only when FWE = 1, SWE = 1, and ESU = 1; and writes to the P bit only when
FWE = 1, SWE = 1, and PSU = 1.
Bit
Modes 1
Initial value
to 4, and 6
Read/Write
Modes 5
Initial value
and 7
Read/Write
7
6
5
FWE
SWE
ESU
0
0
0
R
R
R
1/0
0
0
R
R/W
R/W
Erase setup
Prepares for a transition to erase mode
Software write enable
Enables or disables programming/erasing
Flash write enable
Sets hardware protection against flash memory programming/erasing
4
3
2
PSU
EV
PV
0
0
0
R
R
R
0
0
0
R/W
R/W
R/W
Program-verify mode
Selects program-verify mode
transition or clearing
Erase-verify mode
Selects erase-verify mode transition or clearing
Program setup
Prepares for a transition to program mode
1
0
E
P
0
0
R
R
0
0
R/W
R/W
Program mode
Selects program
mode transition
or clearing
Erase mode
Selects erase mode
transition or clearing
479

Advertisement

Table of Contents
loading

Table of Contents