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