External Multipurpose Crystal Oscillator (XOSC) Control

Name:
XOSCCTRL
Offset:
0x10 [ID-00001eee]
Reset:
0x0080
Access:
PAC Write-Protection
Bit15141312111098
STARTUP[3:0]AMPGCGAIN[2:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Reset00000000
Bit76543210
ONDEMANDRUNSTDBYXTALENENABLE
AccessR/WR/WR/WR/W
Reset1000

Bits 15:12 – STARTUP[3:0]: Start-Up Time

Start-Up Time

These bits select start-up time for the oscillator.

The OSCULP32K oscillator is used to clock the start-up counter.

Table 1. Start-Up Time for External Multipurpose Crystal Oscillator
STARTUP[3:0] Number of OSCULP32K Clock Cycles Number of XOSC Clock Cycles Approximate Equivalent Time [µs]
0x0 1 3 31
0x1 2 3 61
0x2 4 3 122
0x3 8 3 244
0x4 16 3 488
0x5 32 3 977
0x6 64 3 1953
0x7 128 3 3906
0x8 256 3 7813
0x9 512 3 15625
0xA 1024 3 31250
0xB 2048 3 62500µs
0xC 4096 3 125000
0xD 8192 3 250000
0xE 16384 3 500000
0xF 32768 3 1000000
Note:
  1. 1.Actual startup time is 1 OSCULP32K cycle + 3 XOSC cycles.
  2. 2.The given time neglects the three XOSC cycles before OSCULP32K cycle.

Bit 11 – AMPGC: Automatic Amplitude Gain Control

Automatic Amplitude Gain Control

Note: This bit must be set only after the XOSC has settled, indicated by the XOSC Ready flag in the Status register (STATUS.XOSCRDY).
ValueDescription
0 The automatic amplitude gain control is disabled.
1 The automatic amplitude gain control is enabled. Amplitude gain will be automatically adjusted during Crystal Oscillator operation.

Bits 10:8 – GAIN[2:0]: Oscillator Gain

Oscillator Gain

These bits select the gain for the oscillator. The listed maximum frequencies are recommendations, and might vary based on capacitive load and crystal characteristics. Those bits must be properly configured even when the Automatic Amplitude Gain Control is active.

Value Recommended Max Frequency [MHz]
0x0 2
0x1 4
0x2 8
0x3 16
0x4 30
0x5-0x7 Reserved

Bit 7 – ONDEMAND: On Demand Control

On Demand Control

The On Demand operation mode allows the oscillator to be enabled or disabled, depending on peripheral clock requests.

If the ONDEMAND bit has been previously written to '1', the oscillator will be running only when requested by a peripheral. If there is no peripheral requesting the oscillator’s clock source, the oscillator will be in a disabled state.

If On Demand is disabled, the oscillator will always be running when enabled.

In standby sleep mode, the On Demand operation is still active.

ValueDescription
0 The oscillator is always on, if enabled.
1 The oscillator is enabled when a peripheral is requesting the oscillator to be used as a clock source. The oscillator is disabled if no peripheral is requesting the clock source.

Bit 6 – RUNSTDBY: Run in Standby

Run in Standby

This bit controls how the XOSC behaves during standby sleep mode, together with the ONDEMAND bit:

ValueDescription
0 The XOSC is not running in Standby sleep mode if no peripheral requests the clock.
1 The XOSC is running in Standby sleep mode. If ONDEMAND=1, the XOSC will be running when a peripheral is requesting the clock. If ONDEMAND=0, the clock source will always be running in Standby sleep mode.

Bit 2 – XTALEN: Crystal Oscillator Enable

Crystal Oscillator Enable

This bit controls the connections between the I/O pads and the external clock or crystal oscillator:

ValueDescription
0 External clock connected on XIN. XOUT can be used as general-purpose I/O.
1 Crystal connected to XIN/XOUT.

Bit 1 – ENABLE: Oscillator Enable

Oscillator Enable

ValueDescription
0 The oscillator is disabled.
1 The oscillator is enabled.