1 /***************************************************************************//**
\r
2 * @file system_efm32wg.h
\r
3 * @brief CMSIS Cortex-M4 System Layer for EFM32WG devices.
\r
5 ******************************************************************************
\r
7 * <b>(C) 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_EFM32WG_H
\r
34 #define __SYSTEM_EFM32WG_H
\r
42 /*******************************************************************************
\r
43 ************************** GLOBAL VARIABLES *******************************
\r
44 ******************************************************************************/
\r
46 extern uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */
\r
48 /*******************************************************************************
\r
49 ***************************** PROTOTYPES **********************************
\r
50 ******************************************************************************/
\r
52 /* Interrupt routines - prototypes */
\r
53 #if defined(_EFM32_WONDER_FAMILY)
\r
54 void Reset_Handler(void);
\r
55 void NMI_Handler(void);
\r
56 void HardFault_Handler(void);
\r
57 void MemManage_Handler(void);
\r
58 void BusFault_Handler(void);
\r
59 void UsageFault_Handler(void);
\r
60 void SVC_Handler(void);
\r
61 void DebugMon_Handler(void);
\r
62 void PendSV_Handler(void);
\r
63 void SysTick_Handler(void);
\r
64 void DMA_IRQHandler(void);
\r
65 void GPIO_EVEN_IRQHandler(void);
\r
66 void TIMER0_IRQHandler(void);
\r
67 void USART0_RX_IRQHandler(void);
\r
68 void USART0_TX_IRQHandler(void);
\r
69 void USB_IRQHandler(void);
\r
70 void ACMP0_IRQHandler(void);
\r
71 void ADC0_IRQHandler(void);
\r
72 void DAC0_IRQHandler(void);
\r
73 void I2C0_IRQHandler(void);
\r
74 void I2C1_IRQHandler(void);
\r
75 void GPIO_ODD_IRQHandler(void);
\r
76 void TIMER1_IRQHandler(void);
\r
77 void TIMER2_IRQHandler(void);
\r
78 void TIMER3_IRQHandler(void);
\r
79 void USART1_RX_IRQHandler(void);
\r
80 void USART1_TX_IRQHandler(void);
\r
81 void LESENSE_IRQHandler(void);
\r
82 void USART2_RX_IRQHandler(void);
\r
83 void USART2_TX_IRQHandler(void);
\r
84 void UART0_RX_IRQHandler(void);
\r
85 void UART0_TX_IRQHandler(void);
\r
86 void UART1_RX_IRQHandler(void);
\r
87 void UART1_TX_IRQHandler(void);
\r
88 void LEUART0_IRQHandler(void);
\r
89 void LEUART1_IRQHandler(void);
\r
90 void LETIMER0_IRQHandler(void);
\r
91 void PCNT0_IRQHandler(void);
\r
92 void PCNT1_IRQHandler(void);
\r
93 void PCNT2_IRQHandler(void);
\r
94 void RTC_IRQHandler(void);
\r
95 void BURTC_IRQHandler(void);
\r
96 void CMU_IRQHandler(void);
\r
97 void VCMP_IRQHandler(void);
\r
98 void LCD_IRQHandler(void);
\r
99 void MSC_IRQHandler(void);
\r
100 void AES_IRQHandler(void);
\r
101 void EBI_IRQHandler(void);
\r
102 void EMU_IRQHandler(void);
\r
103 void FPUEH_IRQHandler(void);
\r
106 uint32_t SystemCoreClockGet(void);
\r
108 /**************************************************************************//**
\r
110 * Update CMSIS SystemCoreClock variable.
\r
113 * CMSIS defines a global variable SystemCoreClock that shall hold the
\r
114 * core frequency in Hz. If the core frequency is dynamically changed, the
\r
115 * variable must be kept updated in order to be CMSIS compliant.
\r
117 * Notice that if only changing core clock frequency through the EFM32 CMU
\r
118 * API, this variable will be kept updated. This function is only provided
\r
119 * for CMSIS compliance and if a user modifies the the core clock outside
\r
121 *****************************************************************************/
\r
122 static __INLINE void SystemCoreClockUpdate(void)
\r
124 SystemCoreClockGet();
\r
127 void SystemInit(void);
\r
128 uint32_t SystemHFClockGet(void);
\r
129 uint32_t SystemHFXOClockGet(void);
\r
130 void SystemHFXOClockSet(uint32_t freq);
\r
131 uint32_t SystemLFRCOClockGet(void);
\r
132 uint32_t SystemULFRCOClockGet(void);
\r
133 uint32_t SystemLFXOClockGet(void);
\r
134 void SystemLFXOClockSet(uint32_t freq);
\r
139 #endif /* __SYSTEM_EFM32WG_H */
\r