Fail-Safe Clock Monitor (FSCM)
The Fail-Safe Clock Monitor (FSCM) is a hardware protection and recovery mechanism integrated into each CLKGEN and Phase-Locked Loop (PLL).
Key functions:
- Detects clock generator and PLL failures
- Automatically switches to a backup clock source on clock failure, generating an Oscillator Fail interrupt
- Helps maintain safe system operation during clock fault conditions
In addition to the FSCM, the Oscillator Module also includes a separate Clock Monitor Module for advanced clock measurement and diagnostics.
Overview and Block Diagrams
Each CLKGEN and PLL includes an FSCM to provide clock protection and maintain safe system operation. FSCM is enabled using the CLKxCON.FSCMEN and/or PLLxCON.FSCMEN configuration bits.
Key FSCM functions include:
- Automatically switching to a backup clock source
- Generating an Oscillator Fail interrupt
- Setting the associated CLKFAIL or PLLFAIL status flag
After a clock failure is detected, the fail-safe condition remains active until:
- A device Reset occurs, or
- The CLKGEN switches to a new stable clock source
| PLL FSCM Block Diagram | CLKGEN FSCM Block Diagram |
|---|---|
![]() | ![]() |
|
|
ex. PLL2CONbits.BOSC = CLK_SRC_FRC; | ex. CLK1CONbits.BOSC = CLK_SRC_FRC; |
Before enabling FSCM for CLKGEN1, the backup clock source must already be active and stable, typically using FRC or BFRC.
Clock Selection Integrity Check
Each CLKGEN and PLL includes clock selection integrity checking to help detect clock selection errors. The logic continuously verifies the active clock source selection using the COSC bits.
If an invalid or corrupted clock selection is detected:
- The SCSFAIL status bit is asserted
- A clock error interrupt, CLKEInterrupt, is generated
The device also supports fault injection for validation and safety testing:
- The CLKDIAG register can inject clock selection faults
- This allows verification of fault detection and fail-safe operation
These features help improve:
- Functional safety
- Clock selection reliability
- System robustness
Clock Monitor Module (CM) vs. FSCM
The Clock Monitor Module (CM) provides advanced clock monitoring, diagnostics, and validation, while the FSCM delivers real-time protection and automatic rollover.
| Clock Monitor (CM) | Fail-Safe Clock Monitor (FSCM) |
|---|---|
|
|
Click Play ► to listen to commentary on the differences between the CM and FSCM:
Interrupts
The FSCM and clock selection integrity checking hardware functions provide interrupt features to help improve clock safety, fault detection and system reliability. Please visit the "Oscillator Module Interrupts" page to learn more.

