378
Power Control
M
i
t
s
u
M
S
b
i
s
3
M
h
0
I
C
i
m
2
R
i
1
O
c
r
8
C
o
c
o
G
M
m
p
r
P
u
t
u
T
e
r
p
R
s
o
U
S
I
N
G
L
E
-
C
H
I
P
1
6
-
B
I
T
C
M
O
O
E
2.14.3 Wait Mode Set-Up
Figure 2.14.6. Example of wait mode set-up
Settings and operation for entering wait mode are described here.
(1) Enables the interrupt used for returning from wait mode.
(2) Sets the interrupt enable flag (I flag) to “1”.
(3) Clears the protection and changes the content of the system clock control register.
(4) Executes the WAIT instruction.
Operation
Wait mode
(3) Canceling protect
b7
b0
1
Protect register [Address 000A
16
]
PRCR
Enables writing to system clock control registers 0 and 1
(addresses 0006
16
and 0007
16
)
1 : Write-enabled
(4) WAIT instruction
(3) Control of CPU clock
b7
0
0
Note: When switching the system clock, it is necessary
to wait for the oscillation to stabilize.
b7
b0
WAIT peripheral function clock stop bit
0 : Do not stop f
1
, f
8
, f
32
in wait mode
1 : Stop f
1
, f
8
, f
32
in wait mode
Port X
C
select bit
0 : I/O port
1 : X
CIN
-X
COUT
generation
Main clock (X
IN
-X
OUT
) stop bit
0 : On
1 : Off
Main clock division select bit 0
0 : CM16 and CM17 valid
1 : Division by 8 mode
System clock select bit (Note)
0 : X
IN
, X
OUT
1 : X
CIN
, X
COUT
System clock control register 0
[Address 0006
16
] CM0
b0
System clock control register 1
[Address 0007
16
] CM1
0
0
Reserved bit
Must be set to “0”
Main clock division select bit
b7 b6
0 0 : No division mode
0 1 : Division by 2 mode
1 0 : Division by 4 mode
1 1 : Division by 16 mode
Interrupt control register
ADIC
ASIOC
FLDIC
SiTIC(i=0, 1)
SiRIC(i=0, 1)
TAiIC(i=0 to 4)
TBiIC(i=0 to 2)
[Address 004E
16
]
[Address 004F
16
]
[Address 0050
16
]
[Address 0051
16
, 0053
16
]
[Address 0052
16
, 0054
16
]
[Address 0055
16
to 0059
16
]
[Address 005A
16
to 005C
16
]
(1) Setting interrupt to cancel wait mode
Make sure that the interrupt priority
level of the interrupt which is used
to cancel the wait mode is higher
than the processor interrupt priority
(IPL) of the routine where the
WAIT instruction is executed.
Interrupt priority level select bit
b7
b0
INTiIC(i=0 to 2)
INTiIC(i=3 to 5)
[Address 005D
16
to 005F
16
]
[Address 0047
16
to 0049
16
]
Make sure that the interrupt priority level of the
interrupt which is used to cancel the wait mode is
higher than the processor interrupt priority (IPL) of
the routine where the WAIT instruction is executed.
Interrupt priority level select bit
b7
b0
0
Reserved bit
Must be set to “0”
(2) Interrupt enable flag (I flag) “1”