Program Command (40 ) - Renesas M16C/29 Series User Manual

Hide thumbs Also See for M16C/29 Series:
Table of Contents

Advertisement

M
1
6
C
2 /
9
G
o r
u
p
20.7.4 Program Command (40
The program command writes 2-byte data to the flash memory.
Auto program operation (data program and verify) start by writing xx40
the write address specified in the second bus cycle. The address value specified in the first bus cycle
must be the same even address as the write address secified in the second bus cycle.
The FMR00 bit in the FMR0 register indicates whether an auto-programming operation has been com-
pleted. The FMR00 bit is set to 0 during the auto-program and 1 when the auto-program operation is
completed.
After the completion of auto-program operation, the FMR06 bit in the FMR0 register indicates whether or
not the auto-program operation has been successfully completed. (Refer to 20.8.4 Full Status Check).
Also, each block can disable programming command (Refer to Table 20.4).
An address that is already written cannot be altered or rewritten.
When commands other than the program command are executed immediately after executing the pro-
gram command, set the same address as the write address specified in the second bus cycle of the
program command, to the specified address value in the first bus cycle of the following command.
In EW mode 1, do not execute this command on the blocks where the rewrite control program is allo-
cated.
In EW mode 0, the MCU enters read status register mode as soon as the auto-program operation starts
and the status register can be read. The SR7 bit in the status register is set to 0 as soon as the auto-
program operation starts. This bit is set to 1 when the auto-program operation is completed. The MCU
remains in read status register mode until the read array command is written. After completion of the
auto-program operation, the status register indicates whether or not the auto-program operation has
been successfully completed.
Figure 20.11 Flow Chart of Program Command
R
e
. v
1
1 .
2
M
r a
3 .
, 0
2
0
0
7
R
E
J
0
9
B
0
1
0
1
0 -
1
1
2
)
16
Write command code xx40
Write data to the write address
NOTES:
1. Write the command code and data at even address.
2. Refer to Figure 20.14.
page 348
f o
4
5
8
Start
to the
16
(1)
write address
(1)
NO
FMR00=1?
YES
(2)
Full status check
Program completed
20. Flash Memory Version
in the first bus cycle and data to
16

Advertisement

Table of Contents
loading

Table of Contents