blob: 55a5fd254d6cf1a06d1ea2e9f03e71ca93910af4 [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"
31
32/**
33 * Initial system clock frequency. The System RC Oscillator (RCSYS) provides
34 * the source for the main clock at chip startup.
35 */
36#define __SYSTEM_CLOCK (48000000)
37
38uint32_t SystemCoreClock = __SYSTEM_CLOCK; /*!< System Clock Frequency (Core Clock)*/
39
40/**
41 * Initialize the system
42 *
43 * @brief Setup the microcontroller system.
44 * Initialize the System and update the SystemCoreClock variable.
45 */
46void SystemInit(void)
47{
48 // Keep the default device state after reset
49 SystemCoreClock = __SYSTEM_CLOCK;
50 return;
51}
52
53/**
54 * Update SystemCoreClock variable
55 *
56 * @brief Updates the SystemCoreClock with current core Clock
57 * retrieved from cpu registers.
58 */
59void SystemCoreClockUpdate(void)
60{
61 // Not implemented
62 SystemCoreClock = __SYSTEM_CLOCK;
63 return;
64}