Datasheet
XOSC32K.ENABLE bit while writing to other bits may result in unpredictable behavior. The oscillator
remains enabled in all sleep modes if it has been enabled beforehand. The start-up time of the 32kHz
External Crystal Oscillator is selected by writing to the Oscillator Start-Up Time bit group
(XOSC32K.STARTUP) in the in the 32kHz External Crystal Oscillator Control register. The SYSCTRL
masks the oscillator output during the start-up time to ensure that no unstable clock propagates to the
digital logic. The 32kHz External Crystal Oscillator Ready bit (PCLKSR.XOSC32KRDY) in the Power and
Clock Status register is set when the user-selected startup time is over. An interrupt is generated on a
zero-to-one transition of PCLKSR.XOSC32KRDY if the 32kHz External Crystal Oscillator Ready bit
(INTENSET.XOSC32KRDY) in the Interrupt Enable Set Register is set.
As a crystal oscillator usually requires a very long start-up time (up to one second), the 32kHz External
Crystal Oscillator will keep running across resets, except for power-on reset (POR).
XOSC32K can provide two clock outputs when connected to a crystal. The XOSC32K has a 32.768kHz
output enabled by writing a one to the 32kHz External Crystal Oscillator 32kHz Output Enable bit
(XOSC32K.EN32K) in the 32kHz External Crystal Oscillator Control register. XOSC32K.EN32K is only
usable when XIN32 is connected to a crystal, and not when an external digital clock is applied on XIN32.
Note: Do not enter Standby mode when an oscillator is in start-up:
Wait for the OSCxRDY bit in SYSCTRL.PCLKSR register to be set before going into Standby mode.
Related Links
15. GCLK - Generic Clock Controller
17.6.4 32kHz Internal Oscillator (OSC32K) Operation
The OSC32K provides a tunable, low-speed and low-power clock source.
The OSC32K can be used as a source for the generic clock generators, as described in the GCLK –
Generic Clock Controller.
The OSC32K is disabled by default. The OSC32K is enabled by writing a one to the 32kHz Internal
Oscillator Enable bit (OSC32K.ENABLE) in the 32kHz Internal Oscillator Control register. It is disabled by
writing a zero to OSC32K.ENABLE. The OSC32K has a 32.768kHz output enabled by writing a one to
the 32kHz Internal Oscillator 32kHz Output Enable bit (OSC32K.EN32K).
The frequency of the OSC32K oscillator is controlled by the value in the 32kHz Internal Oscillator
Calibration bits (OSC32K.CALIB) in the 32kHz Internal Oscillator Control register. The OSC32K.CALIB
value must be written by the user. Flash Factory Calibration values are stored in the NVM Software
Calibration Area (refer to NVM Software Calibration Area Mapping). When writing to the Calibration bits,
the user must wait for the PCLKSR.OSC32KRDY bit to go high before the value is committed to the
oscillator.
Related Links
15. GCLK - Generic Clock Controller
10.3.2 NVM Software Calibration Area Mapping
17.6.5 32kHz Ultra Low Power Internal Oscillator (OSCULP32K) Operation
The OSCULP32K provides a tunable, low-speed and ultra-low-power clock source. The OSCULP32K is
factory-calibrated under typical voltage and temperature conditions. The OSCULP32K should be
preferred to the OSC32K whenever the power requirements are prevalent over frequency stability and
accuracy.
The OSCULP32K can be used as a source for the generic clock generators, as described in the GCLK –
Generic Clock Controller.
SAM D21 Family
SYSCTRL – System Controller
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 179