1 /**************************************************************************//**
\r
2 * @file system_XMC4500.h
\r
3 * @brief Header file for the XMC4500-Series systeminit
\r
6 * @date 31. Januar 2012
\r
9 * Copyright (C) 2011 Infineon Technologies AG. All rights reserved.
\r
13 * Infineon Technologies AG (Infineon) is supplying this software for use with Infineon
\92s microcontrollers.
\r
14 * This file can be freely distributed within development tools that are supporting such microcontrollers.
\r
18 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
\r
19 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
\r
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
\r
21 * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
\r
22 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
\r
25 ******************************************************************************/
\r
28 #ifndef __SYSTEM_XMC4500_H
\r
29 #define __SYSTEM_XMC4500_H
\r
37 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
\r
40 * Initialize the system
\r
45 * @brief Setup the microcontroller system.
\r
46 * Initialize the System.
\r
48 extern void SystemInit (void);
\r
52 * Update SystemCoreClock variable
\r
57 * @brief Updates the SystemCoreClock with current core Clock
\r
58 * retrieved from cpu registers.
\r
60 extern void SystemCoreClockUpdate (void);
\r
63 /* clock definitions, do not modify! */
\r
64 #define SCU_CLOCK_CRYSTAL 1
\r
69 * mandatory clock parameters **************************************************
\r
71 /* source for clock generation
\r
72 * range: SCU_CLOCK_CRYSTAL (crystal or external clock at crystal input)
\r
74 **************************************************************************************/
\r
76 #define SCU_PLL_CLOCK_INPUT SCU_CLOCK_CRYSTAL
\r
77 #define CLOCK_OSC_HP 24000000
\r
78 #define CLOCK_CRYSTAL_FREQUENCY 12000000
\r
79 #define SYSTEM_FREQUENCY 120000000
\r
81 /* OSC_HP setup parameters */
\r
82 #define OSC_HP_MODE 0
\r
83 #define OSCHPWDGDIV 2
\r
85 /* MAIN PLL setup parameters */
\r
88 #define PLL_K1DIV 1
\r
89 #define PLL_K2DIV 3
\r
95 #define PLL_K2DIV_STEP_1 19 //PLL output is 24Mhz
\r
96 #define PLL_K2DIV_STEP_2 7 //PLL output to 60Mhz
\r
97 #define PLL_K2DIV_STEP_3 4 //PLL output to 96Mhz
\r
101 #define USBPLL_PDIV 1
\r
102 #define USBPLL_NDIV 15
\r