Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
© 2009 Microchip Technology Inc. DS39700C-page 6-29
Section 6. Oscillator
Oscillator
6
6.12 TWO-SPEED START-UP
Two-Speed Start-up is an automatic clock switching feature that is independent of the manually
controlled clock switching previously described. It helps to minimize the latency period, from
oscillator start-up to code execution, by allowing the microcontroller to use the FRC Oscillator as
a clock source until the primary clock source is available. This feature is controlled by the IESO
Configuration bit (Configuration Word 2<15>) and operates independently of the state of the
FCKSM Configuration bits.
Two-Speed Start-up is particularly useful when an external oscillator is selected by the FNOSC
Configuration bits and a crystal-based oscillator (either a Primary or Secondary Oscillator) may
have a longer start-up time. As an internal RC Oscillator, the FRC clock source is available
almost immediately following a POR or device wake-up.
With Two-Speed Start-up, the device starts executing code on POR in its default oscillator configu-
ration (FRC). It continues to operate in this mode until the external oscillator source specified by the
FNOSC Configuration bits becomes stable; at which time, it automatically switches to that source.
Two-Speed Start-up is used on wake-up from the power-saving Sleep mode. The device uses the
FRC clock source until the selected primary clock is ready. It is not used in Idle mode, as the device
will be clocked by the currently selected clock source until the primary clock source becomes available.
6.12.1 Special Considerations for Using Two-Speed Start-up
While using the FRC Oscillator in Two-Speed Start-up, the device still obeys the normal
command sequences for entering power-saving modes, including serial PWRSAV instructions. In
practice, this means that user code can change the NOSC<2:0> bit settings or issue PWRSAV
#SLEEP instructions before the OST times out. This would allow an application to briefly
wake-up, perform routine “housekeeping” tasks and return to Sleep before the device starts to
operate from the external oscillator.
User code can also check which clock source is currently providing the device clocking by check-
ing the status of the COSC<2:0> bits against the NOSC<2:0> bits. If these two sets of bits match,
the clock switch has been completed successfully and the device is running from the intended
clock source; the Primary Oscillator is providing the clock. Otherwise, FRC is providing the clock
during wake-up from Reset or Sleep mode.
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ32MC10X-Reference_Manual-Section6-Oscillator.pdf