13.4.3.1 CFD - Clock Failure Detector

The Clock Failure Detector (CFD) allows the user to monitor the external clock or crystal oscillator signal provided by the XOSC32K. The CFD detects failing operation of the XOSC32K clock with reduced latency, and supports switching to a safe clock source in case of the clock failure. The user can also switch from the safe clock back to XOSC32K in case of recovery. The safe clock is derived from the OSC32K oscillator with a configurable prescaler. This allows configuring the safe clock in order to fulfill the operative conditions of the microcontroller.

In sleep modes, the CFD operation is automatically disabled when the external oscillator is not requested to run by a peripheral. Refer to the Sleep Mode Operation section for additional information.

The user interface registers allow the CFD to be enabled, disabled, and configured. The STATUS register provides status flags for failure and clock switch conditions. The CFD can optionally trigger an interrupt or an event when a failure is detected.