13.4.1.2 XOSC32K Initialization
After a reset, the XOSC32K is disabled.
Before any peripherals can request the XOSC32K oscillator, the oscillator must be started with the following steps:
- Select the external source by writing the appropriate value to the External Source Select bit in the XOSC32K Control register (XOSC32KCTRL.XTALEN).
- Optional: If the external source is set to External Crystal (XTAL), configure the appropriate start-up time by writing to the Start-Up Time bit field in the XOSC32KCTRL register (XOSC32KCTRL.CSUT) according to the external crystal specifications.
- Enable the XOSC32K oscillator by
writing the Enable bit in the XOSC32KCTRL register (XOSC32KCTRL.ENABLE) to
‘
1’.
A crystal oscillator typically requires a long start-up time to stabilize on the correct frequency, depending on the external crystal specification. This start-up time is configured by changing the Oscillator Start-Up Time bit field in the XOSC32KCTRL register (XOSC32KCTRL.CSUT). During the start-up time, the oscillator output is masked to ensure that no unstable clock propagates to the digital logic.
The oscillator can be forced to always run by writing the ONDEMAND bit in the XOSC32KCTRL
register (XOSC32KCTRL.ONDEMAND) to ‘0’. This will cause the oscillator to
run regardless of whether it is requested by any peripheral.
