Ew0 Mode; Ew1 Mode - Renesas M16C/26A Series Hardware Manual

16-bit single-chip microcomputer m16c family / m16c/tiny series
Hide thumbs Also See for M16C/26A Series:
Table of Contents

Advertisement

M
1
6
C
2 /
6
A
G
o r
u
p
(
M
1
6

17.4.1 EW0 Mode

The microcomputer enters CPU rewrite mode by setting the FMR01 bit in the FMR0 register to "1" (CPU
rewrite mode enabled) and is ready to acknowledge the software commands. EW0 mode is selected by
setting the FMR11 bit in the FMR1 register to "0".
When setting the FMR01 bit to "1", set to "1" after first writing "0". The software commands control pro-
gramming and erasing. The FMR0 register or the status register indicates whether a programming or
erasing operations is completed.
When entering the erase-suspend during the auto-erasing, set the FMR40 bit to "1" (erase-suspend
enabled) and the FMR41 bit to "1" (suspend request). And wait for td(SR-ES). After verifying the FMR46
bit is set to "1" (auto-erase stop), access to the user ROM area. When setting the FMR41 bit to "0" (erase
restart), auto-erasing is restarted.

17.4.2 EW1 Mode

EW1 mode is selected by setting the FMR11 bit to "1" after the FMR01 bit is set to "1". (set to "1" after first
writing "0"). The FMR0 register indicates whether or not a programming or an erasing operation is com-
pleted. Do not execute the software commands of read status register in EW1 mode.
When an erase/program operation is initiated the CPU halts all program execution until the operation is
completed or erase-suspend is requested.
When enabling an erase suspend function, set the FMR40 bit to "1" (erase suspend enabled) and ex-
ecute block erase commands. Also, preliminarily set an interrupt to enter the erase-suspend to an inter-
rupt enabled status. After td(SR-ES) from an interrupt request and entering erase suspend, an interrupt
can be acknowledged.
When an interrupt request is generated, the FMR41 bit is automatically set to "1" (suspend request) and
an auto-erasing is halted. If an auto-erasing is not completed (the FMR00 bit is "0") after an interrupt
process completed, set the FMR41 bit to "0" (erase restart) and execute block erase commands again.
R
e
. v
2
0 .
0
F
e
b
1 .
, 5
2
0
0
7
R
E
J
0
9
B
0
2
0
2
0 -
2
0
0
C
2 /
6
, A
M
1
6
C
2 /
6
, B
M
1
6
page 238
f o
3
2
9
C
2 /
6
) T
17. Flash Memory Version

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/26aM16c/26bM16c/26t

Table of Contents