10.11.1 Oscillator Control Register

Note:
  1. Writes to this register require an unlock sequence.
  2. Direct clock switches between any Primary Oscillator mode with PLL and FRCPLL mode are not permitted. This applies to clock switches in either direction. In these instances, the application must switch to FRC mode as a transitional clock source between the two PLL modes.
  3. This bit should only be cleared in software. Setting the bit in software (= 1) will have the same effect as an actual oscillator failure and will trigger an oscillator failure trap.

Legend: y = Value set from Configuration bits on POR

Name: OSCCON(1)
Offset: 0xF84

Bit 15141312111098 
  COSC[2:0] NOSC[2:0] 
Access RRRR/WR/WR/W 
Reset 000yyy 
Bit 76543210 
 CLKLOCK LOCK CF  OSWEN 
Access R/WRR/WR/W 
Reset 0000 

Bits 14:12 – COSC[2:0] Current Oscillator Selection bits (read-only)

ValueDescription
111

Fast RC Oscillator (FRC) with Divide-by-n (FRCDIVN)

110

Backup FRC (BFRC)

101 Low-Power RC Oscillator (LPRC)
100 Reserved – default to FRC
011

Primary Oscillator (XT, HS, EC) with PLL (XTPLL, HSPLL, ECPLL)

010

Primary Oscillator (XT, HS, EC)

001

Fast RC Oscillator (FRC) with PLL (FRCPLL)

000

Fast RC Oscillator (FRC)

Bits 10:8 – NOSC[2:0]  New Oscillator Selection bits(2)

ValueDescription
111

Fast RC Oscillator (FRC) with Divide-by-n (FRCDIVN)

110

Backup FRC (BFRC)

101 Low-Power RC Oscillator (LPRC)
100

Reserved – default to FRC

011

Primary Oscillator (XT, HS, EC) with PLL (XTPLL, HSPLL, ECPLL)

010

Primary Oscillator (XT, HS, EC)

001

Fast RC Oscillator (FRC) with PLL (FRCPLL)

000

Fast RC Oscillator (FRC)

Bit 7 – CLKLOCK Clock Lock Enable bit

ValueDescription
1

If (FCKSM0 = 1), then clock and PLL configurations are locked; if (FCKSM0 = 0), then clock and PLL configurations may be modified

0

Clock and PLL selections are not locked, configurations may be modified

Bit 5 – LOCK PLL Lock Status bit (read-only)

ValueDescription
1

Indicates that PLL is in lock or PLL start-up timer is satisfied

0

Indicates that PLL is out of lock, start-up timer is in progress or PLL is disabled

Bit 3 – CF  Clock Fail Detect bit(3)

ValueDescription
1

FSCM has detected a clock failure

0

FSCM has not detected a clock failure

Bit 0 – OSWEN Oscillator Switch Enable bit

ValueDescription
1

Requests oscillator switch to the selection specified by the NOSC[2:0] bits

0

Oscillator switch is complete