English
Language : 

M16C80 Datasheet, PDF (222/358 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/80 SERIES
M16C/80 Group
27. Usage Precaution
(4) Use the following procedure to enter stop mode.
• Initial Setting
Set each interrupt priority level after setting the interrupt priority level required to exit stop mode,
controlled by the RLVL2 to RLVL0 bits in the RLVL register, to "7".
• Before Entering Stop Mode
[1] Set the interrupt priority level of the interrupt being used to exit stop mode
[2] Set the interrupt priority levels of the interrupts, not being used to exit stop mode, to "0".
[3] Set the IPL in the FLG register. Then set the exit priority level to the same level as the IPL.
(Interrupt priority level of the interrupt used to exit stop mode > exit priority level
≥ interrupt priority level of the interrupts not used to exit stop mode)
[4] Set the I flag to "1"
[5] Set the CM10 bit in the CM1 register to "1" (all clocks stop) after setting the PRC0 bit in
the PRCR register to "1" (write enabled)
• After Exiting Stop Mode
Set the exit priority level to "7" as soon as exiting stop mode.
(5) When microcomputer enters stop mode again after exiting from stop mode using the NMI interrupt,
use the following procedure to set the CM10 bit to "1".
[1] Exit stop mode using the NMI interrupt
[2] Generate a dummy interrupt
[3] Set the CM10 bit to "1"
Example:
INT
BSET
#63
CM1
; Dummy interrupt
; All clocks stopped (in stop mode)
; /*for dummy interrupt* /
DUMMY:
REIT
(6) Use the following procedure to enter wait mode.
• Initial Setting
Set each interrupt priority level after setting the interrupt priority level required to exit wait mode,
controlled by the RLVL2 to RLVL0 bits in the RLVL register, to "7".
• Before Entering Wait Mode
[1] Set the interrupt priority level of the interrupt being used to exit wait mode
[2] Set the interrupt priority levels of the interrupts, not being used to exit wait mode, to "0".
[3] Set the IPL in the FLG register. Then set the exit priority level to the same level as the IPL.
(Interrupt priority level of the interrupt used to exit wait mode > exit priority level
≥ interrupt priority level of the interrupts not used to exit wait mode)
[4] Set the I flag to "1"
[5] Execute the WAIT instruction
• After Exiting Wait Mode
Set the exit priority level to "7" as soon as exiting wait mode.
Rev.1.00 Aug. 02, 2005 Page 211 of 329
REJ09B0187-0100