2-17
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
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.
(Refer t
o the “I/O Ports” chapte
r.)
2.
Configure the following CLGFOUT register bits:
-
CLGFOUT.FOUTSRC[1:0] bits
(Select clock source)
-
CLGFOUT.FOUTDIV[2:0] bits
(Set clock division ratio)
-
Set the CLGFOUT.FOUTEN bit to 1. (Enable clock external output)
OSC3 oscillation auto-trimming function
The auto-trimming function adjusts the 16MHz OSC3CLK clock frequency selected using the
CLGOSC3.OSC3FQ[1:0] bits by trimming the clock with reference to the high precision OSC1CLK
clock generated by the OSC1 oscillator circuit (crystal oscillator). 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 SYSPROT.PROT[15:0] bits.
(Remove system protection)
4.
Configure the following CLGINTF register bits:
-
Write 1 to the CLGINTF.OSC3TEDIF bit.
(Clear interrupt flag)
-
Write 1 to the CLGINTF.OSC3TERIF bit.
(Clear interrupt flag)
5.
Configure the following CLGINTF register bits:
-
Set the CLGINTE.OSC3TEDIE bit to 1.
(Enable interrupt)
-
Set the CLGINTE.OSC3TERIE bit to 1.
(Enable interrupt)
6.
Write 1 to the CLGOSC3.OSC3STM bit.
(Enable OSC3 oscillation auto-trimming)
7.
Write a value other than 0x0096 to the SYSPROT.PROT[15:0] bits.
(Set system protection)
After the trimming operation has completed, the CLGIOSC.OSC3STM bit automatically reverts to 0.
Although the trimming time depends on the temperature, an average of several 10 ms is required.
OSC1 oscillation stop detection function
The oscillation stop detection function restarts the OSC1 oscillator circuit when it detects oscillation
stop under adverse environments that may stop the oscillation. Follow the procedure shown below to
enable the oscillation stop detection function.
1.
After enabling the OSC1 oscillation, check if the stabilized clock is supplied (CLGINTF.OSC1STAIF
bit = 1).
2.
Write 1 to the CLGINTF.OSC1STPIF bit.
(Clear interrupt flag)
3.
Write 1 to the CLGINTE.OSC1STPIE bit.
(Enable interrupt)
4.
Write 0x0096 to the SYSPROT.PROT[15:0] bits.
(Remove system protection)
5.
Set the following CLGOSC1 register bits:
-
Set the CLGOSC1.OSDRB bit to 1.
(Enable OSC1 restart function)
-
Set the CLGOSC1.OSDEN bit to 1.
(Enable oscillation stop detection function)
6.
Write a value other than 0x0096 to the SYSPROT.PROT[15:0] bits. (Set system protection)
7.
The OSC1 oscillation stops if the CLGINTF.OSC1STPIF bit = 1 after an interrupt occurs.
If the CLGOSC1.OSDRB bit = 1, the hardware restarts the OSC1 oscillator circuit.
Note:
Enabling the oscillation stop detection function increase the oscillation stop detector current (I
OSD1
).
Summary of Contents for S1C31D50
Page 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Page 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Page 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Page 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...