CLOCK_XMC1
|
Overview
The CLOCK_XMC1 APP provides the following functionalities:
- Setting the sources of various clocks in xmc1 devices.
- Configuration of Main clock.
- Selection of fast peripheral clock.
- Selection of RTC source
- For XMC14 device, supported automatic DCO1 calibration based on external reference clock (OSC_HP/OSC_LP) during runtime to achieve a better accuracy.
- 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, 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, shows how the various clocks are derived from the source. The various clocks derived from various sources:
- Peripherals such as CCU80, CCU40, POSIF0, MATH and BCCU0 are derived from PCLK domain.
- The rest of the peripherals except RTC and WDT are derived from MCLK.
- MCLK is source of core and bus system.
- RTC and WDT are running at a frequency of 32.768 kHz from a standby clock.
Supported Devices
The APP supports below devices:
- XMC1400 Series
- XMC1300 Series
- XMC1200 Series
- XMC1100 Series
References
- XMC1400 Reference Manual
- XMC1300 Reference Manual
- XMC1200 Reference Manual
- XMC1100 Reference Manual
Limitations
None