CLOCK — Clock control

The clock control system can source the system clocks from a range of internal or external high and low frequency oscillators and distribute them to modules based upon a module’s individual requirements. Clock distribution is automated and grouped independently by module to limit current consumption in unused branches of the clock tree.

Listed here are the main features for CLOCK:

  • 64 MHz on-chip oscillator
  • 64 MHz crystal oscillator, using external 32 MHz crystal
  • 32.768 kHz +/-500 ppm RC oscillator
  • 32.768 kHz crystal oscillator, using external 32.768 kHz crystal
  • 32.768 kHz oscillator synthesized from 64 MHz oscillator
  • Firmware (FW) override control of oscillator activity for low latency start up
  • Automatic oscillator and clock control, and distribution for ultra-low power
Figure 1. Clock control
Clock control

HFCLK clock controller

The HFCLK clock controller provides the following clocks to the system.

  • HCLK64M: 64 MHz CPU clock
  • PCLK1M: 1 MHz peripheral clock
  • PCLK16M: 16 MHz peripheral clock
  • PCLK32M: 32 MHz peripheral clock

The HFCLK controller supports the following high frequency clock (HFCLK) sources:

  • 64 MHz internal oscillator (HFINT)
  • 64 MHz crystal oscillator (HFXO)

For illustration, see Clock control.

When the system requests one or more clocks from the HFCLK controller, the HFCLK controller will automatically provide them. If the system does not request any clocks provided by the HFCLK controller, the controller will enter a power saving mode.

These clocks are only available when the system is in ON mode. When the system enters ON mode, the internal oscillator (HFINT) clock source will automatically start to be able to provide the required HFCLK clock(s) for the system.

The HFINT will be used when HFCLK is requested and HFXO has not been started. The HFXO is started by triggering the HFCLKSTART task and stopped using the HFCLKSTOP task. A HFCLKSTARTED event will be generated when the HFXO has started and its frequency is stable.

The HFXO must be running to use the RADIO or the calibration mechanism associated with the 32.768 kHz RC oscillator.

64 MHz crystal oscillator (HFXO)

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

Circuit diagram of the 64 MHz crystal oscillator shows how the 32 MHz crystal is connected to the 64 MHz crystal oscillator.

Figure 2. Circuit diagram of the 64 MHz crystal oscillator

The load capacitance (CL) is the total capacitance seen by the crystal across its terminals and is given by:



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 the XC1 and XC2 pins. See table 64 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 64 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 start up time and current consumption.

LFCLK clock controller

The system supports several low frequency clock sources.

As illustrated in Clock control, the system supports the following low frequency clock sources:

  • 32.768 kHz RC oscillator (LFRC)
  • 32.768 kHz crystal oscillator (LFXO)
  • 32.768 kHz synthesized from HFCLK (LFSYNT)

The LFCLK clock is started by first selecting the preferred clock source in register LFCLKSRC and then triggering the LFCLKSTART task. If the LFXO is selected as the clock source, the LFCLK will initially start running from the 32.768 kHz LFRC while the LFXO is starting up and automatically switch to using the LFXO once this oscillator is running. The LFCLKSTARTED event will be generated when the LFXO has been started.

The LFCLK clock is stopped by triggering the LFCLKSTOP task.

It is not allowed to write to register LFCLKSRC when the LFCLK is running.

A LFCLKSTOP task will stop the LFCLK oscillator. However, the LFCLKSTOP task can only be triggered after the STATE field in register LFCLKSTAT indicates a 'LFCLK running' state.

The LFCLK clock controller and all of the LFCLK clock sources are always switched off when in OFF mode.

32.768 kHz RC oscillator (LFRC)

The default source of the low frequency clock (LFCLK) is the 32.768 kHz RC oscillator (LFRC).

The LFRC frequency will be affected by variation in temperature. The LFRC oscillator can be calibrated to improve accuracy by using the HFXO as a reference oscillator during calibration. See Table 32.768 kHz RC oscillator (LFRC) for details on the default and calibrated accuracy of the LFRC oscillator. The LFRC oscillator does not require additional external components.

Calibrating the 32.768 kHz RC oscillator

After the 32.768 kHz RC oscillator is started and running, it can be calibrated by triggering the CAL task. In this case, the HFCLK will be temporarily switched on and used as a reference.

A DONE event will be generated when calibration has finished. The calibration mechanism will only work as long as HFCLK is generated from the HFCLK crystal oscillator, it is therefore necessary to explicitly start this crystal oscillator before calibration can be started, see HFCLKSTART task.

It is not allowed to stop the LFRC during an ongoing calibration.

Calibration timer

The calibration timer can be used to time the calibration interval of the 32.768 kHz RC oscillator.

The calibration timer is started by triggering the CTSTART task and stopped by triggering the CTSTOP task. The calibration timer will always start counting down from the value specified in CTIV and generate a CTTO timeout event when it reaches 0. The Calibration timer will stop by itself when it reaches 0.

Figure 3. Calibration timer

Due to limitations in the calibration timer, only one task related to calibration, that is, CAL, CTSTART and CTSTOP, can be triggered for every period of LFCLK.

32.768 kHz crystal oscillator (LFXO)

For higher LFCLK accuracy the low frequency crystal oscillator (LFXO) must be used.

The following external clock sources are supported:

  • Low swing clock signal applied to the XL1 pin. The XL2 pin shall then be grounded.
  • Rail-to-rail clock signal applied to the XL1 pin. The XL2 pin shall then be grounded or left unconnected.

The LFCLKSRC register controls the clock source, and its allowed swing. The truth table for various situations is as follows:

Table 1. LFCLKSRC configuration depending on clock source
SRCEXTERNALBYPASSComment
000Normal operation, RC is source
001DO NOT USE
01XDO NOT USE
100Normal XTAL operation
110Apply external low swing signal to XL1, ground XL2
111Apply external full swing signal to XL1, leave XL2 grounded or unconnected
101DO NOT USE
200Normal operation, synth is source
201DO NOT USE
21XDO NOT USE

To achieve correct oscillation frequency, the load capacitance must match the specification in the crystal data sheet. Circuit diagram of the 32.768 kHz crystal oscillator shows the LFXO circuitry.

Figure 4. Circuit diagram of the 32.768 kHz crystal oscillator

The load capacitance (CL) is the total capacitance seen by the crystal across its terminals and is given by:



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 XC1 and XC2 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.

32.768 kHz synthesized from HFCLK (LFSYNT)

LFCLK can also be synthesized from the HFCLK clock source. The accuracy of LFCLK will then be the accuracy of the HFCLK.

Using the LFSYNT clock avoids the requirement for a 32.768 kHz crystal, but increases average power consumption as the HFCLK will need to be requested in the system.

Registers

Table 2. Instances
Base addressPeripheralInstanceDescriptionConfiguration
0x40000000CLOCKCLOCKClock control  
Table 3. Register overview
RegisterOffsetDescription
TASKS_HFCLKSTART0x000Start HFCLK crystal oscillator 
TASKS_HFCLKSTOP0x004Stop HFCLK crystal oscillator 
TASKS_LFCLKSTART0x008Start LFCLK source 
TASKS_LFCLKSTOP0x00CStop LFCLK source 
TASKS_CAL0x010Start calibration of LFRC oscillator 
TASKS_CTSTART0x014Start calibration timer 
TASKS_CTSTOP0x018Stop calibration timer 
EVENTS_HFCLKSTARTED0x100HFCLK oscillator started 
EVENTS_LFCLKSTARTED0x104LFCLK started 
EVENTS_DONE0x10CCalibration of LFCLK RC oscillator complete event 
EVENTS_CTTO0x110Calibration timer timeout 
INTENSET0x304Enable interrupt 
INTENCLR0x308Disable interrupt 
HFCLKRUN0x408Status indicating that HFCLKSTART task has been triggered 
HFCLKSTAT0x40CHFCLK status 
LFCLKRUN0x414Status indicating that LFCLKSTART task has been triggered 
LFCLKSTAT0x418LFCLK status 
LFCLKSRCCOPY0x41CCopy of LFCLKSRC register, set when LFCLKSTART task was triggered 
LFCLKSRC0x518Clock source for the LFCLK 
CTIV0x538Calibration timer intervalRetained

TASKS_HFCLKSTART

Address offset: 0x000

Start HFCLK crystal oscillator

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWTASKS_HFCLKSTART  Start HFCLK crystal oscillator
   Trigger1Trigger task

TASKS_HFCLKSTOP

Address offset: 0x004

Stop HFCLK crystal oscillator

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWTASKS_HFCLKSTOP  Stop HFCLK crystal oscillator
   Trigger1Trigger task

TASKS_LFCLKSTART

Address offset: 0x008

Start LFCLK source

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWTASKS_LFCLKSTART  Start LFCLK source
   Trigger1Trigger task

TASKS_LFCLKSTOP

Address offset: 0x00C

Stop LFCLK source

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWTASKS_LFCLKSTOP  Stop LFCLK source
   Trigger1Trigger task

TASKS_CAL

Address offset: 0x010

Start calibration of LFRC oscillator

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWTASKS_CAL  Start calibration of LFRC oscillator
   Trigger1Trigger task

TASKS_CTSTART

Address offset: 0x014

Start calibration timer

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWTASKS_CTSTART  Start calibration timer
   Trigger1Trigger task

TASKS_CTSTOP

Address offset: 0x018

Stop calibration timer

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
AWTASKS_CTSTOP  Stop calibration timer
   Trigger1Trigger task

EVENTS_HFCLKSTARTED

Address offset: 0x100

HFCLK oscillator started

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWEVENTS_HFCLKSTARTED  HFCLK oscillator started
   NotGenerated0Event not generated
   Generated1Event generated

EVENTS_LFCLKSTARTED

Address offset: 0x104

LFCLK started

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWEVENTS_LFCLKSTARTED  LFCLK started
   NotGenerated0Event not generated
   Generated1Event generated

EVENTS_DONE

Address offset: 0x10C

Calibration of LFCLK RC oscillator complete event

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWEVENTS_DONE  Calibration of LFCLK RC oscillator complete event
   NotGenerated0Event not generated
   Generated1Event generated

EVENTS_CTTO

Address offset: 0x110

Calibration timer timeout

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWEVENTS_CTTO  Calibration timer timeout
   NotGenerated0Event not generated
   Generated1Event generated

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
ID                           DC BA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWHFCLKSTARTED  Write '1' to enable interrupt for event HFCLKSTARTED
   Set1Enable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
BRWLFCLKSTARTED  Write '1' to enable interrupt for event LFCLKSTARTED
   Set1Enable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
CRWDONE  Write '1' to enable interrupt for event DONE
   Set1Enable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
DRWCTTO  Write '1' to enable interrupt for event CTTO
   Set1Enable
   Disabled0Read: Disabled
   Enabled1Read: Enabled

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
ID                           DC BA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWHFCLKSTARTED  Write '1' to disable interrupt for event HFCLKSTARTED
   Clear1Disable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
BRWLFCLKSTARTED  Write '1' to disable interrupt for event LFCLKSTARTED
   Clear1Disable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
CRWDONE  Write '1' to disable interrupt for event DONE
   Clear1Disable
   Disabled0Read: Disabled
   Enabled1Read: Enabled
DRWCTTO  Write '1' to disable interrupt for event CTTO
   Clear1Disable
   Disabled0Read: Disabled
   Enabled1Read: Enabled

HFCLKRUN

Address offset: 0x408

Status indicating that HFCLKSTART task has been triggered

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARSTATUS  HFCLKSTART task triggered or not
   NotTriggered0Task not triggered
   Triggered1Task triggered

HFCLKSTAT

Address offset: 0x40C

HFCLK status

Bit number313029282726252423222120191817161514131211109876543210
ID               B               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARSRC  Source of HFCLK
   RC064 MHz internal oscillator (HFINT)
   Xtal164 MHz crystal oscillator (HFXO)
BRSTATE  HFCLK state
   NotRunning0HFCLK not running
   Running1HFCLK running

LFCLKRUN

Address offset: 0x414

Status indicating that LFCLKSTART task has been triggered

Bit number313029282726252423222120191817161514131211109876543210
ID                               A
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARSTATUS  LFCLKSTART task triggered or not
   NotTriggered0Task not triggered
   Triggered1Task triggered

LFCLKSTAT

Address offset: 0x418

LFCLK status

Bit number313029282726252423222120191817161514131211109876543210
ID               B              AA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARSRC  Source of LFCLK
   RC032.768 kHz RC oscillator
   Xtal132.768 kHz crystal oscillator
   Synth232.768 kHz synthesized from HFCLK
BRSTATE  LFCLK state
   NotRunning0LFCLK not running
   Running1LFCLK running

LFCLKSRCCOPY

Address offset: 0x41C

Copy of LFCLKSRC register, set when LFCLKSTART task was triggered

Bit number313029282726252423222120191817161514131211109876543210
ID                              AA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARSRC  Clock source
   RC032.768 kHz RC oscillator
   Xtal132.768 kHz crystal oscillator
   Synth232.768 kHz synthesized from HFCLK

LFCLKSRC

Address offset: 0x518

Clock source for the LFCLK

Bit number313029282726252423222120191817161514131211109876543210
ID              CB              AA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWSRC  Clock source
   RC032.768 kHz RC oscillator
   Xtal132.768 kHz crystal oscillator
   Synth232.768 kHz synthesized from HFCLK
BRWBYPASS  Enable or disable bypass of LFCLK crystal oscillator with external clock source
   Disabled0Disable (use with Xtal or low-swing external source)
   Enabled1Enable (use with rail-to-rail external source)
CRWEXTERNAL  Enable or disable external source for LFCLK
   Disabled0Disable external source (use with Xtal)
   Enabled1Enable use of external source instead of Xtal (SRC needs to be set to Xtal)

CTIV ( Retained )

Address offset: 0x538

This register is a retained register

Calibration timer interval

Bit number313029282726252423222120191817161514131211109876543210
ID                         AAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDAccessFieldValue IDValueDescription
ARWCTIV  Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds.

Electrical specification

64 MHz internal oscillator (HFINT)

SymbolDescriptionMin.Typ.Max.Units
fNOM_HFINTNominal output frequency64MHz
fTOL_HFINTFrequency tolerance<±1.5<±8%
tSTART_HFINTStartup time3us

64 MHz crystal oscillator (HFXO)

SymbolDescriptionMin.Typ.Max.Units
fNOM_HFXONominal output frequency64MHz
fXTAL_HFXOExternal crystal frequency32MHz
fTOL_HFXOFrequency tolerance requirement for 2.4 GHz proprietary radio applications±60ppm
fTOL_HFXO_BLEFrequency tolerance requirement, Bluetooth low energy applications±40ppm
CL_HFXOLoad capacitance12pF
C0_HFXOShunt capacitance7pF
RS_HFXO_7PFEquivalent series resistance C0 = 7 pF60ohm
RS_HFXO_5PFEquivalent series resistance C0 = 5 pF60ohm
RS_HFXO_3PFEquivalent series resistance C0 = 3 pF100ohm
PD_HFXODrive level100uW
CPIN_HFXOInput capacitance XC1 and XC24pF
tSTART_HFXOStartup time0.36ms

32.768 kHz RC oscillator (LFRC)

SymbolDescriptionMin.Typ.Max.Units
fNOM_LFRCNominal frequency32.768kHz
fTOL_LFRCFrequency tolerance±2%
fTOL_CAL_LFRCFrequency tolerance for LFRC after calibration1±500ppm
tSTART_LFRCStartup time for 32.768 kHz RC oscillator600us

32.768 kHz crystal oscillator (LFXO)

SymbolDescriptionMin.Typ.Max.Units
fNOM_LFXOCrystal frequency32.768kHz
fTOL_LFXO_BLEFrequency tolerance requirement for BLE stack±250ppm
fTOL_LFXO_ANTFrequency tolerance requirement for ANT stack±50ppm
CL_LFXOLoad capacitance12.5pF
C0_LFXOShunt capacitance2pF
RS_LFXOEquivalent series resistance100kohm
PD_LFXODrive level0.5uW
CpinInput capacitance on XL1 and XL2 pads4pF
tSTART_LFXOStartup time for 32.768 kHz crystal oscillator0.25s
VAMP_IN_XO_LOWPeak to peak amplitude for external low swing clock. Input signal must not swing outside supply rails.2001000mV

32.768 kHz synthesized from HFCLK (LFSYNT)

SymbolDescriptionMin.Typ.Max.Units
fNOM_LFSYNTNominal frequency32.768kHz
fTOL_LFSYNTFrequency tolerance in addition to HFLCK tolerance28ppm
tSTART_LFSYNTStartup time for synthesized 32.768 kHz100us
1 Constant temperature within ±0.5 °C and calibration performed at least every 8 seconds, defined as 3 sigma
2 Frequency tolerance will be derived from the HFCLK source clock plus the LFSYNT tolerance