Most designers are familiar with oscillators (Pierce-Gate topology), but few really
understand how they operate, let alone how to properly design an oscillator. In practice,
most designers do not even really pay attention to the oscillator design until they realize the
oscillator does not operate properly (usually when it is already being produced). This should
not happen. Many systems or projects are delayed in their deployment because of a crystal
not working as intended. The oscillator should receive its proper amount of attention during
the design phase, well before the manufacturing phase. The designer would then avoid the
nightmare scenario of products being returned.
This application note introduces the Pierce oscillator basics and provides some guidelines
for a good oscillator design. It also shows how to determine the different external
components and provides guidelines for a good PCB for the oscillator.
This document finally contains an easy guideline to select suitable crystals and external
components, and it lists some recommended crystals (HSE and LSE) for STM32F1 and
STM8A/Smicrocontrollers in order to quick start development. Refer to Ta bl e 1 for the list of
applicable products.
A quartz crystal is a piezoelectric device transforming electric energy to mechanical energy
and vice versa. The transformation occurs at the resonant frequency. The quartz crystal can
be modeled as follows:
Figure 1.Quartz crystal model
C
: represents the shunt capacitance resulting from the capacitor formed by the electrodes
0
L
: (motional inductance) represents the vibrating mass of the crystal
m
C
: (motional capacitance) represents the elasticity of the crystal
m
R
: (motional resistance) represents the circuit losses
m
The impedance of the crystal is given by the following equation (assuming that R
negligible):
is
m
(1)
Figure 2 represents the impedance in the frequency domain.
Figure 2.Impedance representation in the frequency domain
Impedance
Area of parallel
Inductive behavior:
the quartz oscillates
Capacitive behavior:
no oscillation
Phase (deg)
+90
–90
resonance: Fp
F
s
F
a
Frequency
Frequency
ai15834
6/24Doc ID 15287 Rev 6
AN2867Quartz crystal properties and model
F
s
1
2π LmC
m
----------------------------- -
=
F
a
Fs1
C
m
C
0
---------
+=
F
p
Fs1
C
m
2C0C
L
+()
------------------------------
+
⎝⎠
⎜⎟
⎛⎞
=
F
s
7988768 H z=
F
a
8008102 H z=
F
p
7995695 H z=
Fs is the series resonant frequency when the impedance Z = 0. Its expression can be
deduced from equation (1) as follows:
(2)
F
is the anti-resonant frequency when impedance Z tends to infinity. Using equation (1), it is
a
expressed as follows:
(3)
The region delimited by F
and Fa is usually called the area of parallel resonance (shaded
s
area in Figure 2). In this region, the crystal operates in parallel resonance and behaves as
an inductance that adds an additional phase equal to 180 ° in the loop. Its frequency F
F
: load frequency) has the following expression:
L
p
(or
(4)
From equation (4), it appears that the oscillation frequency of the crystal can be tuned by
varying the load capacitor C
the exact C
required to make the crystal oscillate at the nominal frequency.
L
. This is why in their datasheets, crystal manufacturers indicate
L
Ta bl e 2 gives an example of equivalent crystal circuit component values to have a nominal
frequency of 8 MHz.
Table 2.Example of equivalent circuit parameters
Equivalent componentValue
R
m
L
m
C
m
C
0
8 Ω
14.7 mH
0.027 pF
5.57 pF
Using equations (2), (3) and (4) we can determine Fs, Fa and Fp of this crystal:
and .
If the load capacitance C
at the crystal electrodes is equal to 10 pF, the crystal will oscillate
L
at the following frequency: .
To have an oscillation frequency of exactly 8 MHz, C
Doc ID 15287 Rev 67/24
should be equal to 4.02 pF.
L
Oscillator theoryAN2867
Passive feedback element
A(f)
Active element
B(f)
ai15835
Af() Af() e
jfα f()
⋅=
Bf() Bf() e
jfβ f()
⋅=
Af() Bf()⋅1≥
α f() βf()+2π=
Af() Bf()⋅1»
2 Oscillator theory
An oscillator consists of an amplifier and a feedback network to provide frequency selection.
Figure 3 shows the block diagram of the basic principle.
Figure 3.Oscillator principle
Where:
●A(f) is the complex transfer function of the amplifier that provides energy to keep the
oscillator oscillating.
●B(f) is the complex transfer function of the feedback that sets the oscillator frequency.
To oscillate, the following Barkhausen conditions must be fulfilled. The closed-loop gain
should be greater than 1 and the total phase shift of 360 ° is to be provided:
and
The oscillator needs initial electric energy to start up. Power-up transients and noise can
supply the needed energy. However, the energy level should be high enough to trigger
oscillation at the required frequency. Mathematically, this is represented by |,
which means that the open-loop gain should be much higher than 1. The time required for
the oscillations to become steady depends on the open-loop gain.
Meeting the oscillation conditions is not enough to explain why a crystal oscillator starts to
oscillate. Under these conditions, the amplifier is very unstable, any disturbance introduced
in this positive feedback loop system makes the amplifier unstable and causes oscillations
to start. This may be due to power-on, a disable-to enable sequence, the thermal noise of
the crystal, etc. It is also important to note that only noise within the range of serial-to
parallel frequency can be amplified. This represents but a little amount of energy, which is
why crystal oscillators are so long to start up.
8/24Doc ID 15287 Rev 6
AN2867Pierce oscillator
R
Ext
R
F
Q
C
L1
C
L2
Microcontroller
Inv
C
s
ai15836
OSC_OUTOSC_IN
3 Pierce oscillator
Pierce oscillators are commonly used in applications because of their low consumption, low
cost and stability.
Figure 4.Pierce oscillator circuitry
Inv: the internal inverter that works as an amplifier
Q: crystal quartz or a ceramic resonator
R
: internal feedback resistor
F
R
: external resistor to limit the inverter output current
Ext
C
and CL2: are the two external load capacitors
L1
C
: stray capacitance is the addition of the MCU pin capacitance (OSC_IN and OSC_OUT)
s
and the PCB capacitance: it is a parasitical capacitance.
Doc ID 15287 Rev 69/24
Pierce oscillator designAN2867
4 Pierce oscillator design
This section describes the different parameters and how to determine their values in order
to be more conversant with the Pierce oscillator design.
4.1 Feedback resistor R
In most of the cases in ST microcontrollers, RF is embedded in the oscillator circuitry. Its role
is to make the inverter act as an amplifier. The feedback resistor is connected between V
and V
(shaded area in Figure 5). The amplifier amplifies the noise (for example, the thermal noise
of the crystal) within the range of serial to parallel frequency (F
oscillations to start up. In some cases, if R
the oscillator continues to operate normally.
Figure 5.Inverter transfer function
so as to bias the amplifier at V
out
V
out
V
DD
F
Saturation
region
= Vin and force it to operate in the linear region
out
, Fa). This noise causes the
is removed after the oscillations have stabilized,
F
Linear area: the inverter acts as an amplifier
Saturation
region
~V
/2
DD
a
V
DD
in
V
ai15837
in
Ta bl e 3 provides typical values of R
Table 3.Typical feedback resistor values for given frequencies
.
F
FrequencyFeedback resistor range
32.768 kHz10 to 25 MΩ
1 MHz5 to 10 MΩ
10 MHz1 to 5 MΩ
20 MHz470 kΩ to 5 MΩ
10/24Doc ID 15287 Rev 6
AN2867Pierce oscillator design
C
L
CL1CL2×
C
L1CL2
+
--------------------------
C
s
+=
CLC
s
–
CL1CL2×
C
L1CL2
+
--------------------------
10 pF==
CL1 C
L2
=20 pF=
gain
minarg
g
m
g
mcrit
-------------- -
=
g
mcrit
4 ESR×2πF()
2
×C0CL+()
2
×=
g
mcrit
480 2π×86×10×()
2
××7
12–
×1010
12–
×10+()
2
×0.23 m A V⁄==
4.2 Load capacitor C
L
The load capacitance is the terminal capacitance of the circuit connected to the crystal
oscillator. This value is determined by the external capacitors C
capacitance of the printed circuit board and connections (C
the crystal manufacturer. Mainly, for the frequency to be accurate, the oscillator circuit has to
show the same load capacitance to the crystal as the one the crystal was adjusted for.
Frequency stability mainly requires that the load capacitance be constant. The external
capacitors C
and CL2 are used to tune the desired value of CL to reach the value specified
L1
by the crystal manufacturer.
The following equation gives the expression of C
Example of C
For example if the C
and CL2 calculation:
L1
value of the crystal is equal to 15 pF and, assuming that Cs = 5 pF,
L
then:
. That is: .
4.3 Gain margin of the oscillator
The gain margin is the key parameter that determines whether the oscillator will start up or
not. It has the following expression:
and CL2 and the stray
L1
). The CL value is specified by
s
:
L
, where:
●g
is the transconductance of the inverter (in mA/V for the high-frequency part or in
m
µA/V for the low-frequency part: 32 kHz).
●g
(gm critical) depends on the crystal parameters.
mcrit
Assuming that C
= CL2, and assuming that the crystal sees the same CL on its pads
L1
as the value given by the crystal manufacturer, g
is expressed as follows:
mcrit
, where ESR = equivalent series resistor
According to the Eric Vittoz theory: the impedance of the motional RLC equivalent circuit of
a crystal is compensated by the impedance of the amplifier and the two external
capacitances.
To satisfy this theory, the inverter transconductance (g
) must have a value gm > g
m
mcrit
. In
this case, the oscillation condition is reached. A gain margin of 5 can be considered as a
minimum to ensure an efficient startup of oscillations.
For example, to design the oscillator part of a microcontroller that has a g
value equal to
m
25 mA/V, we choose a quartz crystal (from Fox) that has the following characteristics:
frequency = 8 MHz, C
= 7 pF, CL = 10 pF, ESR = 80 Ω.. Will this crystal oscillate with this
0
microcontroller?
Let us calculate g
mcrit
:
Doc ID 15287 Rev 611/24
Pierce oscillator designAN2867
gain
minarg
g
m
g
mcrit
-------------- -
25
0.23
-----------
107===
DLESR I
Q
2
×=
ESRRm1
C
0
C
L
------ -
+
⎝⎠
⎛⎞
2
×=
I
Qmax
RMS
DL
max
ESR
-----------------
I
Qmax
PP
22
----------------------- -
==
Calculating the gain margin gives:
The gain margin is very sufficient to start the oscillation and the “gain margin greater than 5”
condition is reached. The crystal will oscillate normally.
If an insufficient gain margin is found (gain margin < 5) the oscillation condition is not
reached and the crystal will not start up. You should then try to select a crystal with a lower
ESR or/and with a lower C
.
L
4.4 Drive level DL and external resistor R
The drive level and external resistor value are closely related. They will therefore be
addressed in the same section.
4.4.1 Calculating drive level DL
The drive level is the power dissipated in the crystal. It has to be limited otherwise the quartz
crystal can fail due to excessive mechanical vibration. The maximum drive level is specified
by the crystal manufacturer, usually in mW. Exceeding this maximum value may lead to the
crystal being damaged.
The drive level is given by the following formula: , where:
●ESR is the equivalent series resistor (specified by the crystal manufacturer):
●I
is the current flowing through the crystal in RMS. This current can be displayed on
Q
an oscilloscope as a sine wave. The current value can be read as the peak-to-peak
value (I
oscilloscope may be converted into 1mA/1mV.
Figure 6.Current drive measurement with a current probe
). When using a current probe (as shown in Figure 6), the voltage scale of an
PP
Crystal
To oscilloscope
calculation
Ext
So as described previously, when tuning the current with the potentiometer, the current
through the crystal does not exceed I
Therefore the current through the crystal (peak-to-peak value read on the oscilloscope)
should not exceed a maximum peak-to-peak current (I
PP) equal to:
Qmax
Hence the need for an external resistor (R
I
PP. The addition of R
Qmax
expression of I
Qmax
.
then becomes mandatory and it is added to ESR in the
Ext
) (refer to Section 4.4.3) when IQ exceeds
Ext
4.4.2 Another drive level measurement method
The drive level can be computed as:
DL= I²
This current can be calculated by measuring the voltage swing at the amplifier input with a
low-capacitance oscilloscope probe (no more than 1 pF). The amplifier input current is
negligible with respect to the current through C
through the crystal is equal to the current flowing through C
this point is related to the RMS current by:
●F = crystal frequency
●, where: V
●C
–C
–C
–C
Therefore the drive level, DL, is given by: .
× ESR, where I
QRMS
= CL1 + (Cs/2) + C
tot
is the external load capacitor at the amplifier input
L1
is the stray capacitance
s
is the probe capacitance)
probe
is the RMS AC current.
QRMS
, so we can assume that the current
L1
, with:
is the voltage peak-to-peak measured at CL1 level
pp
where:
probe
. Therefore the RMS voltage at
L1
This DL value must not exceed the drive level specified by the crystal manufacturer.
4.4.3 Calculating external resistor R
The role of this resistor is to limit the drive level of the crystal. With CL2, it forms a low-pass
filter that forces the oscillator to start at the fundamental frequency and not at overtones
(prevents the oscillator from vibrating at 3, 5, 7 etc. times the fundamental frequency). If the
power dissipated in the crystal is higher than the value specified by the crystal manufacturer,
the external resistor R
dissipated in the selected quartz is less than the drive level specified by the crystal
manufacturer, the insertion of R
An initial estimation of R
R
Ext/CL2
. Thus, the value of R
Therefore: .
Let us put:
●oscillation frequency F = 8 MHz
●C
= 15 pF
L2
Then:
becomes mandatory to avoid overdriving the crystal. If the power
Ext
is not recommended and its value is then 0 Ω..
Ext
is obtained by considering the voltage divider formed by
Ext
is equal to the reactance of CL2.
Ext
Doc ID 15287 Rev 613/24
Ext
Pierce oscillator designAN2867
Pullability
PPM pF⁄()
C
m
6
×10
2C
0CL
+()
2
×
------------------------------------- -
=
The recommended way of optimizing R
and to connect a potentiometer in the place of R
to be approximately equal to the capacitive reactance of C
required until an acceptable output and crystal drive level are obtained.
Caution:After calculating R
Gain margin of the oscillator) to make sure that the addition of R
oscillation condition. That is, the value of R
g
and gm >> g
mcrit
g
Note:If R
>> g
m
is too low, there is no power dissipation in the crystal. If R
Ext
= 4 × (ESR + R
mcrit
oscillation: the oscillation condition is not reached.
4.5 Startup time
It is the time that take the oscillations to start and become stable. This time is longer for a
quartz than for a ceramic resonator. It depends on the external components: C
The startup time also depends on the crystal frequency and decreases as the frequency
rises. It also depends on the type of crystal used: quartz or ceramic resonator (the startup
time for a quartz is very long compared to that of a ceramic resonator). Startup problems are
usually due to the gain margin (as explained previously) linked to C
small or too large, or to ESR being too high.
The startup times of crystals for frequencies in the MHz range are within the ms range.
is to first choose CL1 and CL2 as explained earlier
Ext
it is recommended to recalculate the gain margin (refer to Section 4.3:
Ext
must also remain true:
mcrit
Ext
) × (2 × PI × F)² × (C0 + CL)²
Ext
. The potentiometer should be initially set
Ext
. It should then be adjusted as
L2
has no effect on the
Ext
has to be added to ESR in the expression of
is too high, there is no
Ext
and CL2.
L1
and CL2 being too
L1
The startup time of a 32 kHz crystal is within the 1 s to 5 s range.
4.6 Crystal pullability
Pullability refers to the change in frequency of a crystal in the area of usual parallel
resonance. It is also a measure of its frequency change for a given change in load
capacitance. A decrease in load capacitance causes an increase in frequency. Conversely,
an increase in load capacitance causes a decrease in frequency. Pullability is given by the
following formula:
14/24Doc ID 15287 Rev 6
AN2867Easy guideline for the selection of suitable crystal and external components
5 Easy guideline for the selection of suitable crystal
and external components
This section gives a recommended procedure to select suitable crystal/external
components. The whole procedure is divided into three main steps:
Step1: Calculate the gain margin
(please refer to Section 4.3: Gain margin of the oscillator)
●Choose a crystal and go to the references (chosen crystal + microcontroller
datasheets)
●Calculate the oscillator gain margin and check if it greater than 5:
If Gain margin < 5, the crystal is not suitable, choose another with a lower ESR or/and
a lower C
If Gain margin > 5, go to step 2.
Step2: Calculate the external load capacitors
(please refer to Section 4.2: Load capacitor CL)
. Redo step 1.
L
Calculate C
●If you found the exact capacitor value then the oscillator will oscillate at the exact
and CL2 and check if they match the exact capacitor value on market or not:
L1
expected frequency. You can proceed to step 3.
●If you did not find the exact value and:
–frequency accuracy is a key issue for you, you can use a variable capacitor to
obtain the exact value. Then you can proceed to step 3.
–frequency accuracy is not critical for you, choose the nearest value found on
market and go to step 3.
Step3: Calculate the drive level and external resistor
(please refer to Section 4.4: Drive level DL and external resistor RExt calculation)
●Compute DL and check if is greater or lower than DL
–If DL < DL
, no need for an external resistor. Congratulations you have found
crystal
a suitable crystal.
–If DL > DL
, you should calculate R
crystal
in order to have: DL < DL
Ext
should then recalculate the gain margin taking R
If you find that gain margin > 5, congratulations, you have found a suitable crystal.
If not, then this crystal will not work and you have to choose another. Return to
step 1 to run the procedure for the new crystal.
:
crystal
into account.
Ext
crystal
. You
Doc ID 15287 Rev 615/24
Some recommended crystals for STM32F1 microcontrollersAN2867
6 Some recommended crystals for STM32F1
microcontrollers
6.1 HSE part
6.1.1 Part numbers of recommended 8 MHz crystals
Table 4.EPSON®
Part numberESRC
MA-406 or MA-505 or MA-506 (8 MHz)
Table 5.HOSONIC ELECTRONIC
Part numberESRC
HC-49S-8 MHz
Table 6.CTS®
Part numberESRC
80 Ω10 pF7 pF107Through-hole
L
80 Ω10 pF5 pF137.4SMD
L
L
C
0
C
Gain margin Package
0
C
0
Gain marginPackage
Gain marginPackage
ATS08A60 Ω20 pF7 pF56.9Through-hole
ATS08ASM60 Ω20 pF7 pF56.9SMD
Table 7.FOXElectronics®
Part numberESRC
L
C
0
Gain marginPackage
FOXSLF/080-2080 Ω20 pF7 pF43.1Through-hole
FOXSDLF/080-2080 Ω20 pF7 pF43.1SMD
PFXLF/080-2080 Ω20 pF7 pF43.1SMD
16/24Doc ID 15287 Rev 6
AN2867Some recommended crystals for STM32F1 microcontrollers
6.1.2 Part numbers of recommended ceramic resonators
Ta bl e 8 gives the references of recommended CERALOCK® ceramic resonators for the
STM32F1 microcontrollers provided and certified by Murata.
Table 8.Recommendable conditions (for consumer)
Part numberFrequency (MHz) CL (pF)
CSTCR4M00G55-R0439
CSTCE8M00G55-R08
33CSTCE8M00G15L**-R08 to 13.99
CSTCE12M0G55-R012
CSTCE16M0V13L**-R014 to 20
CSTCE16M0V53-R016
CSTCW24M0X51R-R0246
For other Murata resonators recommended for STM32F1 microcontrollers, please refer to
the following link:
Then type “STM8” in the “IC part number” and click on “submit query”.
6.1.3 Part numbers of recommended 25 MHz crystals
(Ethernet applications)
Table 9.HOSONIC ELECTRONIC
Part numberESRC
L
6FA25000F10M1140 Ω10pF7pF21.91SMD
SA25000F10M1140 Ω10pF7pF21.91Through-hole
Table 10.FOXElectronics®
Part numberESRC
L
FOXSLF/250F-2030 Ω20 pF7 pF11.58Through-hole
FOXSDLF/250F-2030 Ω20 pF7 pF11.58SMD
PFXLF250F-2030 Ω20 pF7 pF11.58SMD
Table 11.CTS®
Part numberESRC
L
ATS25A30 Ω20 pF7 pF11.58Through-hole
ATS25ASM30 Ω20 pF7 pF11.58SMD
C
0
C
0
C
0
Gain marginPackage
Gain marginPackage
Gain marginPackage
Doc ID 15287 Rev 617/24
Some recommended crystals for STM32F1 microcontrollersAN2867
6.1.4 Part numbers of recommended 14.7456 MHz crystals (audio
applications)
Table 12.FOXElectronics®
Part numberESRC
L
C
0
Gain marginPackage
FOXSLF/147-2040 Ω20 pF7 pF24.97Through-hole
FOXSDLF/147-2040 Ω20 pF7 pF24.97SMD
Table 13.ABRACON™
Part numberESRC
L
C
0
Gain marginPackage
ABMM2-14.7456 MHz50 Ω18 pF7 pF29.3SMD
18/24Doc ID 15287 Rev 6
AN2867Some recommended crystals for STM32F1 microcontrollers
6.2 LSE part
For the low-speed external oscillator (LSE) part of STM32F1 microcontrollers, it is
recommended to use a crystal with C
Table 14.Recommendable crystals
≤ 7 pF.
L
Manufacturer
Quartz reference/
part number
C
(pF)
ESR
L
(Ohm)
Frequency
(Hz)
C0
(pF)
AbraconABS07770000327681.056.5
AbraconAB206J650000327681.3510.9
AbraconABS25650000327681.3510.9
AbraconAB26TRB650000327681.3510.9
AbraconAB26TRJ640000327681.114.6
ACTACT4115A SMX770000327681.16.4
ACTACT3215A SMX770000327680.956.7
ACTACT711S765000327680.87.5
ACTACT2017500003276819.2
ACTACT20165000032768112.0
ACTACT200A650000327680.912.4
EPSON FC135/1457700003276816.6
EPSON MC146/156765000327680.87.5
EPSON C-002RX660000327680.8510.5
EPSON MC306/405/406650000327680.912.4
EPSON MC30A650000327680.912.4
EPSON C-004R650000327680.8512.6
EPSON C-005R650000327680.7512.9
Gm
margin
EPSON C-001R635000327680.917.7
JFVNYDT-38G06630000327681.318.44
JFVNYMC306G066500003276829.3
KYOCERAST3215SB32768C0HPWBB770000327680.96.7
MicroCrystalMS1V-T1K660000327680.910.3
Doc ID 15287 Rev 619/24
Some recommended crystals for STM8A/S microcontrollersAN2867
7 Some recommended crystals for STM8A/S
microcontrollers
7.1 Part numbers of recommended crystal oscillators
Table 15.KYOCERA
Part numberFreq.ESRCLDrive level (DL)
CX5032GA08000H0QSWZZ8 MHz300 Ω max12 pF500 µW max
CX5032GA16000H0QSWZZ16 MHz100 Ω max12 pF300 µW max
CX8045GA08000H0QSWZZ8 MHz200 Ω max12 pF500 µW max
CX8045GA16000H0QSWZZ16 MHz50 Ω max12 pF300 µW max
7.2 Part numbers of recommended ceramic resonators
Ta bl e 1 6 and Ta bl e 1 7 give the references of recommended CERALOCK® ceramic
resonators for the STM8A microcontrollers provided and certified by Murata.
Table 16.Recommendable conditions (for consumer)
Part numberFreq.CL
CSTCR4M00G55B-R04 MHzC
CSTCE8M00G55A-R08 MHzC
CSTCE16M0V53-R016 MHzC
Table 17.Recommendable conditions (for CAN-BUS)
Part numberFreq.CL
CSTCR4M00G15C**-R04 MHzC
CSTCR8M00G15C**-R08 MHzC
CSTCE16M0V13C**-R016 MHzC
= CL2 = 39 pF
L1
= CL2 = 33 pF
L1
= CL2 = 15 pF
L1
= CL2 = 39 pF
L1
= CL2 = 33 pF
L1
= CL2 = 15 pF
L1
20/24Doc ID 15287 Rev 6
AN2867Some PCB hints
C
L2
R
Ext
(1)
OSC_OUT
OSC_IN
Microcontroller
C
L1
Ground shield
ai15839
VSS paths
Quartz
Local ground plane (other layer)
8 Some PCB hints
1.High values of stray capacitance and inductances must be avoided as much as
possible as they might give rise to an undesired mode of oscillation and lead to startup
problems.
In addition, high-frequency signals should be avoided near the oscillator circuitry.
2. Reduce trace lengths as much as possible.
3. Use ground planes to isolate signals and reduce noise. For instance, the use of a local
ground plane on the PCB layer immediately below the crystal guard ring is a good
solution to isolate the crystal from undesired coupling with signals on other PCB layers
(crosstalk). Note that the ground plane is needed in the vicinity of the crystal only and
not on the entire board (see Figure 7.).
4. The V
isolate the oscillator input from the output and the oscillator from adjacent circuitry. The
unterminated V
shield under the quartz. All V
plane (except for the quartz pads).
5. Use decoupling capacitors between each V
noise.
paths can also be routed as shown in Figure 7. In this way, the VSS paths
SS
paths that end under CL1 and CL2 are not in contact with the ground
SS
vias in Figure 7 are connected to the local ground
SS
path and the closest VSS path to reduce
DD
Note:R
Figure 7.Recommended layout for an oscillator circuit
Warning:It is highly recommended to apply conformal coatings to the
PCB area shown in Figure 7, especially for the LSE quartz,
CL1, CL2, and paths to the OSC_IN and OSC_OUT pads as a
protection against moisture, dust, humidity, and temperature
extremes that may lead to startup problems.
is mandatory only if the dissipated power in the crystal exceeds the drive level specified
Ext
by the crystal manufacturer. Otherwise, its value is 0
Ω
(refer to Section 4.4: Drive level DL
and external resistor RExt calculation for more details).
Doc ID 15287 Rev 621/24
ConclusionAN2867
9 Conclusion
The most important parameter is the gain margin of the oscillator, which determines if the
oscillator will start up or not. This parameter has to be calculated at the beginning of the
design phase to choose the suitable crystal for the application. The second parameter is the
value of the external load capacitors that have to be selected in accordance with the C
specification of the crystal (provided by the crystal manufacturer). This determines the
frequency accuracy of the crystal. The third parameter is the value of the external resistor
that is used to limit the drive level. In the 32 kHz oscillator part, however, it is not
recommended to use an external resistor.
Because of the number of variables involved, in the experimentation phase you should use
components that have exactly the same properties as those that will be used in production.
Likewise, you should work with the same oscillator layout and in the same environment to
avoid unexpected behavior and therefore save time.
L
22/24Doc ID 15287 Rev 6
AN2867Revision history
10 Revision history
Table 18.Document revision history
DateRevisionChanges
20-Jan-20091Initial release.
DL formula corrected in Section 4.4.2: Another drive level
measurement method.
Package column added to all tables in Section 6: Some
recommended crystals for STM32 microcontrollers.
10-Nov-20092
27-Apr-20103
25-Nov-20104
30-Mar-20115
17-Jul-20126Whole document restricted to STM32F1 devices.
Recommended part numbers updated in Section 6.1: HSE part and
Section 6.2: LSE part.
Section 6.1.3: Part numbers of recommended 25 MHz crystals
(Ethernet applications) added.
Section 6.1.4: Part numbers of recommended 14.7456 MHz crystals
(audio applications) added.
Added Section 7: Some recommended crystals for STM8A/S
microcontrollers.
Updated Section 6.1.2: Part numbers of recommended ceramic
resonators: removed Table 7: Recommendable condition (for
consumer) and Table 8: Recommendable condition (for CAN bus);
ceramic resonator part number “CSTSE16M0G55A-R0” by
“CSTCE16M0V53-R0”.
®
, and Table 15: KDS; Added Ta bl e 1 4 :
Doc ID 15287 Rev 623/24
AN2867
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.