External Multipurpose Crystal Oscillator (XOSC) Control
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
STARTUP[3:0] | AMPGC | GAIN[2:0] | |||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W | |
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
ONDEMAND | RUNSTDBY | SWBACK | CFDEN | XTALEN | ENABLE | ||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | |||
Reset | 1 | 0 | 0 | 0 | 0 | 0 |
Start-Up Time
This bit field selects the XOSC crystal oscillator stabilization time.
STARTUP[3:0] | Number of OSCULP32K Clock Cycles | Approximate Equivalent Time (2) [µs] |
---|---|---|
0x0 | 1 | 31 |
0x1 | 2 | 61 |
0x2 | 4 | 122 |
0x3 | 8 | 244 |
0x4 | 16 | 488 |
0x5 | 32 | 977 |
0x6 | 64 | 1953 |
0x7 | 128 | 3906 |
0x8 | 256 | 7813 |
0x9 | 512 | 15625 |
0xA | 1024 | 31250 |
0xB | 2048 | 62500µs |
0xC | 4096 | 125000 |
0xD | 8192 | 250000 |
0xE | 16384 | 500000 |
0xF | 32768 | 1000000 |
Automatic Amplitude Gain Control
Value | Description |
---|---|
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. |
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 |
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.
Value | Description |
---|---|
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. |
Run in Standby
This bit controls how the XOSC behaves during Standby Sleep mode, together with the ONDEMAND bit:
Value | Description |
---|---|
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. |
Clock Switch Back
This bit controls the XOSC output switch back to the external clock or crystal oscillator in case of clock recovery:
Value | Description |
---|---|
0 | The clock switch back is disabled. |
1 | The clock switch back is enabled. This bit is reset once the XOSC output clock is switched back to the external clock or crystal oscillator. |
Clock Failure Detector Enable
This bit controls the clock failure detector:
Value | Description |
---|---|
0 | The Clock Failure Detector is disabled. |
1 |
the Clock Failure Detector is enabled. |
Crystal Oscillator Enable
This bit controls the connections between the I/O pads and the external clock or crystal oscillator:
Value | Description |
---|---|
0 | External clock connected on XIN. XOUT can be used as general-purpose I/O. |
1 | Crystal connected to XIN/XOUT. |
Oscillator Enable
Value | Description |
---|---|
0 | The oscillator is disabled. |
1 | The oscillator is enabled. |