12 OSC - Oscillator Module (With Fail-Safe Clock Monitor)
The oscillator module contains multiple clock sources and selection features that allow it to be used in a wide range of applications while maximizing performance and minimizing power consumption.
- External clock oscillators
- Quartz crystal resonators
- Ceramic resonators
- Secondary Oscillator (SOSC)
- High-Frequency Internal Oscillator (HFINTOSC)
- Low-Frequency Internal Oscillator (LFINTOSC)
- Analog-to-Digital Converter RC Oscillator (ADCRC)
- Oscillator Start-up Timer (OST): Ensures stability of quartz crystal or ceramic resonators
- 4x Phase-Locked Loop (PLL): Frequency multiplier for external clock sources
- HFINTOSC Frequency Adjustment: Provides the ability to adjust the HFINTOSC frequency
- Clock switching: Allows the system clock to switch between internal or external sources via software during run time
- Fail-Safe Clock Monitor (FSCM): Designed to detect a failure of the system clock (FOSC), primary external clock (EXTOSC) or secondary external clock (SOSC) sources. The FSCM automatically switches to an internal clock source upon detection of a FOSC failure.
The Reset Oscillator (RSTOSC) Configuration bits determine the type of oscillator that will be used when the device runs after a Reset, including when the device is first powered up (see the table below).
RSTOSC | SFR Reset Values | Clock Source | ||
NOSC / COSC | NDIV / CDIV | OSCFRQ | ||
111 |
111 |
0000 (1:1) |
0010
(4 MHz) |
EXTOSC per FEXTOSC |
110 |
110 |
0010 (4:1) |
HFINTOSC @ 1 MHz | |
101 |
101 |
0000 (1:1) |
LFINTOSC | |
100 |
100 |
0000 (1:1) |
SOSC | |
011 |
Reserved | |||
010 |
010 |
0000 (1:1) |
0010 (4 MHz) |
EXTOSC + 4x PLL(1) |
001 |
Reserved | |||
000 |
000 |
0000 (1:1) |
1000 (64 MHz) |
HFINTOSC @ 64 MHz |
- EXTOSC must meet the PLL specifications (see the data sheet Electrical Specifications).
- ECL: External Clock Low-Power mode
- ECM: External Clock Medium-Power mode
- ECH: External Clock High-Power mode
- LP: 32 kHz Low-Gain Crystal mode
- XT: Medium-Gain Crystal or Ceramic Resonator mode
- HS: High-Gain Crystal or Ceramic Resonator mode
The ECH, ECM and ECL modes rely on an external logic-level signal as the device clock source. The LP, XT and HS modes rely on an external quartz crystal or ceramic resonator as the device clock source. Each mode is optimized for a specific frequency range. The internal oscillator block produces both low-frequency and high-frequency clock signals, designated LFINTOSC and HFINTOSC, respectively. Multiple system operating frequencies may be derived from these clock sources.
The figure below illustrates a block diagram of the oscillator module.