Semiconductor

How Clock Systems and Oscillators Affect Microcontroller Reliability

Industry Inspire Editorial Team Published Oct 24, 2026 Updated Oct 24, 2026 8 min read

Every microcontroller depends on a clock.

The clock determines when the CPU executes instructions and when many peripherals perform their work.

If the clock is unstable, incorrectly configured, or lost completely, the embedded system can fail in ways that look like software bugs.

Possible symptoms include:

  • MCU does not start,
  • communication timing is wrong,
  • timers run at the wrong rate,
  • ADC triggering becomes inaccurate,
  • control loops lose timing,
  • the entire system stops.

For industrial embedded systems, the clock is therefore not simply a performance setting.

It is part of the reliability architecture.

Fundamentals and Technology Overview

What Is the MCU Clock System?

A microcontroller clock system distributes timing signals to blocks such as:

  • CPU,
  • memories,
  • timers,
  • ADCs,
  • communication peripherals,
  • watchdogs,
  • debug logic.

A typical clock path may look like:

oscillator → PLL → clock multiplexer → prescaler → CPU/peripheral clocks

Modern MCUs can have several clock domains.

Infineon's AURIX documentation, for example, separates:

  • system clock domains,
  • peripheral clock domains.

Each can have separate dividers and gating.

Common Clock Sources

Microcontrollers can obtain clocks from:

  • internal RC oscillators,
  • external crystals,
  • external oscillators,
  • low-speed 32.768 kHz crystals,
  • PLL-generated clocks.

Each option has different:

  • accuracy,
  • startup time,
  • power,
  • cost,
  • reliability.

Internal RC Oscillators

An internal RC oscillator is integrated inside the MCU.

Advantages include:

  • no external component,
  • fast startup,
  • lower BOM cost.

Limitations include:

  • lower absolute accuracy,
  • more temperature drift,
  • process variation.

It is often sufficient for:

  • basic control,
  • startup clock,
  • fail-safe clock.

External Crystal Oscillators

A crystal can provide much better frequency accuracy.

It is often used when applications need:

  • accurate serial communication,
  • precise timekeeping,
  • USB,
  • RF,
  • industrial timing.

The trade-off is that the external network must be designed correctly.

Crystal Load Capacitance

A crystal oscillator depends on:

  • crystal specification,
  • load capacitors,
  • PCB parasitics,
  • MCU oscillator characteristics.

Incorrect loading can cause:

  • frequency error,
  • startup failure,
  • unstable oscillation.

ST's current STM32 oscillator guidance emphasizes checking stability and frequency centering for both high-speed and low-speed external crystals.

Oscillator Startup Time

A crystal does not begin oscillating instantly.

Startup time depends on:

  • crystal ESR,
  • drive strength,
  • load capacitance,
  • supply ramp,
  • temperature.

If firmware assumes the external clock is ready too early, startup can fail.

Reliable designs wait for a:

  • clock-ready flag

before switching the system clock.

Clock Accuracy

Clock accuracy affects:

  • baud rate,
  • USB timing,
  • RF timing,
  • RTC accuracy,
  • control-loop frequency.

A small frequency error may be acceptable for one application and unacceptable for another.

Clock Jitter

Jitter is short-term variation in clock timing.

High jitter can affect:

  • ADC sampling,
  • high-speed communication,
  • PWM timing.

For sensitive analog or high-speed systems, clock quality matters as much as frequency.

Phase-Locked Loops

A PLL multiplies or transforms a source clock.

For example:

8 MHz crystal → PLL → 160 MHz CPU clock

This allows high CPU performance while using a lower-frequency reference.

PLL Lock

A PLL needs time to lock.

Firmware should verify:

  • PLL ready / lock status

before using it as the system clock.

Safety, Security, and Reliability

Clock Trees

Modern MCUs often provide complex clock trees.

Different peripherals may use:

  • different sources,
  • different dividers,
  • asynchronous domains.

This improves flexibility but increases configuration risk.

Clock Misconfiguration Can Cause Hidden Failures

A peripheral may appear broken when the real problem is:

  • wrong clock source,
  • wrong divider,
  • disabled peripheral clock.

Microchip's troubleshooting guidance lists incorrect oscillator configuration as a common cause of:

  • startup failures,
  • incorrect delays,
  • timer errors.

Voltage and Frequency Must Match

MCUs usually specify a maximum CPU frequency for each supply voltage range.

Running the processor too fast at too low a voltage can cause:

  • timing violations,
  • unreliable execution.

Microchip specifically notes that the correct brownout threshold matters because the MCU may fail if the clock frequency exceeds what the available voltage safely supports.

Clock Gating

Clock gating disables clocks to unused blocks.

Benefits include:

  • reduced dynamic power,
  • less switching noise.

But disabling a clock at the wrong time can freeze:

  • peripheral state,
  • communication,
  • timers.

Low-Speed Clocks

Many MCUs use a low-speed clock for:

  • RTC,
  • watchdog,
  • low-power wake-up.

Typical sources include:

  • 32.768 kHz crystal,
  • internal low-speed RC.

Independent Watchdog Oscillator

A watchdog is more robust when it uses a clock source independent of the main CPU clock.

If the main oscillator fails, the watchdog can still operate.

Microchip devices commonly provide watchdog timers using separate on-chip oscillators.

Clock Failure Detection

A reliable MCU should detect when its main clock fails.

Microchip's Clock Failure Detection can:

  1. detect primary clock loss,
  2. switch automatically to an internal safe clock,
  3. generate an interrupt,
  4. let software enter a safe state.

This prevents a failed external crystal from immediately stopping the complete system.

ST Clock Security System

ST's Clock Security System performs a similar role.

The CSS can detect failure of an external clock source.

If the failed external source is the main system clock, the MCU can automatically switch to an internal source and generate an interrupt.

ST recommends using the CSS when an external clock is used.

Safe Clock Source

A fallback clock does not always run at the same frequency as the main clock.

After failover, software may need to adjust:

  • communication baud rates,
  • timer periods,
  • control behavior.

In some applications, the correct response is to enter a controlled safe state instead of continuing normal operation.

Clock Monitoring in Functional Safety

Safety-oriented MCUs may contain dedicated clock monitors.

These can detect:

  • missing clock,
  • frequency outside expected range,
  • PLL failure.

Infineon's AURIX safety architecture includes clock monitoring among its system safety mechanisms.

Validation and Reliability Considerations

Redundant Clock Strategy

A robust design may use:

Primary Clock

External crystal.

Backup Clock

Internal RC oscillator.

This provides a path for:

  • fault logging,
  • controlled shutdown,
  • degraded operation.

RTC Reliability

Low-speed oscillator quality determines:

  • timekeeping accuracy,
  • scheduled wakeups.

A poor 32.768 kHz crystal design can cause long-term time drift.

RF Applications

Wireless systems often have tighter reference-clock requirements.

ST's 2026 STM32WBA guidance specifically emphasizes correct:

  • HSE selection,
  • LSE selection,
  • frequency centering

to avoid issues such as RF disconnection or standards noncompliance.

Temperature Effects

Oscillator frequency changes with temperature.

Internal RC oscillators can drift more strongly.

Crystals also have temperature characteristics.

Industrial products should evaluate:

  • full specified temperature range.

Aging

Crystal frequency can change slowly over time.

Long-life equipment may need to include:

  • aging tolerance

in its frequency budget.

EMI and PCB Layout

The crystal oscillator network is sensitive.

Poor layout can cause:

  • noise pickup,
  • startup problems,
  • excessive radiation.

Keep:

  • crystal traces short,
  • high-current switching nodes away,
  • return paths controlled.

Grounding

Oscillator components should follow the MCU vendor's PCB layout recommendations.

A poor ground path can reduce oscillator margin.

Drive Level

Crystals have maximum recommended drive power.

Excessive drive can:

  • accelerate aging,
  • damage the crystal,
  • increase frequency error.

Clock Output for Debugging

Many MCUs allow an internal clock to be routed to an external pin.

This is useful for:

  • validating frequency,
  • diagnosing configuration.

Microchip troubleshooting guidance specifically recommends clock output as a diagnostic technique.

Clock and Communication Reliability

UART, CAN, SPI and other interfaces depend on clock accuracy.

If transmitter and receiver clocks differ too much:

  • sampling margins shrink,
  • errors increase.

Clock and Motor Control

Control-loop timing must be predictable.

If the system clock changes unexpectedly:

  • PWM frequency may change,
  • current-loop execution period may change.

A motor controller should not continue normal control after clock failover unless the fallback timing has been validated.

Implementation, Testing, and Optimization

Clock and ADC Accuracy

ADC conversion timing and sampling-trigger timing depend on the clock tree.

Poor configuration can reduce:

  • sampling performance,
  • synchronization.

Startup Reliability Checklist

Check:

  • oscillator configuration,
  • external crystal values,
  • startup wait,
  • PLL lock,
  • voltage/frequency limits.

Runtime Reliability Checklist

Enable where available:

  • clock failure detection,
  • clock security,
  • watchdog,
  • voltage monitoring.

Common Design Mistake: Selecting Crystal Only by Frequency

The crystal must also meet:

  • ESR,
  • load capacitance,
  • drive level,
  • temperature requirements.

Common Design Mistake: Copying Capacitor Values

Load capacitors depend on:

  • crystal CL,
  • MCU pin capacitance,
  • PCB parasitics.

Values should be calculated and validated.

Common Design Mistake: No Fallback Clock

An external oscillator fault can halt the system unless a fail-safe source is configured.

Common Design Mistake: Ignoring Failover Timing

A fallback clock may be slower than the normal clock.

Communication and control software must account for this.

Common Design Mistake: Running Too Fast at Low Voltage

Clock frequency must remain within the MCU's voltage-frequency operating limits.

Practical Clock Design Workflow

Step 1

Define required clock accuracy.

Step 2

Choose internal or external source.

Step 3

Design crystal network if required.

Step 4

Configure PLL and dividers.

Step 5

Verify startup and lock timing.

Step 6

Enable clock monitoring.

Step 7

Define fallback response.

Step 8

Test across temperature and supply variation.

Industrial Example: PLC Module

The MCU may use:

  • external crystal for accurate communication,
  • internal RC as backup,
  • low-speed clock for watchdog.

If the main clock fails:

  • communication is stopped,
  • outputs move to safe state,
  • diagnostic fault is recorded.

Industrial Example: Motor Drive

Clock failure should trigger:

  • safe PWM shutdown,
  • error logging,
  • controlled reset.

Continuing normal motor control on an unvalidated fallback clock could be unsafe.

Conclusion

The clock system is one of the foundational reliability mechanisms in a microcontroller.

It determines:

  • instruction timing,
  • peripheral timing,
  • communication accuracy,
  • control-loop behavior.

A reliable design must consider more than nominal frequency.

It should evaluate:

  • oscillator startup,
  • crystal stability,
  • PLL lock,
  • jitter,
  • voltage-frequency limits,
  • temperature,
  • fail-safe monitoring.

The most important design principle is:

treat the clock as a monitored system resource, not as an invisible background signal.

A robust industrial MCU design has:

  • a validated primary clock,
  • an independent fallback,
  • failure detection,
  • a defined safe response.

That approach prevents a single oscillator fault from becoming a complete uncontrolled system failure.

Frequently Asked Questions

The clock determines when instructions and peripherals operate. A failed or incorrect clock can stop the MCU, alter timer behavior, corrupt communication timing, or disturb control loops.

Use an external crystal when the application needs better frequency accuracy or stability, such as precise communication, RF, USB, RTC, or tightly controlled timing.

Clock failure detection monitors the primary clock source and can switch to a safe internal clock if the main source stops. It may also generate an interrupt so firmware can enter a safe state.

If the watchdog used the same failed clock as the CPU, both could stop together. An independent watchdog oscillator lets the watchdog continue detecting a stalled system.

Common mistakes include incorrect load capacitors, poor PCB layout, excessive drive level, ignoring startup time, and selecting a crystal without checking ESR and oscillator stability requirements.

References

  1. STMicroelectronics — Clock Security System: https://www.st.com/content/st_com/en/technical-documents/an5156-introduction-to-security-for-stm32-mcus-stmicroelectronics_asset/chunk-009-topic-an5156-sec-feat-clock-security-system.html
  2. STMicroelectronics — HSE and LSE Crystal Selection for STM32WBA: https://wiki.st.com/stm32mcu/wiki/Connectivity%3AHSE_and_LSE%3A_How_to_select_crystals_and_center_oscillators_with_STM32WBAx
  3. Microchip — Clock Failure Detect: https://www.microchip.com/en-us/products/microcontrollers/8-bit-mcus/peripherals/safety-monitoring/cfd
  4. Microchip — Oscillator Problems and Delays Troubleshooting: https://onlinedocs.microchip.com/oxy/GUID-D6FD9F43-8DC4-476E-A55E-AA21FA1CC865-en-US-4/GUID-40DF8F00-3CD5-4D26-95CC-108A48346A08.html
  5. Infineon — AURIX TC3xx Clocking System: https://documentation.infineon.com/aurixtc3xx/docs/oiz1713077576619

Author

Industry Inspire Editorial Team

Editorial team covering industrial automation, manufacturing growth, and B2B strategy.

Share This Article