PIC32MX Oscillator System Features

Last modified by Microchip on 2023/11/09 09:00

The oscillator sub-system offers many other features useful for embedded applications, such as:

Two-Speed Start-Up

To allow the accuracy of the Primary Oscillator (POSC) to be used to execute code, it is possible to use the Fast RC oscillator (FRC) as the clock source until the POSC stabilizes.

When enabled, two-speed start-up switches automatically, accounting for both the POSC's stabilization time and the Phased-Lock Loop (PLL) time (if enabled). This ensures that code can be executed in what would otherwise be dead time. When executing applications written in C, this typically means that the start-up code which prepares the stack, CPU core, and any defined variables can be started, ensuring that the application code can be reached earlier than would otherwise be possible.

Fail-Safe Clock Monitor (FSCM)

This feature monitors the clock output from the POSC. In the event that the oscillator stops operating (e.g. due to a broken crystal after heavy vibration or a short-circuit), the system will automatically switch to the FRC clock source. This ensures that the PIC32 can still continue to operate, albeit at a fraction of the desired speed. If the associated interrupts are enabled, the FSCM can generate a dedicated interrupt to signal this catastrophic oscillator failure.

Clock Switching

With a few exceptions, it is possible to switch between all clock sources and reconfigure the PLLs during run-time. For safety reasons, modifying these registers requires a special unlocking sequence to be written to certain registers, thus ensuring that the registers can’t be modified by runaway code. Once changes have been made, the registers need to be locked once more.

Power Saving Support

POSC and FRC are always disabled in Sleep mode. Whether the Secondary Oscillator (SOSC) and the Low-Power RC oscillator (LPRC) remain active depends on if they are being used by any peripheral modules. All oscillators remain active in Idle mode.

See Section 6. Oscillators of the PIC32 Family Reference Manual for more information.