1 /***************************************************************************//**
\r
2 * @file system_efm32pg1b.h
\r
3 * @brief CMSIS Cortex-M3/M4 System Layer for EFM32 devices.
\r
5 ******************************************************************************
\r
7 * <b>Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com</b>
\r
8 ******************************************************************************
\r
10 * Permission is granted to anyone to use this software for any purpose,
\r
11 * including commercial applications, and to alter it and redistribute it
\r
12 * freely, subject to the following restrictions:
\r
14 * 1. The origin of this software must not be misrepresented; you must not
\r
15 * claim that you wrote the original software.@n
\r
16 * 2. Altered source versions must be plainly marked as such, and must not be
\r
17 * misrepresented as being the original software.@n
\r
18 * 3. This notice may not be removed or altered from any source distribution.
\r
20 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc.
\r
21 * has no obligation to support this Software. Silicon Laboratories, Inc. is
\r
22 * providing the Software "AS IS", with no express or implied warranties of any
\r
23 * kind, including, but not limited to, any implied warranties of
\r
24 * merchantability or fitness for any particular purpose or warranties against
\r
25 * infringement of any proprietary rights of a third party.
\r
27 * Silicon Laboratories, Inc. will not be liable for any consequential,
\r
28 * incidental, or special damages, or any other relief, or for any claim by
\r
29 * any third party, arising from your use of this Software.
\r
31 *****************************************************************************/
\r
33 #ifndef SYSTEM_EFM32_H
\r
34 #define SYSTEM_EFM32_H
\r
42 /*******************************************************************************
\r
43 ************************** GLOBAL VARIABLES *******************************
\r
44 ******************************************************************************/
\r
46 extern uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */
\r
47 extern uint32_t SystemHfrcoFreq; /**< System HFRCO frequency */
\r
49 /*******************************************************************************
\r
50 ***************************** PROTOTYPES **********************************
\r
51 ******************************************************************************/
\r
53 void Reset_Handler(void);
\r
54 void NMI_Handler(void);
\r
55 void HardFault_Handler(void);
\r
56 void MemManage_Handler(void);
\r
57 void BusFault_Handler(void);
\r
58 void UsageFault_Handler(void);
\r
59 void SVC_Handler(void);
\r
60 void DebugMon_Handler(void);
\r
61 void PendSV_Handler(void);
\r
62 void SysTick_Handler(void);
\r
64 void EMU_IRQHandler(void);
\r
65 void WDOG_IRQHandler(void);
\r
66 void LDMA_IRQHandler(void);
\r
67 void GPIO_EVEN_IRQHandler(void);
\r
68 void TIMER0_IRQHandler(void);
\r
69 void USART0_RX_IRQHandler(void);
\r
70 void USART0_TX_IRQHandler(void);
\r
71 void ACMP0_IRQHandler(void);
\r
72 void ADC0_IRQHandler(void);
\r
73 void IDAC0_IRQHandler(void);
\r
74 void I2C0_IRQHandler(void);
\r
75 void GPIO_ODD_IRQHandler(void);
\r
76 void TIMER1_IRQHandler(void);
\r
77 void USART1_RX_IRQHandler(void);
\r
78 void USART1_TX_IRQHandler(void);
\r
79 void LEUART0_IRQHandler(void);
\r
80 void PCNT0_IRQHandler(void);
\r
81 void CMU_IRQHandler(void);
\r
82 void MSC_IRQHandler(void);
\r
83 void LETIMER0_IRQHandler(void);
\r
84 void RTCC_IRQHandler(void);
\r
85 void CRYOTIMER_IRQHandler(void);
\r
87 #if (__FPU_PRESENT == 1)
\r
88 void FPUEH_IRQHandler(void);
\r
91 uint32_t SystemCoreClockGet(void);
\r
93 /**************************************************************************//**
\r
95 * Update CMSIS SystemCoreClock variable.
\r
98 * CMSIS defines a global variable SystemCoreClock that shall hold the
\r
99 * core frequency in Hz. If the core frequency is dynamically changed, the
\r
100 * variable must be kept updated in order to be CMSIS compliant.
\r
102 * Notice that only if changing the core clock frequency through the EFM CMU
\r
103 * API, this variable will be kept updated. This function is only provided
\r
104 * for CMSIS compliance and if a user modifies the the core clock outside
\r
106 *****************************************************************************/
\r
107 static __INLINE void SystemCoreClockUpdate(void)
\r
109 SystemCoreClockGet();
\r
112 uint32_t SystemMaxCoreClockGet(void);
\r
114 void SystemInit(void);
\r
115 uint32_t SystemHFClockGet(void);
\r
117 uint32_t SystemHFXOClockGet(void);
\r
118 void SystemHFXOClockSet(uint32_t freq);
\r
120 uint32_t SystemLFRCOClockGet(void);
\r
121 uint32_t SystemULFRCOClockGet(void);
\r
123 uint32_t SystemLFXOClockGet(void);
\r
124 void SystemLFXOClockSet(uint32_t freq);
\r
129 #endif /* SYSTEM_EFM32_H */
\r