7 CLOCK GENERATOR (CLG)
S1C17651 TECHNICAL MANUAL
Seiko Epson Corporation
7-7
System Clock Switching
7.4
The figure below shows the system clock selector.
System clock
OSC3B
OSC3A
OSC1
CLKSRC[1:0]
4.1 System Clock Selector
Figure 7.
The S1C17651 has three system clock sources (OSC3B, OSC3A, and OSC1) and it start operating with the OSC3B
clock after an initial reset. The system clock can be switched to the OSC3A clock when a high-speed clock is re-
quired for the processing, or to the OSC1 clock for power saving. Use CLKSRC[1:0]/CLG_SRC register for this
switching. Oscillator circuits other than those selected as the system clock source and not used for running periph-
eral circuits can be shut down to reduce current consumption.
4.1 System Clock Selection
Table 7.
CLKSRC[1:0]
System clock source
0x3
Reserved
0x2
OSC3A
0x1
OSC1
0x0
OSC3B
(Default: 0x0)
The following shows system clock switching procedures:
Switching the system clock to OSC3A from OSC3B or OSC1
1. Set the OSC3A oscillation stabilization wait time if necessary. (OSC3AWT[1:0])
2. Turn the OSC3A oscillator on if it is off. (OSC3AEN = 1)
3. Select the OSC3A clock as the system clock. (CLKSRC[1:0] = 0x2)
4. Turn the OSC3B or OSC1 oscillator off if peripheral modules and FOUTA/B output circuits have not used
the OSC3B or OSC1 clock.
Switching the system clock to OSC1 from OSC3B or OSC3A
1. Set the OSC1A or OSC1B oscillation stabilization wait time if necessary. (OSC1AWT[1:0]/OSC1BWT[1:0])
2. Turn the OSC1 oscillator on if it is off. (OSC1EN = 1)
3. Select the OSC1 clock as the system clock. (CLKSRC[1:0] = 0x1)
4. Turn the OSC3B or OSC3A oscillator off if peripheral modules and FOUTA/B output circuits have not used
the OSC3B or OSC3A clock.
Switching the system clock to OSC3B from OSC3A or OSC1
1. Set the OSC3B oscillation stabilization wait time if necessary. (OSC3BWT[1:0])
2. Turn the OSC3B oscillator on if it is off. (OSC3BEN = 1)
3. Select the OSC3B clock as the system clock. (CLKSRC[1:0] = 0x0)
4. Turn the OSC3A or OSC1 oscillator off if peripheral modules and FOUTA/B output circuits have not used
the OSC3A or OSC1 clock.
Notes: The oscillator to be used as the system clock source must be operated before switching
the system clock. Otherwise, the CLG will not switch the system clock source, even if CLK-
SRC[1:0] is written to, and the CLKSRC[1:0] value will remain unchanged.
The table below lists the combinations of clock operating status and register settings enabling
system clock selection.
4.2 System Clock Switching Conditions
Table 7.
OSC3BEN
OSC3AEN
OSC1EN
System clock
1
OSC3B, OSC3A, or OSC1
1
0
OSC3B or OSC3A
1
0
1
OSC3B or OSC1
0
1
OSC3A or OSC1
The oscillator circuit selected as the system clock source cannot be turned off.