1 /**
2  * @file    system_max32660.h
3  * @brief   System-specific header file
4  */
5 
6 
7 /*******************************************************************************
8  * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a
11  * copy of this software and associated documentation files (the "Software"),
12  * to deal in the Software without restriction, including without limitation
13  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  * and/or sell copies of the Software, and to permit persons to whom the
15  * Software is furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included
18  * in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
24  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26  * OTHER DEALINGS IN THE SOFTWARE.
27  *
28  * Except as contained in this notice, the name of Maxim Integrated
29  * Products, Inc. shall not be used except as stated in the Maxim Integrated
30  * Products, Inc. Branding Policy.
31  *
32  * The mere transfer of this software does not imply any licenses
33  * of trade secrets, proprietary technology, copyrights, patents,
34  * trademarks, maskwork rights, or any other form of intellectual
35  * property whatsoever. Maxim Integrated Products, Inc. retains all
36  * ownership rights.
37  *
38  * $Date: 2018-12-18 15:37:22 -0600 (Tue, 18 Dec 2018) $
39  * $Revision: 40072 $
40  *
41  ******************************************************************************/
42 
43 #ifndef _SYSTEM_MAX32660_H_
44 #define _SYSTEM_MAX32660_H_
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 #include <stdint.h>
51 
52 /*----------------------------------------------------------------------------
53   Define clocks
54  *----------------------------------------------------------------------------*/
55 
56 #ifndef HFX_FREQ
57 #define HFX_FREQ                32768
58 #endif
59 
60 #ifndef NANORING_FREQ
61 #define NANORING_FREQ           8000
62 #endif
63 
64 #ifndef HIRC96_FREQ
65 #define HIRC96_FREQ             96000000
66 #endif
67 
68 extern uint32_t SystemCoreClock;    /*!< System Clock Frequency (Core Clock)  */
69 #ifndef PeripheralClock
70 #define         PeripheralClock     (SystemCoreClock /2)    /*!< Peripheral Clock Frequency */
71 #endif
72 
73 /*
74  * Initialize the system
75  *
76  * @brief  Setup the microcontroller system.
77  *         Initialize the System and update the SystemCoreClock variable.
78  */
79 void SystemInit(void);
80 
81 /*
82  * Update SystemCoreClock variable
83  *
84  * @brief  Updates the SystemCoreClock with current core Clock
85  *         retrieved from cpu registers.
86  */
87 void SystemCoreClockUpdate(void);
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif /* _SYSTEM_MAX32660_H_ */
94