CLOCK_XMC1: Overview

CLOCK XMC1

CLOCK_XMC1
Overview

Overview

The CLOCK_XMC1 APP provides the following functionalities:

  1. Setting the sources of various clocks in xmc1 devices.
  2. Configuration of Main clock.
  3. Selection of fast peripheral clock.
  4. Selection of RTC source
  5. For XMC14 device, supported automatic DCO1 calibration based on external reference clock (OSC_HP/OSC_LP) during runtime to achieve a better accuracy.
  6. Runtime clock changes are supported.

Main clock (MCLK) is calculated using following formula:

For XMC11/XMC12/XMC13 Device:

MCLK = dco_clk / (2*(IDIV + FDIV/256)) for IDIV>0

Here dco_dclk is output of the digitally controlled oscillator(DCO) which is equal to 64MHz and MCLK is required frequency.
where IDIV is 8-bit integer divider and FDIV is 8-bit fractional divider.

For XMC14 Device:

MCLK = DCLK / (2*(IDIV + FDIV/1024)) for IDIV>0

Here DCLK is output of the doubler clock which is equal to twice of DCLK clock source frequency and MCLK is required frequency.
where IDIV is 8-bit integer divider and FDIV is 10-bit fractional divider.

Note: By default the SystemInit() calls the weak API SystemCoreClockSetup(), which is presented in system_XMC1x.c file. When the CLOCK_XMC1 is used in the project, then SystemInit() calls the SystemCoreClockSetup(), which is presented in CLOCK_XMC1 APP. This APP do not provides data structure, enums and APIs.

Figure 1 : Hardware and Software connectivity of CLOCK_XMC1 APP

Figure 1, shows how the APP is structured in DAVEā„¢. The CLOCK_XMC1 APP uses SCU module to generate a various clocks such as: MCLK, PCLK, Standby clock etc.

Figure 2 : Clock selection & generation unit

Figure 2, shows how the various clocks are derived from the source. The various clocks derived from various sources:

  1. Peripherals such as CCU80, CCU40, POSIF0, MATH and BCCU0 are derived from PCLK domain.
  2. The rest of the peripherals except RTC and WDT are derived from MCLK.
  3. MCLK is source of core and bus system.
  4. RTC and WDT are running at a frequency of 32.768 kHz from a standby clock.

Supported Devices

The APP supports below devices:

  1. XMC1400 Series
  2. XMC1300 Series
  3. XMC1200 Series
  4. XMC1100 Series


References

  1. XMC1400 Reference Manual
  2. XMC1300 Reference Manual
  3. XMC1200 Reference Manual
  4. XMC1100 Reference Manual

Limitations
None