Jump to main content

##

# 3.8.5 Clock Generator (CLOCK)

The PIC32CM SG/GC 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 is 1 DPLL available as clock source. 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) and AXI 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

## Using the Library

- The Clock peripheral library initializes the clock system as configured by the user in the MCC 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