1 /**
2  * @file    system_max32660.h
3  * @brief   System-specific header file
4  */
5 
6 /******************************************************************************
7  *
8  * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
9  * Analog Devices, Inc.),
10  * Copyright (C) 2023-2024 Analog Devices, Inc.
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  *     http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  *
24  ******************************************************************************/
25 
26 #ifndef LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32660_INCLUDE_SYSTEM_MAX32660_H_
27 #define LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32660_INCLUDE_SYSTEM_MAX32660_H_
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include <stdint.h>
34 
35 /*----------------------------------------------------------------------------
36   Define clocks
37  *----------------------------------------------------------------------------*/
38 
39 #ifndef HFX_FREQ
40 #define HFX_FREQ 32768
41 #endif
42 
43 /* NOTE: This is the nominal value for NANORING. The actual value may vary from chip to chip.
44          Update if use of this oscillator requires precise timing.*/
45 #ifndef NANORING_FREQ
46 #define NANORING_FREQ 8000
47 #endif
48 
49 #ifndef HIRC96_FREQ
50 #define HIRC96_FREQ 96000000
51 #endif
52 
53 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock)  */
54 #ifndef PeripheralClock
55 #define PeripheralClock (SystemCoreClock / 2) /*!< Peripheral Clock Frequency */
56 #endif
57 
58 /*
59  * Initialize the system
60  *
61  * @brief  Setup the microcontroller system.
62  *         Initialize the System and update the SystemCoreClock variable.
63  */
64 void SystemInit(void);
65 
66 /*
67  * Update SystemCoreClock variable
68  *
69  * @brief  Updates the SystemCoreClock with current core Clock
70  *         retrieved from cpu registers.
71  */
72 void SystemCoreClockUpdate(void);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif // LIBRARIES_CMSIS_DEVICE_MAXIM_MAX32660_INCLUDE_SYSTEM_MAX32660_H_
79