
R8C/10 Group
Rev.1.20 Jan 27, 2006 page 148 of 180
REJ09B0019-0120
Figure 17.7 Setting and Resetting of EW1 Mode
S
e
t
C
M
0
a
n
d
C
M
1
r
e
g
i
s
t
e
r
s
(1
)
S
e
t
t
h
e
F
M
R
0
1
b
i
t
b
y
w
r
i
t
i
n
g
“
0
”
a
n
d
t
h
e
n
“
1
”
(
C
P
U
r
e
w
r
i
t
e
m
o
d
e
e
n
a
b
l
e
d
)
(2
)
S
e
t
t
h
e
F
M
R
1
1
b
i
t
b
y
w
r
i
t
i
n
g
“
0
”
a
n
d
t
h
e
n
“
1
”
(
E
W
1
m
o
d
e
)
P
r
o
g
r
a
m
i
n
R
O
M
E
W
1
m
o
d
e
o
p
e
r
a
t
i
o
n
p
r
o
c
e
d
u
r
e
E
x
e
c
u
t
e
s
o
f
t
w
a
r
e
c
o
m
m
a
n
d
s
W
r
i
t
e
“
0
”
t
o
t
h
e
F
M
R
0
1
b
i
t
(
C
P
U
r
e
w
r
i
t
e
m
o
d
e
d
i
s
a
b
l
e
d
)
N
O
T
E
S
:
1
.
S
e
l
e
c
t
5
M
H
z
o
r
l
e
s
s
f
o
r
C
P
U
c
l
o
c
k
u
s
i
n
g
t
h
e
C
M
0
6
b
i
t
i
n
t
h
e
C
M
0
r
e
g
i
s
t
e
r
a
n
d
t
h
e
C
M
1
7
t
o
C
M
1
6
b
i
t
s
i
n
t
h
e
C
M
1
r
e
g
i
s
t
e
r
.
2
.
T
o
s
e
t
t
h
e
F
M
R
0
1
b
i
t
t
o
“
1
”
,
w
r
i
t
e
“
0
”
a
n
d
t
h
e
n
“
1
”
i
n
s
u
c
c
e
s
s
i
o
n
.
M
a
k
e
s
u
r
e
n
o
i
n
t
e
r
r
u
p
t
s
w
i
l
l
o
c
c
u
r
b
e
f
o
r
e
w
r
i
t
i
n
g
“
1
”
a
f
t
e
r
w
r
i
t
i
n
g
“
0
”
.
Execute the Read Array command
(3)
S
e
t
C
M
0
a
n
d
C
M
1
r
e
g
i
s
t
e
r
s
(
1
)
E
x
e
c
u
t
e
s
o
f
t
w
a
r
e
c
o
m
m
a
n
d
s
J
u
m
p
t
o
t
h
e
r
e
w
r
i
t
e
c
o
n
t
r
o
l
p
r
o
g
r
a
m
w
h
i
c
h
h
a
s
b
e
e
n
t
r
a
n
s
f
e
r
r
e
d
t
o
a
n
y
a
r
e
a
o
t
h
e
r
t
h
a
n
t
h
e
f
l
a
s
h
m
e
m
o
r
y
(
T
h
e
s
u
b
s
e
q
u
e
n
t
p
r
o
c
e
s
s
i
n
g
i
s
e
x
e
c
u
t
e
d
b
y
t
h
e
r
e
w
r
i
t
e
c
o
n
t
r
o
l
p
r
o
g
r
a
m
i
n
a
n
y
a
r
e
a
o
t
h
e
r
t
h
a
n
t
h
e
f
l
a
s
h
m
e
m
o
r
y
)
Transfer a CPU rewrite mode based rewrite control
program to any area other than the flash memory
W
r
i
t
e
“
0
”
t
o
t
h
e
F
M
R
0
1
b
i
t
(
C
P
U
r
e
w
r
i
t
e
m
o
d
e
d
i
s
a
b
l
e
d
)
S
e
t
t
h
e
F
M
R
0
1
b
i
t
b
y
w
r
i
t
i
n
g
“
0
”
a
n
d
t
h
e
n
“
1
”
(
C
P
U
r
e
w
r
i
t
e
m
o
d
e
e
n
a
b
l
e
d
)
(2
)
EW0 mode operation procedure
R
e
w
r
i
t
e
c
o
n
t
r
o
l
p
r
o
g
r
a
m
Jump to a specified address in the flash memory
N
O
T
E
S
:
1
.
S
e
l
e
c
t
5
M
H
z
o
r
l
e
s
s
f
o
r
C
P
U
c
l
o
c
k
u
s
i
n
g
t
h
e
C
M
0
6
b
i
t
i
n
t
h
e
C
M
0
r
e
g
i
s
t
e
r
a
n
d
t
h
e
C
M
1
7
t
o
C
M
1
6
b
i
t
s
i
n
t
h
e
C
M
1
r
e
g
i
s
t
e
r
.
2
.
T
o
s
e
t
t
h
e
F
M
R
0
1
b
i
t
t
o
“
1
”
,
w
r
i
t
e
“
0
”
a
n
d
t
h
e
n
“
1
”
i
n
s
u
c
c
e
s
s
i
o
n
.
M
a
k
e
s
u
r
e
n
o
i
n
t
e
r
r
u
p
t
s
w
i
l
l
o
c
c
u
r
b
e
f
o
r
e
w
r
i
t
i
n
g
“
1
”
a
f
t
e
r
w
r
i
t
i
n
g
“
0
”
.
W
r
i
t
e
t
o
t
h
e
F
M
R
0
1
b
i
t
f
r
o
m
a
p
r
o
g
r
a
m
i
n
o
t
h
e
r
t
h
a
n
t
h
e
f
l
a
s
h
m
e
m
o
r
y
.
3
.
D
i
s
a
b
l
e
s
t
h
e
C
P
U
r
e
w
r
i
t
e
m
o
d
e
a
f
t
e
r
e
x
e
c
u
t
i
n
g
t
h
e
R
e
a
d
A
r
r
a
y
c
o
m
m
a
n
d
.
Figure 17.6 Setting and Resetting of EW0 Mode
Figures 17.6 and 17.7 show the setting and resetting of EW0 mode and EW1 mode, respectively.
17.4 CPU Rewrite Mode
During Erase
Erase
Starts
FMR00
FMR46
Erase
Suspends
Erase
Starts
Check that the FMR00 bit is
set to “0”, and that the erase
operation has not ended.
Check the status,
and that the program
ends normally.
Erase
Ends
During Erase
Figures 17.5 shows the timing on suspend operation.
Figure 17.5 Timing on Suspend Operation
Komentarze do niniejszej Instrukcji