|
M16C28 Datasheet, PDF (325/423 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/Tiny SERIES | |||
|
◁ |
M16C/28 Group (M16C/28, M16C/28B)
18. Flash Memory Version
18.4.1 EW Mode 0
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 accept software commands. EW mode 0 is selected by setting the
FMR11 bit in the FMR1 register to â0â.
To set the FMR01 bit to â1â, set to â1â after first writing â0â. The software commands control programming
and erasing. The FMR0 register or the status register indicates whether a programming or erasing opera-
tions 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). After waiting for td(SR-ES) and 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.
18.4.2 EW Mode 1
EW mode 1 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 completed. Read
status register cannot be read in EW mode 1.
When an erase/program command is initiated, the CPU halts all program execution until the command
operation is completed or erase-suspend request is generated.
When enabling an erase-suspend function, set the FMR40 bit to â1â (erase suspend enabled) and ex-
ecute block erase commands. Also, the interrupt to transfer to erase-suspend must be set enabled pre-
liminarily. When entering erase-suspend after td(SR-ES) from an interrupt is requested, interrupts can be
accepted.
When an interrupt request is generated, the FMR41 bit is automatically set to â1â (suspend request) and
an auto-erasing is suspended. If an auto-erasing has not completed (when the FMR00 bit is â0â) after an
interrupt process is completed, set the FMR41 bit to â0â (erase restart) and execute block erase com-
mands again.
Rev. 2.00 Jan. 31, 2007 page 305 of 385
REJ09B0047-0200
|
▷ |