English
Language : 

M16C6S_09 Datasheet, PDF (174/208 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
M16C/6S Group
Flash Memory Version
Clear Status Register Command (5016)
This command clears the status register to “0”.
Write ‘xx5016’ in the first bus cycle, and the FMR06 to FMR07 bits in the FMR0 register and SR4 to
SR5 in the status register will be cleared to “0”.
Program Command (4016)
This command writes data to the flash memory in 1 word (2 byte) units.
Write ‘xx4016’ in the first bus cycle and write data to the write address in the second bus cycle, and an
auto program operation (data program and verify) will start. Make sure the address value specified in
the first bus cycle is the same even address as the write address specified in the second bus cycle.
Check the FMR00 bit in the FMR0 register to see if auto programming has finished. The FMR00 bit is
“0” during auto programming and set to “1” when auto programming is completed.
Check the FMR06 bit in the FMR0 register after auto programming has finished, and the result of auto
programming can be known. (Refer to “Full Status Check.”)
Writing over already programmed addresses is inhibited.
Moreover, when FMR02 bit of FMR0 register is “0” (rewriting is disable), the program command to
block 0 and block 1 is not received. Just behind a program command, when you execute commands
other than a program command, please make it the address value which was specified by the 2nd bus
cycle of a program command and which writes in and specifies the same address as an address by
the 1st bus cycle of the following command.
In EW1 mode, do not execute this command on any address at which the rewrite control program is
located.
In EW0 mode, the microcomputer goes to read status register mode at the same time auto program-
ming starts, making it possible to read the status register. The status register bit 7 (SR7) is cleared to
“0” at the same time auto programming starts, and set back to “1” when auto programming finishes. In
this case, the microcomputer remains in read status register mode until a read command is written
next. The result of auto programming can be known by reading the status register after auto program-
ming has finished.
Start
Write the command code ‘xx4016’
to the write address
Write data to the write address
NO
FMR00=1?
YES
Full status check
Program
completed
Note: Write the command code and data at even number.
Figure 1.21.4. Program Command
Rev.5.01 Dec 10, 2009 page 174 of 201
REJ03B0014-0501