# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# PIC24FJ32MC10X -- Oscillator

- 1
- 2
…
- 22
- 23
- 24
- 25
- 26
…
- 33
- 34

PIC24F Family Reference Manual
DS39700C-page 6-24 © 2009 Microchip Technology Inc.
6.9 INTERNAL LOW-POWER RC OSCILLATOR (LPRC)
The LPRC Oscillator is separate from the FRC and oscillates at a nominal frequency of 31 kHz.
LPRC is the clock source for the Power-up Timer (PWRT), Watchdog Timer (WDT) and FSCM
circuits. It may also be used to provide a low-frequency clock source option for the device in those
applications where power consumption is critical and timing accuracy is not required.
6.9.1 Enabling the LPRC Oscillator
Since it serves the PWRT clock source, the LPRC Oscillator is enabled at PORs whenever the
on-board voltage regulator is disabled. After the PWRT expires, the LPRC Oscillator will remain
on if any one of the following is true:
• The FSCM is enabled.
• The WDT is enabled.
• The LPRC Oscillator is selected as the system clock (COSC<2:0> = 100).
If none of the above is true, the LPRC will shut off after the PWRT expires.
6.10 FAIL-SAFE CLOCK MONITOR (FSCM)
The Fail-Safe Clock Monitor (FSCM) allows the device to continue to operate even in the event
of an oscillator failure. The FSCM function is enabled by programming the FCKSM (Clock Switch
and Monitor) bits in the Configuration Word 2. FSCM is only enabled when both bits are
programmed (‘00’). When FSCM is enabled, the internal LPRC Oscillator will run at all times
(except during Sleep mode).
In the event of an oscillator failure, the FSCM will generate a clock failure trap and will switch the
system clock to the FRC Oscillator. The user will then have the option to either attempt to restart
the oscillator or execute a controlled shutdown. FSCM will monitor the system clock source
regardless of its source or oscillator mode. This includes the Primary Oscillator for all oscillator
modes and the Secondary Oscillator, SOSC, when configured as the system clock.
The FSCM module takes the following actions when switching to the FRC Oscillator:
1. The COSC bits are loaded with ‘000’.
2. The CF status bit is set to indicate the clock failure.
3. The OSWEN control bit is cleared to cancel any pending clock switches.
6.10.1 FSCM Delay
On a POR, BOR or wake from Sleep mode event, a nominal delay (T FSCM) may be inserted
before the FSCM begins to monitor the system clock source. The purpose of the FSCM delay is
to provide time for the oscillator and/or PLL to stabilize when the PWRT is not utilized. The FSCM
delay will be generated after the internal System Reset signal, SYSRST
, has been released.
Refer to Section 7. “Reset” in the “PIC24F Family Reference Manual” for FSCM delay timing
information.
The T
FSCM interval is applied whenever the FSCM is enabled and the EC, HS or SOSC Oscillator
modes are selected as the system clock.
6.10.2 FSCM and Slow Oscillator Start-up
If the chosen device oscillator has a slow start-up time coming out of POR, BOR or Sleep mode,
it is possible that the FSCM delay will expire before the oscillator has started. In this case, the
FSCM will initiate a clock failure trap. As this happens, the COSC bits are loaded with the FRC
Oscillator selection. This will effectively shut off the original oscillator that was trying to start. The
user can detect this situation and initiate a clock switch back to the desired oscillator in the Trap
Service Routine (TSR).
Note: For more information about the oscillator failure trap, refer to Section 8. “Interrupts”
in the “PIC24F Family Reference Manual”.
Note: Please refer to the “Electrical Characteristics” section of the specific device data
sheet for T
FSCM specification values.

- 1
- 2
…
- 22
- 23
- 24
- 25
- 26
…
- 33
- 34