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 | XTALEN | ENABLE | ||||||
Access | R/W | R/W | R/W | R/W | |||||
Reset | 1 | 0 | 0 | 0 |
Start-Up Time
These bits select start-up time for the oscillator according to the table below.
The OSCULP32K oscillator is used to clock the start-up counter.
STARTUP[3:0] | Number of OSCULP32K Clock Cycles | Number of XOSC Clock Cycles | Approximate Equivalent Time(1)(2)(3) |
---|---|---|---|
0x0 | 1 | 3 | 31 μs |
0x1 | 2 | 3 | 61 μs |
0x2 | 4 | 3 | 122 μs |
0x3 | 8 | 3 | 244 μs |
0x4 | 16 | 3 | 488 μs |
0x5 | 32 | 3 | 977 μs |
0x6 | 64 | 3 | 1953 μs |
0x7 | 128 | 3 | 3906 μs |
0x8 | 256 | 3 | 7813 μs |
0x9 | 512 | 3 | 15625 μs |
0xA | 1024 | 3 | 31250 μs |
0xB | 2048 | 3 | 62500 μs |
0xC | 4096 | 3 | 125000 μs |
0xD | 8192 | 3 | 250000 μs |
0xE | 16384 | 3 | 500000 μs |
0xF | 32768 | 3 | 1000000 μs |
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. These bits must be properly configured even when the Automatic Amplitude Gain Control is active.
GAIN[2:0] | Recommended Max Frequency |
---|---|
0x0 | 2 MHz |
0x1 | 4 MHz |
0x2 | 8 MHz |
0x3 | 16 MHz |
0x4 | 30 MHz |
0x5-0x7 | Reserved |
On Demand Control
The On Demand operation mode allows an oscillator to be enabled or disabled, depending on peripheral clock requests.
In On Demand operation mode (i.e., if the XOSC.ONDEMAND bit has been previously written to one), 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 if the XOSC.RUNSTDBY bit is one. If XOSC.RUNSTDBY is zero, the oscillator is disabled.
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:
Value | Description |
---|---|
0 | The oscillator is disabled in Standby Sleep mode. |
1 | The oscillator is not stopped in Standby Sleep mode. If XOSC.ONDEMAND is one, the clock source will be running when a peripheral is requesting the clock. If XOSC.ONDEMAND is zero, the clock source will always be running in Standby Sleep mode. |
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 |