5.4.3 Fail-Safe Condition Clearing
The Fail-Safe condition is cleared after a Reset, executing a
SLEEP
instruction or changing the NOSC and NDIV
bits. When switching to the external oscillator or PLL, the OST is restarted. While the OST
is running, the device continues to operate from the INTOSC selected in OSCCON1. When the
OST times out, the Fail-Safe condition is cleared after successfully switching to the
external clock source. The OSCFIF bit should be cleared prior to switching to the external
clock source. If the Fail-Safe condition still exists, the OSCFIF flag will again become
set by hardware.