Crystal Load Caps
Pick a crystal and your board's stray capacitance to get the two load capacitors in standard values. Then check what matters after the board is built: will the oscillator start every time, is the crystal overdriven, and how many ppm the capacitor choice costs you.
1 · Crystal
2 · Board
3 · Oscillator
4 · Drive level
5 · ppm budget
Load capacitors
Standard values near the ideal
| C1 | C2 | CL | CL error | Frequency |
|---|
Will it start? (gain margin)
Drive level
Frequency pulling
| Contributor | Swing | ppm |
|---|
Pullability vs load capacitance
ppm of frequency shift per pF of load error, for this crystal's Cm and C0. A higher-CL crystal is less sensitive to stray and capacitor tolerance, but needs more oscillator gain.
Frequency offset vs load capacitance
Offset from the frequency at the nominal CL. The shaded band is the CL range the capacitor tolerance and stray uncertainty can produce.
Load capacitors, oscillator margin and pulling in a Pierce oscillator
A crystal is cut to hit its frequency with one specific load across its pins, CL. In a Pierce oscillator that load is the two capacitors in series plus everything stray: the MCU pins, the traces and the pads. Get CL wrong and the frequency moves; get the oscillator gain wrong and it may not start at cold or on a low battery.
Example from AN2867: an 8 MHz crystal with C0 = 7 pF, CL = 10 pF and ESR = 80 Ω gives gm_crit = 0.23 mA/V. On an STM32F1 HSE with gm = 25 mA/V the gain margin is 107. A 32.768 kHz crystal is the hard case: ESR is tens of kΩ and the LSE oscillator's gm is a few µA/V, so the margin is often between 2 and 10 and depends on the drive-level setting.
Estimating stray capacitance
Without a measurement, start with the MCU's OSC pin capacitance from its datasheet plus 2–5 pF for traces and pads, and keep the traces short and symmetric. The per-pin model is more exact when you know each piece: pin and trace capacitance on each side adds to that side's capacitor, so it counts half towards CL, while capacitance directly between the two pins counts in full. For production, fit the computed values, measure the frequency on a few boards, and correct C_stray from the measured offset using the pullability.
Limits
- The gain-margin check uses the nominal CL, as AN2867 does, and the datasheet's maximum ESR. Startup at temperature extremes also depends on supply voltage and aging; confirm with a negative-resistance test (add series resistance until it stops starting) on real boards.
- The drive level needs a swing you measure or assume. A probe adds capacitance and can stop an LSE, so use a 0.1 pF active probe there.
- Pulling uses the four-element crystal model (Cm, C0, CL). It ignores temperature, aging and the crystal's own calibration tolerance; the budget adds those as one ±ppm figure.
- Presets mix datasheet maximums (ESR, C0 on some parts) with typical values (Cm). The 8 and 12 MHz Cm values are read from a typical-values graph for HC-49 crystals; use your part's sheet when it lists C1.
References
- STMicroelectronics, AN2867 Oscillator design guide for STM8AF/AL/S, STM32 MCUs and MPUs, Rev 19 (Apr 2023): §3.3–3.7 formulas and examples, Table 5 (LSE gm and Gm_crit_max), Table 6 (HSE), Table 7 (recommended 32.768 kHz crystals with gm_crit). ST lists Rev 24 (Feb 2026) as current; it could not be retrieved for this build, and the formulas have been the same since Rev 13.
- Epson, FC-135 / FC-135R crystal unit datasheets (ESR, C0, C1 3.4 fF, drive level 1.0 µW max) and TSX-3225 spec sheets X1E0000210120, X1E0000210124, X1E0000210734 (16, 24, 25 MHz: R1, C1, L1, C0, drive level).
- ECS Inc., ECX-34Q datasheet (32.768 kHz, 70 kΩ, C0 1.1 pF, C1 3.5 fF, 0.5 µW max).
- Epson, MA-406/MA-505/MA-506 datasheet (HC-49/US SMD: R1 by frequency, C0 5 pF max, 10–100 µW).
- Philips Components, Quartz crystals, general applications, HC-49/U (1996), Fig. 14–15: typical C1 and C0 versus frequency, fundamental mode.
Clock that won't start on some boards?
Kyros reviews and debugs oscillator circuits and the layouts around them: crystal selection, load and margin calculations, and the production test that catches a marginal part before it ships.
