Oscillator fault reasons

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Oscillator fault reasons on MSP430 processors

Besides the internal oscillators, which are usually RC based and therefore have high tolerances and low temperature stability, all MSPs offer ways to attach one or more external oscillators or quartz crystals as a more reliable source of stable and precise clock frequency. While the use of an external oscillator circuit is simple but expensive and power-consuming, the much cheaper low-powered quartz crystals require way more attention.

There are many reasons why an external quartz crystal fails to start up or seems to fail. Some of them are hardware dependent, some are caused by improperly implemented startup code and some are caused by the way try to find them.

Hardware based quartz failures

Load capacitance

Each quartz is designed for a specific load link building service capacitance. In the normal setup that is used for devices with internal quartz support, two capacitors are needed from each pin of the quartz to ground. In the oscillation process, electric charge flows from one capacitor through the quartz into the other one and back again. So the attached capacitors need to match the quartz' internal capacitance for a stable and precise oscillation. Most manufacturers give a specific load capacitance in their datasheets, at which the quartz will oscillate with the specified frequency. It is important to note that, since the two attached capacitors are seen in series, their value needs to be twice the given load capacitance. So if a quartz is listed for a load of 16pF, two 32pF (or 33pF, as this is the closest standard value) need to be attached.

Parasitic capacitances

While the attached capacitors form the main load for the quartz, there are other sources for an additional load that must be taken into consideration:

All these capacitances must be subtracted from the load capacitors' values to match the required load.

Software based quartz failures

Other reasons for a quartz failure

Usage of a debugger

On some devices, namely the MSP430F247 but maybe with others too, the Embedded Emulation Module (used for debugging) influences the clock outdoor fountains module. In a given case, the clock module kept reporting an oscillator fault with an attached XT2 quartz if the debugger was attached. In free-running mode, there was no problem. Further investigation revealed that with a debugger attached, OFIFG was flagged for XT1 even if the OSCOFF bit was set in SR. The startup code only checked OFIFG (which should be only affected by XT2 since XT1 was disabled with OSCOFF) and incorrectly detected a quartz failure. Checking the separate fault flags in the clock module revealed that XT2OF was clear and only LFXT1OF was set. When the source of the XT1 clock was redirected to the internal VLO, LFXT1OF remained clear and so did OFIFG.

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox