The power-fail comparator (POF) can provide the CPU with an early warning of an impending power supply failure.
The POF can be used to signal the application when the supply voltage drops below a configured threshold. The POF will not reset the system, but give the CPU time to prepare for an orderly power-down. The following figure shows the main elements of the POF.
Using the POF is optional, and must be enabled and configured through the register POFCON (Retained).
Depending on the supply mode (see Power supply modes and regulators), the thresholds VPOF and VPOFH must be configured to a suitable level through the POFCON register. When the supply voltage falls below the defined threshold, the POF generates the event POFWARN that is sent to the POWER module within both the application and network cores. Software running on both cores uses this signal to prepare for a power failure. This event is also generated when the supply voltage is below the threshold at the time the power-fail comparator is enabled, or if the threshold is reconfigured to a level above the supply voltage.
If the POF is enabled and the supply voltage is below the threshold, the POF prevents the NVMC from performing write operations to the NVM.
To save power, the power-fail comparator is not active in System OFF or in System ON when HFCLK is not running.
The POF features a hysteresis of VPOFHYST, as illustrated in the following figure.
The POF hysteresis voltage is defined with the VPOFHYST parameter in Electrical specification.