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
Loading...
+ 16 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.