This page was machine-translated and may differ from the original. View original
[Series] ST Engineer Yuji Kawano ⑮ – “MCUs with Built-in Oscillators, Device Characteristic Matching Is Essential”
MCUs with Built-in Oscillators Must Match Device Characteristics
MCU and Oscillator Circuit Design, Decision on MCU Component Embedding Issues
Refer to the user manual and catalog, and check the manufacturer's recommendations.
MCU and Oscillator Circuit Design, Decision on MCU Component Embedding Issues
Refer to the user manual and catalog, and check the manufacturer's recommendations.
[Editor's Note] Generally, when people think of semiconductors, they tend to picture components familiar to the general public, such as computer CPUs and memory. On the other hand, the Micro Controller Unit (MCU), which serves as a core semiconductor for driving electronic products, is used in virtually every electronic device we encounter, yet remains an unfamiliar semiconductor to the general public. Recently, however, MCUs have begun to attract public attention as they have been frequently mentioned in the media due to the semiconductor shortage. Accordingly, this publication has organized a series of articles by Manager Yuji Kawano of STMicroelectronics, a company specializing in MCU semiconductors, to provide a professional look into MCUs.
A clock generator capable of producing very precise frequencies is required. How can an oscillator circuit be designed to connect a crystal or ceramic oscillator to an MCU?MCU oscillator circuits generally use inverters. Crystal or ceramic oscillator elements are connected to the inverter to induce oscillation. The basic configuration of the oscillator circuit is shown in Figure 1.
Rf: Feedback resistor. This resistance stabilizes the oscillation.
RD: Current restriction resistor. This resistor limits the current to prevent the inverter from over-driving the crystal or ceramic oscillator.
CG and CD: Load capacitors
Since the names and symbols for these components vary significantly depending on the manufacturer, please refer to the user manual of the relevant oscillator or MCU for details. Another factor affecting oscillation is the parasitic capacitance and resistance of the printed circuit board (PCB).
These components (Rf, RD, or both) may be embedded in the MCU. We recommend that users determine the parameters of these embedded components, PCB parasitic components, and load capacitors based on the circuits recommended in the user manual. This is because doing so allows for matching the characteristics of the crystal or ceramic oscillator elements. Any discrepancy can cause oscillation failure.

▲Figure 1: Basic configuration of an oscillator circuit
■ Which components to embed in the MCU depends on the MCU and oscillator circuit design.
The following is a more detailed explanation of Figure 1, which shows the basic configuration of an oscillator circuit.
Which components to embed in the MCU is determined by the MCU and oscillator circuit design. There are various possibilities: both Rf and RD can be built-in, Rf may be built-in while RD is connected externally, or vice versa, or neither Rf nor RD may be built-in. In most cases, load capacitors (CG and CD) are not built into the MCU and must be connected externally or an internal oscillator (oscillator module) must be used. In fact, apart from these capacitors and resistors, parasitic capacitors and resistors on the user PCB must also be considered.
Once the frequency has been determined, select an appropriate crystal or ceramic oscillator. Next, refer to the user manual or catalog for the selected oscillator to determine which circuit (and constants) the manufacturer recommends. To construct the recommended circuit, you must select parameters for the aforementioned components. If some of these components are integrated into the MCU, you must check the values for resistance and capacitance.
If the component parameters do not match the characteristics of the oscillation element, it may exhibit abnormal oscillation characteristics or even fail to oscillate at all.
■ Actual Oscillator Circuit
Next, let's look at an actual oscillator circuit. Figure 2(a) shows an example of a circuit that provides a clock to an MCU. There are two circuits here. One provides the input signal to the inverter (indicated in green), and the other provides the output signal to the inverter (indicated in blue). Since the choice of which one to use depends on the relevant MCU, you should refer to the MCU user manual for more detailed information. In any case, the oscillation signal (clock) must first be shaped into a waveform by an input buffer (e.g., an inverter) and then provided to the MCU. When this is shaped into a waveform, the input signal is converted from a sine wave into a rectangular wave having the same voltage level as that used inside the MCU.

▲Figure 2: Actual oscillator meeting diagram
Figure 2(b) shows three methods for stopping clock generation in cases such as low-power consumption mode. Figure 2(b-1) illustrates the method of cutting off power to the inverter. Figures 2(b-2) and 2(b-3) explain the method of stopping the clock via logic. In Figure 2(b-2), NAND gates are used instead of an inverter to fix the input signal to an L level and maintain the output signal at an H level. Figure 2(b-3) uses NOR gates to fix the input signal to an H level and maintain the output signal at an L level. Since the optimal method depends on the MCU you are using, please refer to the MCU user manual for more detailed information.
※ caution
In Figure 2(b-1), the inverter output terminal has high impedance characteristics, resulting in an unstable electric potential. If an intermediate potential level is present, this will be supplied to the input buffer in Figure 2(a), generating a through current that keeps the current consumption higher than expected, even when the circuit is in low-power consumption mode. If such a situation occurs, you must contact the MCU manufacturer to find a solution. In the case of the examples presented in Figures 2(b-2) and 2(b-3), the output level can be maintained at H or L to provide to the input buffer, thereby preventing the generation of pass-through current.
■ Keep oscillator circuit wiring as short as possible
Oscillator circuits can be a source of noise, and external noise can damage the internal clock, causing errors. Among the various available MCU circuit types, oscillator circuits are the most vulnerable to noise.
For this reason, the oscillator circuit wiring must be kept as short as possible, and the components (oscillator element, capacitor, resistor) must be placed as close to the MCU as possible.

▲Figure 3: PCB Layout
Figure 3(a) presents an example of the most commonly used layout pattern for oscillator circuits. Of course, you do not need to apply this specific pattern to your oscillator circuit. In other words, you can design a pattern based on the size and shape of your components. However, you must adhere to the following rules.
(1) The components should be placed as close to the MCU as possible (see Figure 3(b)).
(2) Wiring should be as short as possible.
(3) To ground-shield the oscillating element, the GND pattern should be as wide as possible. ( ※Note: Some oscillating elements have better noise-resistance characteristics when not ground-shielded.) In such cases, the oscillation element must be adjusted by referring to the user manual.
(4) Crosstalk between this circuit and other wiring must be prevented. (In particular, attention should be paid to high current lines and high-speed signal lines.)
As a practical example, Figure 3(c) shows a recommended layout pattern for STMicroelectronics' STM32 MCU.
■ Oscillator Circuit Evaluation
An oscillator circuit can be evaluated by assessing the following points.
△ Negative Resistance (represents the inverter amplification margin) △ Harmonic Components △ Voltage required for oscillation start/stop △ Oscillation Start (Stabilization) Time
Detailed explanations of these evaluation methods can be found on the websites and technical notes of oscillator manufacturers. Some manufacturers publish actual results for their MCUs and evaluations of their oscillators on their websites. This information can be used as a useful reference.
When evaluating oscillation characteristics, the most important factors for the user are the PCB's parasitic capacitance and resistance, as these parameters are incorporated into the oscillator circuit. Evaluation results posted on manufacturers' websites apply to general circuits and therefore do not include data regarding the circuit parameters of the user's PCB. We recommend that you send the oscillator circuit on your custom-designed board to an oscillator manufacturer and request an evaluation. Most oscillator manufacturers are willing to accept such requests.
Other Considerations and Reference Information
(1) Contaminated PCB
In the past, a customer changed the production line for circuit manufacturing after frequently experiencing oscillation failures. On the new production line, it was discovered that the cause of the oscillation failures lay in PCBs that were not properly cleaned. This reduced insulation resistance, which in turn degraded oscillation characteristics. PCB insulation resistance of several megaohms affects oscillation characteristics.
(2) Oscillation waveform amplification
As MCU power consumption has recently decreased, MCU oscillator circuits are also being designed to consume less power. One way to reduce power consumption is to minimize oscillation amplification as much as possible. This method controls the oscillation waveform to achieve small amplification characteristics instead of full swing.
(3) Oscillation detection circuit
Some modern MCU oscillator circuits include a circuit that detects oscillation stability. This circuit sets a flag when it detects that the oscillation has stabilized. A counter is used as a common detection method. The counter does not start counting until a clock is generated. Oscillation is detected by reading the output value of the oscillation-detection counter. Another method is to charge an internal capacitor using the clock. In this method, the oscillation clock is recognized by detecting when the capacitor voltage becomes constant.
본 기사에 대한 정정·반론·추후보도 청구는 보도 청구 안내를, 그간 게재된 보도문은 정정·반론보도 모아보기를 참고해 주세요.















