English
Language : 

M16C6KA_15 Datasheet, PDF (242/270 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Description
M16C/6KA Group
CPU Reprogram Mode
Program located in ROM
Start
Single-chip mode or boot mode
EW0 mode procedure
Program located in RAM
*1
(Only for boot mode)
Set user ROM area selection bit to "1"
The setting of processor mode register (Note 1)
Set EW0 mode selection bit="1"
(write "0" and then write "1") (Note 2)
Transfer reprogram control program to
on-chip RAM
Jump to the reprogram control program,
which has been transferred to RAM.
(The subsequent processing is executed
by the reprogram control program in RAM.)
*1
To erase and program with S/W command.
Reset with read array command or the
setting of flash memory reset bit (write "0"
and then write "1") (Note 3)
Write "0" to EW0 mode selection bit.
(Only for boot mode)
Write user ROM area selection bit to "0".
(Note 4)
End
Note 1: Set the internal clock frequency as shown below using the main clock division ratio selection bits (bit 6 of address 000616, bit 6 and
bit 7 of address 000716):No exceeding 8MHz if wait bit (bit 7 of address 000516)="1". (with wait for internal accessing.)
Note 2: For writing "1" to the bit, it is necessary to write "0" and "1" in succession. Otherwise the bit will not be "1".
Do not enter interrupt. The write to the bit should be executed other than the flash memory area and MNI pin should be
in "H" state.
Note 3: Be sure to execute a read command or set flash memory reset bit before exiting the CPU reprogram mode after the completion of
earse or program operation.
Note 4: The bit can remain "1". In this case, user ROM area will be accessed.
Fig.BB-2 CPU reprogram mode 0 set/reset flowchart
EW1 mode procedure
Program located in ROM
Start
Single-chip mode (Note 1)
The setting of processor mode register (Note 2)
After setting EW0 mode selection bit ="1",
set EW1 mode selection bit = "1".
(Write "0" and then write "1") (Note 3)
To erase and program with S/W command.
Write "0" to EW0 mode selection bit.
End
Note 1:
Note 2:
Note 3:
Do not set EW1 mode in boot mode.
For CPU reporgram mode, set the internal clock frequency as shown below using the main clock
division ratio selection bits (bit6 of address 000616, bit 6 and bit 7 of address 000716)
Wait bit (bit 7 of address 000516) = "1" (with wait for internal accessing.) and not exceeding 4MHz.
For writing "1" to EW0, EW1 mode selection bits, it is necessary to write "0" and "1" in succession.
Otherwise the bits will not be "1". Do not enter interrupt.
Fig.BB-3 CPU reprogram mode 1 set/reset flowchart
Rev.1.00 Jul 16, 2004 page 240 of 266
REJ03B0100-0100Z