
iiiPeriPheraLModuLes1(systeM):CLoCkManageMentunit(CMu)
iii-1-30
ePson
s1C33L17teChniCaLManuaL
iii.1.12.5ChangingtheClocksourcefromosC1toPLL
1. Clock Control Protect Register (0x301B24) = 0x96
Disable write protection of the clock control registers.
2. SOSC3 (D1/0x301B08) = 1
Turn on the OSC3 oscillator circuit if turned off.
3. Wait until OSC3 oscillation stabilizes (only when OSC3 has been turned on; e.g., 25 ms in the S1C33L17). For
details about the OSC3 oscillation start time, see “Electrical Characteristics.”
4. PLLPOWR (D0/0x301B0C) = 0
Turn off the PLL.
5. Setting PLL Control Register (0x301B0C)
PLLN[3:0] (D[7:4]) = 0b0000–0b1111
Set the frequency multiplication rate of the PLL (x1 to x16).
PLLV[1:0] (D[3:2]) = 0b01–0b11
Set the W value of the PLL (2, 4 or 8).
PLLVC[3:0] (D[15:12]) = 0b0001–0b1000
Set the VCO Kv circuit constant.
PLLRS[3:0] (D[11:8]) = 0b1000 or 0b1010
Set the LPF resistance value.
6. PLLPOWR (D0/0x301B0C) = 1
Turn on the PLL.
7. OSCSEL[1:0] (D[3:2]/0x301B08) = 0b11
Select PLL for the clock source.
8. Setting the Clock Option Register (0x301B14)
OSCTM[7:0] (D[15:8]) =
Set appropriate values so that the wait timer exceeds the stabilization time
OSC3OFF (D3) = 0
of the PLL output clock (e.g. 200 s in the S1C33L17). Be aware that the
TMHSP (D2) =
wait timer operates with the PLL clock. For details about the PLL output
WAKEUPWT (D0) = 0
stabilization time, see “Electrical Characteristics.”
This setting causes the CPU to automatically exit SLEEP mode and restart after the set time has passed
without waiting for an interrupt.
9. Stop any peripheral circuits that are operating, except the RTC.
10. Execute the slp instruction.
The chip enters SLEEP mode and the CMU temporarily stops clock output. The CPU automatically reawakens
from SLEEP mode after the set time has passed from execution of the slp instruction, and restarts using the
PLL as the clock source.
11. Newly setting the clock control registers again
Newly alter the MCLK or CMU_CLK settings, and set other clock control registers again, as required.
12. Clock Control Protect Register (0x301B24) = other than 0x96
Reenable write protection of the clock control registers.