12.2.1 NOSC and NDIV Bits

The New Oscillator Source Request (NOSC) and New Divider Selection Request (NDIV) bits are used to select the system clock source and clock frequency divider that will be used by the CPU and peripherals (see the tables below).
When new values are written into NOSC and/or NDIV, the current oscillator selection will continue to operate as the system clock while waiting for the new source to indicate that it is ready. Writes to NDIV without changing the clock source (e.g., changing the HFINTOSC frequency from 1 MHz to 2 MHz) are handled in the same manner as a clock switch.
When the new oscillator selection is ready, the New Oscillator is Ready (NOSCR) bit and the Clock Switch Interrupt Flag (CSWIF) are set by module hardware. If the Clock Switch Interrupt Enable (CSWIE) bit is set (CSWIE = 1), an interrupt will be generated when CSWIF is set. Additionally, the Oscillator Ready (ORDY) bit can be polled to determine that the clock switch has completed and the new oscillator source has replaced the old source as the system clock.
Important: The CSWIF interrupt does not wake the device from Sleep.
Table 12-2. NOSC/COSC Clock Source Selection Table
NOSC / COSCClock Source
111EXTOSC(1)
110HFINTOSC(2)
101LFINTOSC
100SOSC
011Reserved
010EXTOSC + 4xPLL(3)
001Reserved
000Reserved
Note:
  1. EXTOSC is configured via the FEXTOSC Configuration bits.
  2. HFINTOSC frequency is determined by the FRQ bits.
  3. EXTOSC must meet the PLL specifications (see the data sheet Electrical Specifications).
Table 12-3. NDIV/CDIV Clock Divider Selection Table
NDIV / CDIVClock Divider
1111-1010Reserved
1001512
1000256
0111128
011064
010132
010016
00118
00104
00012
00001