
235
Flash Memory
Chapter 6
Preliminary User’s Manual U17566EE1V2UM00
(1)
SELFEN - Self-programming enable control register
The 8-bit SELFEN register enables the self-programming functions by
software. It is an internal substitute to enabling self-programming by rising the
FLMD0 pin to high level.
Access
This registers can be read/written in 8-bit or 1-bit units.
Writing to this register is protected by a special sequence of instructions.
Please refer to
“SELFENP - Self-programming enable protection register“ on
page 235
for details.
Address
FFFF FCA0
H
Initial Value
00
H
. This register is cleared by any reset.
(2)
SELFENP - Self-programming enable protection register
The 8-bit SELFENP register protects the register SELFEN from inadvertent
write access, so that the system does not stop in case of a program hang-up.
After data has been written to the SELFENP register, the first write access to
register SELFEN is valid. All subsequent write accesses are ignored. Thus, the
value of SELFEN can only be rewritten in a specified sequence, and illegal
write access is inhibited.
Access
This registers can be written in 8-bit units.
Address
FFFF FCA8
H
Initial Value
The contents of this register is undefined.
Caution
In case a high level programming language is used, make sure that the
compiler translates the two write instructions to SELFENP and SELFEN into
two consecutive assembler “store” instructions.
Peripherals and
pin functions
All peripheral functions of the microcontroller continue operation during the
self-programming process. Further the functions of all pins do not change.
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
FLEN
R
R
R
R
R
R
R
R/W
Bit position
Bit name
Function
0
FLEN
Enable self-programming
0: Flash write/erase function is controlled by the
FLMD0 pin
1: Flash write/erase function is enabled
7
6
5
4
3
2
1
0
X
X
X
X
X
X
X
X
W
W
W
W
W
W
W
W
electronic components distributor