Epson S1C17M20 Technical Manual page 34

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

(1) When the CLGSCLK.WUPMD bit = 0
SYSCLK
(CPU operating clock)
(2) When the CLGSCLK.WUPMD bit = 1 and the CLGSCLK.WUPSRC[1:0] bits = 0x0
SYSCLK
(CPU operating clock)
Clock external output (FOUT)
The FOUT pin can output the clock generated by a clock source or its divided clock to outside the IC. This al-
lows monitoring the oscillation frequency of the oscillator circuit or supplying an operating clock to external
ICs. Follow the procedure shown below to start clock external output.
1. Assign the FOUT function to the port.
2. Configure the following CLGFOUT register bits:
- CLGFOUT.FOUTSRC[1:0] bits
- CLGFOUT.FOUTDIV[2:0] bits
- Set the CLGFOUT.FOUTEN bit to 1.
OSC3 oscillation auto-trimming function
The OSC3 internal oscillator circuit has the auto-trimming function that adjusts the OSC3CLK clock frequency
by trimming the clock with reference to the high precision OSC1CLK clock generated by the OSC1 crystal os-
cillator circuit. Follow the procedure shown below to enable the auto-trimming function.
1. After enabling the OSC1 oscillation, check if the stabilized clock is supplied (CLGINTF.OSC1STAIF bit = 1).
2. After enabling the OSC3 oscillation, check if the stabilized clock is supplied (CLGINTF.OSC3STAIF bit = 1).
3. Write 0x0096 to the MSCPROT.PROT[15:0] bits. (Remove system protection)
4. If the SYSCLK clock source is OSC3, set the CLGSCLK.CLKSRC[1:0] bits to a value other than 0x2
(OSC3).
5. Write 1 to the CLGINTF.OSC3TEDIF bit.
6. Write 1 to the CLGINTE.OSC3TEDIE bit.
7. Write 1 to the CLGOSC3.OSC3STM bit.
8. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
9. The trimmed OSC3CLK can be used if the CLGINTF.OSC3TEDIF bit = 1 after an interrupt occurs.
After the trimming operation has completed, the CLGOSC3.OSC3STM bit automatically reverts to 0. Although
the trimming time depends on the temperature, an average of several 10 ms is required. When OSC3CLK is be-
ing used as the system clock or a peripheral circuit clock, do not use the auto-trimming function.
S1C17M20/M21/M22/M23/M24/M25
TECHNICAL MANUAL (Rev. 1.0)
OSC1CLK
(CPU stop, CLK stop)
Executing the
slp instruction
CLGSCLK.CLKSRC[1:0] = 0x1 (OSC1)
CLGSCLK.WUPSRC[1:0] = 0x1 (OSC1)
OSC1CLK
(CPU stop, CLK stop)
Executing the
slp instruction
CLGSCLK.CLKSRC[1:0] = 0x1 (OSC1)
CLGSCLK.WUPSRC[1:0] = 0x0 (IOSC)
Figure 2.3.4.4 Clock Control Example at SLEEP Cancelation
Seiko Epson Corporation
2 POWER SUPPLY, RESET, AND CLOCKS
Oscillation stabilization waiting time
SLEEP mode
OSC1CLK
(Unstable)
Interrupt
(Wake-up)
∗ Starting up with the same clock as one
that used before SLEEP mode was entered.
SLEEP mode
IOSCCLK
(Unstable)
Interrupt
(Wake-up)
CLGSCLK.CLKSRC[1:0] = 0x0 (IOSC)
CLGSCLK.WUPSRC[1:0] = 0x0 (IOSC)
∗ Switching to IOSC that features fast
initiation allows high-speed processing.
(Refer to the "I/O Ports" chapter.)
(Select clock source)
(Set clock division ratio)
(Enable clock external output)
(Clear interrupt flag)
(Enable interrupt)
(Enable OSC3 oscillation auto-trimming)
OSC1CLK
IOSCCLK
2-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17m25S1c17m21S1c17m22S1c17m23S1c17m24

Table of Contents