Product Specs

Table Of Contents
19 CLOCK Clock control
Page
103
19.2 LFCLK clock controller
The system supports several low frequency clock sources.
As illustrated in Figure 17: Clock control on page 101, 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 on page
108 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 on page 108 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 on page 107 indicates a 'LFCLK running' state.
The LFCLK clock controller and all of the LFCLK clock sources are always switched off when in OFF mode.
19.2.1 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) on page 109 for details on the default and calibrated accuracy of the LFRC oscillator.
The LFRC oscillator does not require additional external components.
19.2.2 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.
19.2.3 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.
CTSTART
CTSTOP
CTIV
CTTO
Figure 19: 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.
Calibration
timer