
Rev.2.10 Apr 14, 2006 page 372 of 378
REJ09B0124-0210
M16C/6N Group (M16C/6NK, M16C/6NM) 23. Usage Notes
23.19.9 Prohibited Instructions
The following instructions cannot be used in EW0 mode because the CPU tries to read data in flash
memory: the UND instruction, INTO instruction, JMPS instruction, JSRS instruction, and BRK instruction
23.19.10 Interrupts
EW0 Mode
To use interrupts having vectors in a relocatable vector table, the vectors must be relocated to the RAM
area.
_______
• The NMI and watchdog timer interrupts are available since registers FMR0 and FMR1 are forcibly
reset when either interrupt request is generated. Allocate the jump addresses for each interrupt ser-
_______
vice routines to the fixed vector table. Flash memory rewrite operation is suspended when the NMI or
watchdog timer interrupt request is generated. Execute the rewrite program again after exiting the
interrupt routine.
• The address match interrupt is not available since the CPU tries to read data in the flash memory.
EW1 Mode
• Do not acknowledge any interrupts with vectors in the relocatable vector table or address match interrupt
during auto-programming or auto-erasure.
• Do not use the watchdog timer interrupt.
_______
• The NMI interrupt is available since registers FMR0 and FMR1 are forcibly reset when the interrupt
request is generated. Allocate the jump address for the interrupt service routine to the fixed vector table.
_______
Flash memory rewrite operation is suspended when the NMI interrupt request is generated. Execute the
rewrite program again after exiting the interrupt service routine.
23.19.11 How to Access
To set the FMR01, FMR02, or FMR11 bit to 1, write 1 after first setting the bit to 0. Do not generate an
interrupt or a DMA transfer between the instruction to set the bit to 0 and the instruction to set the bit to 1.
_______
Set the bit while an “H” signal is applied to the NMI pin.
23.19.12 Rewriting in User ROM Area
EW0 Mode
If the supply voltage drops while rewriting the block where the rewrite control program is stored, the
flash memory cannot be rewritten because the rewrite control program is not correctly rewritten. If this
error occurs, rewrite the user ROM area while in standard serial I/O mode, parallel I/O mode, or CAN I/
O mode.
EW1 Mode
Avoid rewriting any block in which the rewrite control program is stored.
23.19.13 DMA Transfer
In EW1 mode, do not perform a DMA transfer while the FMR00 bit in the FMR0 register is set to 0 (auto-
programming or auto-erasure).
Comentarios a estos manuales