1.9.2 Clock Generator (CLOCK)

The PIC32CZ_CA clock system has the following modules and features:

Clock sources, i.e. oscillators controlled by OSCCTRL and OSC32KCTRL.

  • A clock source provides a time base that is used by other components, such as Generic Clock Generators. Example clock sources are the external crystal oscillator (XOSC) and the Digital Frequency Locked Loop (DFLL48M).

  • There are also 2 DPLL's available as clock sources. One is for system functions and one with a Fractional Divider for audio applications.

  • Generic Clock Controller (GCLK), which generates, controls and distributes the asynchronous clock consisting of:

    • Generic Clock Generators

    • Generic Clocks

  • The MCLK generates and controls the synchronous clocks on the system. This includes the CPU, bus clocks (APB, AHB) as well as the synchronous (to the CPU) user interfaces of the peripherals. It contains clock masks that can turn on/off the user interface of a peripheral as well as pre-scalers for the CPU and bus clocks

  • Start-up 6Mhz Clock

    • This clock is used during the power up sequence of the device by the SUL and SUPC macros.

Using The Library

The Clock peripheral library initializes the clock system as configured by the user in the MHC easy view.

Library Interface

Clock Generator peripheral library provides the following interfaces:

Functions

Name Description
CLOCK_Initialize Initializes hardware of the System Clock and Peripheral Clock