2 POWER SUPPLY, RESET, AND CLOCKS
S1C17M12/M13 TECHNICAL MANUAL
Seiko Epson Corporation
2-7
(Rev. 1.2)
To avoid malfunctions of the internal circuits due to an unstable clock during this period, the oscillator circuit
includes an oscillation stabilization waiting circuit that can disable supplying the clock to the system until the
designated time has elapsed. Figure 2.3.4.1 shows the relationship between the oscillation start time and the os-
cillation stabilization waiting time.
Oscillator circuit enable
(
∗
OSC
∗
EN)
Oscillation waveform
Digitized oscillation waveform
Oscillator circuit output clock
(
∗
OSC
∗
CLK)
Oscillation stabilization waiting completion flag
(
∗
OSC
∗
STAIF)
System supply waiting time
Oscillation start time
Oscillation stabilization waiting time
Figure 2.3.4.1 Oscillation Start Time and Oscillation Stabilization Waiting Time
The oscillation stabilization waiting time for the IOSC oscillator circuit is fixed at 16 IOSCCLK clocks. The
oscillation stabilization waiting time for the OSC3 oscillator circuit can be set using the CLGOSC3.OSC-
3WT[2:0] bits. It should be set to 1,024 OSC3CLK clocks or more when crystal/ceramic oscillator is selected,
or four OSC3CLK clocks or more when internal oscillator is selected. To check whether the oscillation stabi-
lization waiting time is set properly and the clock is stabilized immediately after the oscillation starts or not,
monitor the oscillation clock using the FOUT output function.
When the oscillation stabilization waiting operation has completed, the oscillator circuit sets the oscillation sta-
bilization waiting completion flag and starts clock supply to the internal circuits.
Note: The oscillation stabilization waiting time is always expended at start of oscillation even if the os-
cillation stabilization waiting completion flag has not be cleared to 0.
Oscillation start procedure for the IOSC oscillator circuit
Follow the procedure shown below to start oscillation of the IOSC oscillator circuit.
1. Write 1 to the CLGINTF.IOSCSTAIF bit.
(Clear interrupt flag)
2. Write 1 to the CLGINTE.IOSCSTAIE bit.
(Enable interrupt)
3. Write 1 to the CLGOSC.IOSCEN bit.
(Start oscillation)
4. IOSCCLK can be used if the CLGINTF.IOSCSTAIF bit = 1 after an interrupt occurs.
Oscillation start procedure for the OSC3 oscillator circuit
Follow the procedure shown below to start oscillation of the OSC3 oscillator circuit.
1. Write 1 to the CLGINTF.OSC3STAIF bit.
(Clear interrupt flag)
2. Write 1 to the CLGINTE.OSC3STAIE bit.
(Enable interrupt)
3. Write 0x0096 to the MSCPROT.PROT[15:0] bits. (Remove system protection)
4. Configure the following CLGOSC3 register bits:
- CLGOSC3.OSC3MD[1:0] bits
(Select oscillator type)
- CLGOSC3.OSC3WT[2:0] bits
(Set oscillation stabilization waiting time)
In addition to the above, configure the following bits when using the crystal/ceramic oscillator:
- CLGOSC3.OSC3INV[1:0] bits
(Set oscillation inverter gain)
Configure the following bits when using the internal oscillator:
- CLGOSC3.OSC3FQ[1:0] bits
(Select oscillation frequency)
5. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
6. When using the crystal/ceramic oscillator, assign the OSC3 oscillator input/output functions to the ports.
(Refer to the “I/O Ports” chapter.)
7. Write 1 to the CLGOSC.OSC3EN bit.
(Start oscillation)
8. OSC3CLK can be used if the CLGINTF.OSC3STAIF bit = 1 after an interrupt occurs.