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 capacitances 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.

To use these capacitors, in the following equation replace CAPACITANCE with the desired value to find the correct XOSC32MCAPS.CAPVALUE field. Then, set XOSC32MCAPS.ENABLE to Enabled.

CAPVALUE = (1+FICR->XOSC32MTRIM.SLOPE/16) * (CAPACITANCE*2-14) + FICR->XOSC32MTRIM.OFFSET

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. To achieve correct oscillation frequency, the load capacitance must match the specification in the crystal data sheet.

The LFXO circuitry is illustrated in the following diagram.

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

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 capacitances 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 11 pF are provided on pins XL1 and XL2.

To use these capacitors, select the capacitance in register XOSC32KI.INTCAP.

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

Table 1. Instances
Base address Domain Peripheral Instance Secure mapping DMA security Description Configuration

0x50004000
0x40004000

APPLICATION OSCILLATORS

OSCILLATORS : S
OSCILLATORS : NS

US

NA

Oscillator configuration

   
Table 2. Register overview
Register Offset Security Description
XOSC32MCAPS 0x5C4  

Programmable capacitance of XC1 and XC2

Retained

XOSC32KI.BYPASS 0x6C0  

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

Retained

XOSC32KI.INTCAP 0x6D0  

Control usage of internal load capacitors

Retained

XOSC32MCAPS ( Retained )

Address offset: 0x5C4

This register is a retained register

Programmable capacitance of XC1 and XC2

Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID                                               B       A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access Field Value ID Value Description
A RW

CAPVALUE

   

Value representing capacitance, calculated using provided equation

B RW

ENABLE

   

Enable on-chip capacitors on XC1 and XC2

     

Disabled

0

Capacitor disabled (use external caps)

     

Enabled

1

Capacitor enabled

XOSC32KI.BYPASS ( Retained )

Address offset: 0x6C0

This register is a retained register

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

Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID                                                               A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access Field Value ID Value Description
A RW

BYPASS

   

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

     

Disabled

0

Disable (use with xtal or low-swing external source)

     

Enabled

1

Enable (use with rail-to-rail external source)

XOSC32KI.INTCAP ( Retained )

Address offset: 0x6D0

This register is a retained register

Control usage of internal load capacitors

Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID                                                             A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access Field Value ID Value Description
A RW

INTCAP

   

Control usage of internal load capacitors

     

External

0

Use external load capacitors

     

C6PF

1

6 pF internal load capacitance

     

C7PF

2

7 pF internal load capacitance

     

C11PF

3

11 pF internal load capacitance


This document was last updated on
2019-12-09.
Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone.