Register Descriptions; Flash Memory Control Register 1 (Flmcr1) - Renesas H8S Series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for H8S Series:
Table of Contents

Advertisement

19.16

Register Descriptions

19.16.1 Flash Memory Control Register 1 (FLMCR1)

Bit
:
7
FWE
Initial value :
1
R/W
:
R
FLMCR1 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, then setting the EV or PV bit. Program mode is entered by setting SWE to 1, then setting the
PSU bit, and finally setting the P bit. Erase mode is entered by setting SWE to 1, then setting the ESU bit, and finally
setting the E bit. FLMCR1 is initialized to H'80 by a reset, and in hardware standby mode and software standby mode.
When on-chip flash memory is disabled, a read will return H'00, and writes are invalid.
Writing to bits ESU, PSU, EV, and PV in FLMCR1 is enabled only when SWE = 1; writing to the E bit is enabled only
when SWE = 1, and ESU = 1; and writing to the P bit is enabled only when SWE = 1, and PSU = 1.
Bit 7—Flash Write Enable Bit (FWE): Sets hardware protection against flash memory programming/erasing. These bits
cannot be modified and are always read as 1 in this model.
Bit 6—Software Write Enable Bit (SWE): Enables or disables flash memory programming and erasing. This bit should
be set when setting bits 5 to 0, EBR1 bits 7 to 0, and EBR2 bits 3 to 0.
When SWE = 1, the flash memory can only be read in program-verify or erase-verify mode.
Bit 6
SWE
0
1
Bit 5—Erase Setup Bit (ESU): Prepares for a transition to erase mode. Do not set the SWE, PSU, EV, PV, E, or P bit at
the same time.
Bit 5
ESU
0
1
Bit 4—Program Setup Bit (PSU): Prepares for a transition to program mode. Do not set the SWE, ESU, EV, PV, E, or P
bit at the same time.
Bit 4
PSU
0
1
6
5
SWE
ESU
0
0
R/W
R/W
Description
Writes disabled
Writes enabled
Description
Erase setup cleared
Erase setup
[Setting condition]
When SWE = 1
Description
Program setup cleared
Program setup
[Setting condition]
When SWE = 1
4
3
2
PSU
EV
PV
0
0
0
R/W
R/W
R/W
1
0
E
P
0
0
R/W
R/W
(Initial value)
(Initial value)
(Initial value)
Rev.6.00 Oct.28.2004 page 627 of 1016
REJ09B0138-0600H

Advertisement

Table of Contents
loading

Table of Contents