9.3 Clock

This section provides configuration information for PIC32CX -BZ2 and WBZ45 family devices.

For details regarding the operation of the clock module, refer to the “Clock and Reset Unit(CRU)” chapter in the specific PIC32CX -BZ2 device Data Sheet(DS70005504A).

The following figure illustrates the configuration screen for PIC32CX -BZ2 and WBZ45 family devices.

Configuring the System Clock Frequency

Description

Supports the following as system clock sources:

  • – 16 MHz Primary Crystal Oscillator (POSC)

  • – 8 MHz Fast RC Oscillator (FRC)

  • – 32 kHz Low Power RC Oscillator (LPRC)

  • – 32.768 kHz Secondary Crystal Oscillator (SOSC)

  • – 96 MHz System PLL (RFPLL)

Primary Oscillator (POSC) and Secondary Oscillator (SOSC) are customizable external clock source.

Figure 9-13. .

Most peripherals can utilize either the Peripheral Bus Clocks or the Reference Clock Generator as clock source.

Configuring the Peripheral Clock

Three Peripheral Bus Clocks, generated by independent integer dividers of the sys_clk:

  • pb1_clk

  • pb2_clk

  • pb3_clk

Peripheral Bus clock frequency is derived from SYSCLK and can be scaled using this Postscaler as shown in the above screenshot. The system and peripheral clocks are stopped when in Sleep low power mode. The clocks are restarted by disabling the sleep enable. User can configure the reference clock for peripherals as shown below.

Configuring the Reference Clock

Six Reference output clocks (REFO1-REFO6) with the following clock sources.

  • System clock

  • PB1 Bus clock

  • 16 MHz Primary Crystal Oscillator (POSC)

  • 8 MHz Fast RC Oscillator (FRC)

  • 32 kHz Low Power RC Oscillator (LPRC)

  • 32.768 kHz Secondary Crystal Oscillator (SOSC)

  • 96 MHz System PLL (RFPLL)

  • 64 MHz System PLL (RFPLL PGM MHz)

  • REFI Pin

  1. Select reference clock option from REFCLK1-REFCLK6.

  2. Turn on selected REFCLK as shown in the above screenshot.

  3. Select your reference clock source option from drop down list.

  4. User can enable "Run in sleep mode" by selecting this option as shown in the above screenshot.

  5. Use Auto-calculate button to generate required perpheral frequency.

  6. Click on Peripheral clock Configuration and verify your peripheral clock source and the frequency.