OSCILLATORS — Oscillator control

The system oscillators are shared between the cores in the system and automatically controlled by the clock control system, see CLOCK — Clock control.

The system has the following crystal oscillators:
  • High-frequency 32 MHz crystal oscillator (HFXO)
  • Low-frequency 32.768 kHz crystal oscillator (LFXO)

The crystal oscillators can be configured to use either built-in or external capacitors.

High-frequency (32 MHz) crystal oscillator (HFXO)

The high-frequency crystal oscillator (HFXO) is controlled by a 32 MHz external crystal.

The crystal oscillator is designed for use with an AT-cut quartz crystal in parallel resonant mode, connected between pins XC1 and XC2. To achieve correct oscillation frequency, the load capacitance must match the specification in the crystal data sheet. The following figure shows how the 32 MHz crystal is connected to the high frequency crystal oscillator.

Figure 1. Circuit diagram of the high-frequency crystal oscillator
Circuit diagram of the high-frequency crystal oscillator

The load capacitance (CL) is the total capacitance seen by the crystal across its terminals and is calculated by the following equation.

Figure 2. Load capacitance equation
Load capacitance equation

C1 and C2 are ceramic SMD capacitors connected between each crystal terminal and ground. For more information, see Reference circuitry. Cpcb1 and Cpcb2 are stray capacitance on the PCB. Cpin is the pin input capacitance on pins XC1 and XC2. See table 32 MHz crystal oscillator (HFXO). The load capacitors C1 and C2 should have the same value.

For reliable operation, the crystal load capacitance, shunt capacitance, equivalent series resistance, and drive level must comply with the specifications in table 32 MHz crystal oscillator (HFXO). It is recommended to use a crystal with lower than maximum load capacitance and/or shunt capacitance. A low load capacitance will reduce both startup time and current consumption.

Using internal capacitors

Optional internal capacitors ranging from 7.0 pF to 20.0 pF in 0.5 pF steps, are provided on pins XC1 and XC2.

Enabling internal capacitors eliminates the need for external capacitors for the 32 MHz crystal. The configuration of the internal capacitors must take place before starting the high-frequency crystal oscillator (HFXO).

The internal capacitors are used instead of the external capacitors C1 and C2, and the total capacitance seen by the crystal across its terminals is calculated by the load capacitance equation in High-frequency (32 MHz) crystal oscillator (HFXO).

To enable the internal capacitors, find the correct XOSC32MCAPS.CAPVALUE field using the following equation.
CAPVALUE = (((FICR->XOSC32MTRIM.SLOPE+56)*(CAPACITANCE*2-14))
           +((FICR->XOSC32MTRIM.OFFSET-8)<<4)+32)>>6;
The equation has the following variables
  • CAPACITANCE is the desired capacitor value in pF, holding any value between 7.0 pF and 20.0 pF in 0.5 pF steps.
  • FICR->XOSC32MTRIM are factory trim values which usually are different from device to device.
Finally, set XOSC32MCAPS.ENABLE to Enabled, to activate the capacitors.

After this, when HFXO is started, it will use the internal capacitor values together with the external crystal.

Note: It is possible to avoid using floating point numbers by pre-calculating the (CAPACITANCE*2-14) field of the above equation.

Low-frequency (32.768 kHz) crystal oscillator (LFXO)

For higher LFCLK accuracy (when greater than ± 250 ppm accuracy is required), the 32.768 kHz crystal oscillator (LFXO) must be used.

To use the LFXO, a 32.768 kHz crystal must be connected between the XL1 and XL2 pins, as illustrated in the following figure.

Figure 3. Circuit diagram of the low-frequency crystal oscillator
Circuit diagram of the low-frequency crystal oscillator

To enable oscillator functionality on XL1 and XL2 pins, use value Peripheral for the MCUSEL bitfield of the register PIN_CNF[n] (n=0..31) (Retained).

To achieve correct oscillation frequency, the load capacitance (CL) must match the specification in the crystal data sheet. The load capacitance (CL) is the total capacitance seen by the crystal across its terminals. It is calculated by the following equation.

Figure 4. Load capacitance equation
Load capacitance equation

C1 and C2 are ceramic SMD capacitors connected between each crystal terminal and ground. Cpcb1 and Cpcb2 are stray capacitance on the PCB. Cpin is the pin input capacitance on the XL1 and XL2 pins (see 32.768 kHz crystal oscillator (LFXO)). The load capacitors C1 and C2 should have the same value.

For more information, see Reference circuitry.

Using internal capacitors

Optional internal capacitors of 6 pF, 7 pF, and 9 pF are provided between pins XL1 and XL2.

Enabling the internal capacitor between XL1 and XL2 pins eliminates the need for external capacitors for the 32 kHz crystal, as shown in the following figure.
Figure 5. Internal capacitor for the 32 kHz crystal

To enable this capacitor, choose the correct CINT capacitance in register XOSC32KI.INTCAP. The value of the internal capacitor CINT must match the specification in the crystal data sheet. CINT is the capacitance seen by the crystal across its terminals, including pin capacitance but excluding PCB stray capacitance.

Low-frequency (32.768 kHz) external source

The 32.768 kHz crystal oscillator (LFXO) is designed to work with external sources.

The following external sources are supported:
  • A low swing clock. The signal should be applied to the XL1 pin with the XL2 pin grounded. Set OSCILLATORS.XOSC32KI.BYPASS=Disabled.
  • A rail-to-rail clock. The signal should be applied to the XL1 pin with the XL2 pin left unconnected. Set OSCILLATORS.XOSC32KI.BYPASS=Enabled.
In order to use an external source, configure LFCLKSRC.SRC=LFXO.

Registers

Instances

InstanceDomainBase addressTrustZoneSplit accessDescription
MapAttDMA
OSCILLATORS : S
OSCILLATORS : NS
APPLICATION0x50004000
0x40004000
USSNANoOscillator configuration

Register overview

RegisterOffsetTZDescription
XOSC32MCAPS0x5C4

Programmable capacitance of XC1 and XC2

This register is retained.

XOSC32KI.BYPASS0x6C0

Enable or disable bypass of LFCLK crystal oscillator with external clock source

This register is retained.

XOSC32KI.INTCAP0x6D0

Control usage of internal load capacitors

This register is retained.

XOSC32MCAPS (Retained)

Address offset: 0x5C4

Programmable capacitance of XC1 and XC2

This register is retained.

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCAPVALUEValue representing capacitance, calculated using provided equation
BRWENABLEEnable on-chip capacitors on XC1 and XC2
Disabled0Capacitor disabled (use external caps)
Enabled1Capacitor enabled

XOSC32KI.BYPASS (Retained)

Address offset: 0x6C0

Enable or disable bypass of LFCLK crystal oscillator with external clock source

This register is retained.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWBYPASSEnable or disable bypass of LFCLK crystal oscillator with external clock source
Disabled0Disable (use with crystal or low-swing external source)
Enabled1Enable (use with rail-to-rail external source)

XOSC32KI.INTCAP (Retained)

Address offset: 0x6D0

Control usage of internal load capacitors

This register is retained.

Bit number313029282726252423222120191817161514131211109876543210
IDAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWINTCAPControl usage of internal load capacitors
External0Use external load capacitors
C6PF16 pF internal load capacitance
C7PF27 pF internal load capacitance
C9PF39 pF internal load capacitance

Electrical specification

32 MHz crystal oscillator (HFXO)

SymbolDescriptionMin.Typ.Max.Units
fHFXOExternal crystal frequency32MHz
fTOL_HFXOFrequency tolerance requirement for 2.4 GHz proprietary radio applications±60ppm
fTOL_HFXO_BLEFrequency tolerance requirement, Bluetooth Low Energy applications, packet length ≤ 200 bytes±40ppm
fTOL_HFXO_BLE_LPFrequency tolerance requirement, Bluetooth Low Energy applications, packet length > 200 bytes±30ppm
CL_HFXOLoad capacitance6812pF
C0_HFXOShunt capacitance7pF
RS_HFXO_7PFEquivalent series resistance 3 pF < C0 <= 7 pF60Ω
RS_HFXO_3PFEquivalent series resistance C0 <= 3 pF100Ω
PD_HFXODrive level100µW
CPIN_HFXOInput capacitance XC1 and XC2 with internal capacitors disabled5.5pF
CPIN_HFXO_INTInput capacitance XC1 and XC2 with internal capacitors enabled2.5pF
CHFXO_INT_MINInput capacitance XC1 and XC2, internal capacitor at minimum value, excluding CPIN_HFXO_INT7pF
CHFXO_INT_MAXInput capacitance XC1 and XC2, internal capacitor at maximum value, excluding CPIN_HFXO_INT20pF
ISTBY_X32MCore standby current for various crystals
ISTBY_X32M_X0

Typical parameters for a given 2.5mm x 2.0mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 1 pF, LM_HFXO = 7 mH, RS_HFXO = 20 Ω

65µA
ISTBY_X32M_X1

Typical parameters for a given 1.6mm x 1.2mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.4 pF, LM_HFXO = 20 mH, RS_HFXO = 40 Ω

187µA
ISTBY_X32M_X2

Typical parameters for a given 2.0mm x 1.6mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.73 pF, LM_HFXO = 9.47 mH, RS_HFXO = 16.32 Ω

135µA
ISTBY_X32M_X3

Typical parameters for a given 1.2mm x 1.0mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.42 pF, LM_HFXO = 22.7 mH, RS_HFXO = 100 Ω

181µA
ISTART_X32MAverage startup current for various crystals, first 1 ms
ISTART_X32M_X0

Typical parameters for a given 2.5mm x 2.0mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 1 pF, LM_HFXO = 7 mH, RS_HFXO = 20 Ω

363µA
ISTART_X32M_X1

Typical parameters for a given 1.6mm x 1.2mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.4 pF, LM_HFXO = 20 mH, RS_HFXO = 40 Ω

790µA
ISTART_X32M_X2

Typical parameters for a given 2.0mm x 1.6mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.73 pF, LM_HFXO = 9.47 mH, RS_HFXO = 16.32 Ω

467µA
ISTART_X32M_X3

Typical parameters for a given 1.2mm x 1.0mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.42 pF, LM_HFXO = 22.7 mH, RS_HFXO = 100 Ω

863µA
tPOWERUP_X32MPower-up time for various crystals
tPOWERUP_X32M_X0

Typical parameters for a given 2.5mm x 2.0mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 1 pF, LM_HFXO = 7 mH, RS_HFXO = 20 Ω

60µs
tPOWERUP_X32M_X1

Typical parameters for a given 1.6mm x 1.2mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.4 pF, LM_HFXO = 20 mH, RS_HFXO = 40 Ω

187µs
tPOWERUP_X32M_X2

Typical parameters for a given 2.0mm x 1.6mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.73 pF, LM_HFXO = 9.47 mH, RS_HFXO = 16.32 Ω

60µs
tPOWERUP_X32M_X3

Typical parameters for a given 1.2mm x 1.0mm crystal:

CL_HFXO = 8 pF, C0_HFXO = 0.42 pF, LM_HFXO = 22.7 mH, RS_HFXO = 100 Ω

211µs

32.768 kHz crystal oscillator (LFXO)

SymbolDescriptionMin.Typ.Max.Units
fLFXOExternal crystal frequency32.768kHz
fTOL_LFXO_BLEFrequency tolerance requirement, Bluetooth Low Energy applications±500ppm
fTOL_LFXO_ANTFrequency tolerance requirement for ANT applications±50ppm
CL_LFXOLoad capacitance79pF
C0_LFXOShunt capacitance12pF
RS_LFXOEquivalent series resistance6090kΩ
PD_LFXODrive level0.5μW
CpinInput capacitance on XL1 and XL2 pads when internal capacitor is disabled4pF
CpinTotal capacitance between XL1 and XL2 pads when internal capacitor enabled679pF
VAMP,IN,XO,LOWPeak-to-peak amplitude for external low swing clock. Input signal must not swing outside supply rails.2001000mV