Image
Graeme Clark
Graeme Clark
Principal Product Engineer
Published: January 30, 2023

The oscillator is the heart of any microcontroller system, and as such should receive the appropriate amount of attention in a design, to make sure that the design is as reliable as possible.

We can all design an oscillator that works, but to design one that works in production, within the range of tolerances of all the components, takes a little effort. A typical Renesas microcontroller user’s manual will provide one or more typical oscillator circuits (often recommended to Renesas by the supplier of the crystal or ceramic resonator used in the example) as well as a simple specification for the equivalent oscillator circuit.

The exact circuit required for reliable oscillation can vary from oscillator to oscillator and can also be affected by the board layout and environmental conditions. In every case, we strongly recommend that the designer contacts their chosen oscillator supplier to ask them for the recommended circuit for their design and tests the oscillator themselves to determine the required oscillator circuit parameters.

For many applications, a ceramic resonator can provide a good low-cost solution; however where greater stability and accurate timing is required, a crystal provides the best solution. However, in low power applications crystals with their higher Q factor have a much slower start up time. In fact the lower the frequency the longer they take to start; a 32 kHz crystal can take anywhere between 1 - 3 seconds to start.

In many microcontrollers the effects of crystal drift and stability needs to be considered carefully, especially for applications that require a clock function; however knowledge of the performance of the oscillator can allow corrections to be made in software.

The most common oscillator design used on Renesas microcontrollers is a Pierce oscillator - shown below.

Image
Pierce oscillator

The output of the internal inverter is fed back to its input via the external oscillator circuit, creating an unstable feedback loop. Stable oscillation is sustained when the output of the oscillator is delayed enough to provide 360o phase delay. The crystal combined with the load capacitors, C1 & C2, provide a tuned circuit that tends to stabilise the frequency of the oscillation

Rf - Feedback Resistor - This provides negative feedback around the first inverter and makes sure that the inverter works in its linear region. This is rarely required with a crystal oscillator but is often needed when a ceramic resonator is used, to make sure the oscillator starts correctly. Typical values in the range of 1 MOhm are recommended. Some Renesas microcontrollers have internal feedback resistors.

Rd - Damping Resistor – This is a series resistor that is designed to prevent overdriving the oscillator. Often if C1 & C2 are selected correctly, this is not required. This resistor has several effects: it stabilises the phase of the feedback circuit, and reduces the loop gain at higher frequencies, and by placing Rd at the output of the inverter the output resistance is increased and the current is reduced. Rd also works with C2 to form a low pass filter which can greatly reduce unwanted oscillation modes. Typical values for Rd are in the range of 250 - 500 ohms

C1 & C2 - Load Capacitors - The load capacitors together with the crystal or resonator provide a phase lag of 1800 and work together to provide the energy to start and sustain the oscillation.

The operation of a crystal or ceramic resonator can be affected by a range of environmental effects such as temperature and humidity, as well as circuit parameters such as operating voltage.

To qualify an oscillator design, it should be tested at and beyond the design requirements.

We strongly recommend that each design is subjected to the extremes of both operating voltage and the expected operating environment to make sure that the oscillator can be started both from power off and from standby and / or other low power modes used.

  • Take care if you use ceramic resonators with internal capacitors; typical values of capacitance are often quite high, and you don’t have flexibility to change the values to match your circuit and layout issues especially regarding the centre ground can cause noise problems.
  • Place the oscillator circuit as close to the microcontroller as possible, keep the track length short
  • Oscillators are sensitive to noise, use guard bands where possible to minimise capacitive coupling.
  • Minimise the PCB area taken by the oscillator circuit to minimise the “loop” area available for inductive coupling to other parts of the circuit.
  • Avoid routing other tracks under or over the oscillator circuit and do not place any trace which can switch high currents near the oscillators.
  • Make sure you test your oscillator circuit thoroughly and go beyond your normal operating conditions to make sure you have a suitable design margin.
  • Most importantly we always recommend that you check with your crystal or resonator manufacturer for their recommended circuit to work with your chosen microcontroller.

Many Renesas microcontrollers also use a 32 kHz oscillator (typically a 32 kHz watch crystal) to support low power, low speed operation. The operation of 32 kHz crystals is basically the same as for crystals of higher frequencies; however there are a few specific points to consider

  • Start-up Time: The typical start up time of 32 kHz crystals is much longer than for crystals of higher frequencies, typically 0.3 - 3.0 seconds
  • Stability: Watch crystals tend to be much more unstable across temperature, so please check the specification from your supplier carefully, especially regarding drift.
  • Device Variation: No two manufacturers of 32 kHz crystals are the same, even within the same device type; actual performance can vary widely, we have seen wide variance between different suppliers. Please consider this carefully when specifying your oscillator.
  • Oscillator layout: It is vital to keep the 32 kHz crystal as close to the microcontroller as possible to avoid any problems; within 1cm of the microcontroller is a good rule to follow.
  • Again, ask your oscillator supplier to provide a matched circuit to your design.

A crystal oscillator is quite a simple component, but a very important one, and it’s important to make sure that the crystal oscillator circuit design is reliable and repeatable, especially when you’re using a 32 kHz subclock oscillator. Renesas has produced a really good application note describing how you should design a suitable 32 kHz oscillator circuit for the RA family; you can design this here https://www.renesas.com/document/apn/ra-family-design-guide-sub-clock-circuits-application-note, and many oscillator suppliers can also provide a recommended oscillator with the recommended circuit to specifically work with the RA, and often they will also provide a matching service to specifically match their component to your specific RA design.

Renesas always recommends taking advantage of this offer to make sure you have the most reliable MCU design possible.

Share this news on

Documentation

Type Title Date
Application Note PDF 932 KB 日本語
1 item