May 2017 DocID15287 Rev 11 1/43
Oscillator design guide for STM8AF/AL/S
and STM32 microcontrollers
Many designers know oscillators based on Pierce-Gate topology (hereinafter referred to as
Pierce oscillators), but not all of them really understand how they operate, and only a few
master their design. In practice, many of them do not even really pay attention to the
oscillator design until they realize that it does not operate properly (usually when the product
where it is embedded is already being produced). A crystal not working as intended results
in project delays if not overall failure.
The oscillator should receive the proper amount of attention during the design phase, well
before moving to the manufacturing phase. The designer must avoid the nightmare scenario
of products being returned from field.
This application note introduces the Pierce oscillator basics and provides guidelines for
good oscillator design. It also shows how to determine the different external components,
and provides guidelines for correct PCB design.
This document finally contains an easy guideline to select suitable crystals and external
components, and lists some recommended crystals (HSE and LSE) for the STM32 32-bit
MCUs and for the STM8AF/AL/S microcontrollers, to speed-up the
application development. Refer to
Table 1 for the list of applicable products.
Table 1. Applicable products
Type Product categories
STM8AF Series, STM8AL Series
STM32 32-bit ARM Cortex MCUs