1 /**
2 * \file
3 *
4 * \brief Low-level initialization functions called upon chip startup.
5 *
6 * Copyright (c) 2016 Atmel Corporation,
7 * a wholly owned subsidiary of Microchip Technology Inc.
8 *
9 * \asf_license_start
10 *
11 * \page License
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the Licence at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 * \asf_license_stop
26 *
27 */
28
29 #include "saml21.h"
30
31 /**
32 * Initial system clock frequency. The System RC Oscillator (RCSYS) provides
33 * the source for the main clock at chip startup.
34 */
35 #define __SYSTEM_CLOCK (4000000)
36
37 uint32_t SystemCoreClock = __SYSTEM_CLOCK;/*!< System Clock Frequency (Core Clock)*/
38
39 /**
40 * Initialize the system
41 *
42 * @brief Setup the microcontroller system.
43 * Initialize the System and update the SystemCoreClock variable.
44 */
SystemInit(void)45 void SystemInit(void)
46 {
47 // Keep the default device state after reset
48 SystemCoreClock = __SYSTEM_CLOCK;
49 return;
50 }
51
52 /**
53 * Update SystemCoreClock variable
54 *
55 * @brief Updates the SystemCoreClock with current core Clock
56 * retrieved from cpu registers.
57 */
SystemCoreClockUpdate(void)58 void SystemCoreClockUpdate(void)
59 {
60 // Not implemented
61 SystemCoreClock = __SYSTEM_CLOCK;
62 return;
63 }
64