System Clock

[中文]

Clock Overview

The general functions of a clock are to synchronize clock signals and timing. It can be simply divided into:

  • High-performance clock

  • Low-power clock

High-performance Clock

The high-performance clock is used to provide the working clock for the CPU and digital peripherals. It is currently divided into the following two types:

  • PLL_CLK: Provides a high-frequency internal clock of 320 MHz or 480 MHz

  • XTAL_CLK: Provides a stable 40 MHz external crystal clock

XTAL_CLK can provide a reference clock for PLL_CLK, and PLL_CLK (Phase-Locked Loop) can lock the phase of the input signal and generate an output signal that is an integer multiple of the input frequency, to achieve the clock signal output of the frequency-doubled signal.

Low-power Clock

The low-power clock is the clock source for the RTC module and low-power peripherals. It is currently divided into the following three types:

  • XTAL32K_CLK: Provides a stable 32 KHz external crystal clock, suitable for applications that require precise timing

  • FOSC_CLK: Provides a fast adjustable 17.5 MHz internal RC oscillator, suitable for high-speed operations

  • RTC_CLK: Provides a slow adjustable 136 KHz RC oscillator, very suitable for low-power timing functions

Comparison of Different Clocks

Clock Source

Advantages

Disadvantages

PLL

Very precise clock frequency. Can provide a very high clock frequency

High power consumption

XTAL

Very precise clock frequency, lower power consumption

Fixed frequency, long startup time (100 us), usually an external crystal

RC Oscillator

Very low power consumption, short startup time

Lower accuracy, and easily affected by the environment

For clock-related details of each chip, please refer to the corresponding technical reference manual, such as the clock section in the ESP32-C3 Technical Reference Manual.