System Clock Switching - Epson S1C17001 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

7.4 System Clock Switching

The software can be used to select the OSC3 or OSC1 clocks as the system clock. If possible, you can reduce pow-
er consumption by stopping OSC3 oscillation after switching the system clock to OSC1.
The procedure is given below.
OSC3 to OSC1
1. If OSC1 oscillation is stopped, start oscillation by setting OSC1EN (D1/OSC_CTL register) to 1.
∗ OSC1EN: OSC1 Enable Bit in the Oscillation Control (OSC_CTL) Register (D1/0x5061)
2. Set CLKSRC (D0/OSC_SRC register) to 1 and switch the system clock from OSC3 to OSC1.
∗ CLKSRC: System Clock Source Select Bit in the Clock Source Select (OSC_SRC) Register (D0/0x5060)
3. If operation is not required for peripheral modules using OSC3 as an oscillation source, set OSC3EN (D0/
OSC_CTL register) to 0 to stop OSC3 oscillation.
∗ OSC3EN: OSC3 Enable Bit in the Oscillation Control (OSC_CTL) Register (D0/0x5061)
Note: • Switching the system clock from OSC3 to OSC1 immediately after starting OSC1 oscillation
will stop the system clock until the OSC1 clock starts up (for the OSC1 clock 256-cycle pe-
riod).
• OSC3 oscillation cannot be stopped before switching the system clock to OSC1.
OSC1 to OSC3
1. Set the OSC3WT[1:0] (D[5:4]/OSC_CTL register) to an oscillation stabilization wait time (see Table 7.2.2)
at least as long as OSC3 oscillation start time. (Not necessary if already set.)
∗ OSC3WT[1:0]: OSC3 Wait Cycle Select Bits in the Oscillation Control (OSC_CTL) Register (D[5:4]/0x5061)
2. If the OSC3 oscillation is stopped, set OSC3EN (D0/OSC_CTL register) to 1 to start oscillation. After start-
ing OSC3 oscillation, the OSC3 clock is not fed until the time set in OSC3WT[1:0] (D[5:4]/OSC_CTL regis-
ter) has elapsed.
3. Set CLKSRC (D0/OSC_SRC register) to 0 to switch the system clock from OSC1 to OSC3.
4. If operation is not required for peripheral modules using OSC1 as an oscillation source, set OSC1EN (D1/
OSC_CTL register) to 0 to stop OSC1 oscillation.
Note: • Steps 1 and 2 are not required if the OSC3 oscillation circuit is already operating.
• The OSC3 oscillation start time depends on the oscillator and externally connected compo-
nents. The time should be set with an adequate oscillation stabilization wait time. Refer to
the typical oscillation start times specified in "24 Electrical Characteristics."
• OSC1 oscillation cannot be stopped before switching the system clock to OSC3.
S1C17001 TECHNICAL MANUAL
EPSON
7 OSCILLATOR CIRCUIT (OSC)
59

Advertisement

Table of Contents
loading

Table of Contents