7. Clock Generation Circuit
page 37
8
2
3
f
o
5
0
2
,
5
1
.
r
a
M
0
.
1
.
v
e
R
0
1
0
-
2
0
2
0
B
9
0
J
E
R
)
T
6
2
/
C
6
1
M
,
A
6
2
/
C
6
1
M
(
p
u
o
r
G
A
6
2
/
C
6
1
M
Figure 7.6. PCLKR Register and PM2 Register
Function
Bit symbol
Bit name
Peripheral clock select register (Note)
Symbol
Address
When reset
PCLKR
025E16
000000112
RW
b7
b6
b5
b4
b3
b2
b1
b0
PCLK0
Timers A, B clock select bit
(Clock source for the
timers A, B, and the dead
timer)
0 : f2
1 : f1
00 0
Reserved bit
Must set to
“0”
Note: Write to this register after setting the PRC0 bit in the PRCR register to “1” (write enable).
00
PCLK1
SI/O clock select bit
(Clock source for UART0
to UART2)
0 : f2SIO
1 : f1SIO
RW
(b4-b2)
Reserved bit
Must set to
“0”
RW
(b7-b6)
RW
PCLK5
Clock output function
expansion select bit
Refer to Table 7.5.3.1 Function
of CLKOUT pin
Function
Bit symbol
Bit name
Processeor mode register 2 (Note 1)
Symbol
Address
When reset
PM2
001E16
XXX000002
RW
b7
b6
b5
b4
b3
b2
b1
b0
PM20
Specifying Wait when
Accessing SFR at PLL
Operation
0 : 2 wait
1 : 1 wait
0
Nothing is assigned. When write, set to “0”. When read,
its content is indeterminate.
PM21
System clock protective bit
0 : Clock is protected by PRCR
register
1 : Clock modification disabled
RW
(b7-b5)
PM22
PM24
(b3)
WDT count source
protective bit
Reserved bit
0 : CPU clock is used for the
watchdog timer count source
1 : On-chip oscillator clock is used
for the watchdog timer count
source
Must set to “0”
P85/NMI configuration bit
RW
(Note 2)
(Note 3,4)
(Note 3,5)
(Note 6,7)
Note 1: Write to this register after setting the PRC1 bit in the PRCR register to “1” (write enable).
Note 2: This bit can only be rewritten while the PLC07 bit is “0” (PLL turned off). Also, set the PM20 bit to “0” (2 wait)
when PLL clock > 16MHz. Note that if the clock source for the CPU clock is to be changed from PLL clock
to another, the PLC07 bit must be set to "0" before setting the PM20 bit.
Note 3: Once this bit is set to “1”, it cannot be cleared to “0” in a program.
Note 4: If the PM21 bit is set to “1”, writing to the following bits has no efftect:
CM02 bit in the CM0 register
CM05 bit in the CM0 register (main clock is not halted)
CM07 bit in the CM0 register (CPU clock source does not change)
CM10 bit in the CM1 register (stop mode is not entered)
CM11 bit in the CM1 register (CPU clock source does not change)
CM20 bit in the CM2 register (oscillation stop, re-oscillation detection function settings do not change)
All bits in the PLC0 register (PLL frequency synthesizer setting do not change)
Be aware that the WAIT instruction cannot be executed when the PM21 bit is set to "1".
Note 5: Setting the PM22 bit to “1” results in the following conditions:
The on-chip oscillator starts oscillating, and the on-chip oscillator clock becomes the watchdog timer count
source.
The CM10 bit in the CM1 register is disabled against write. (Writing a “1” has no effect, nor is stop mode
entered.)
The watchdog timer does not stop when in wait mode.
Note 6: For NMI function, the PM24 bit must be set to “1”(NMI function) in first instruction after rest. Once this bit is
set to “1”, it cannot be cleared to “0” in a program. When the PM24 bit is set to “1”, the P85 direction register
must be “0”(input mode).
Note 7: SD input is valid regardless of the PM24 setting.
0 : P85 function (NMI disable)
1 : NMI function