mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG1/device/system_efr32mg1p.h@161:2cc1468da177, 2017-03-30 (annotated)
- Committer:
- <>
- Date:
- Thu Mar 30 13:45:57 2017 +0100
- Revision:
- 161:2cc1468da177
- Parent:
- 153:fa9ff456f731
This updates the lib to the mbed lib v139
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 153:fa9ff456f731 | 1 | /***************************************************************************//** |
<> | 153:fa9ff456f731 | 2 | * @file system_efr32mg1p.h |
<> | 153:fa9ff456f731 | 3 | * @brief CMSIS Cortex-M3/M4 System Layer for EFR32 devices. |
<> | 161:2cc1468da177 | 4 | * @version 5.1.2 |
<> | 153:fa9ff456f731 | 5 | ****************************************************************************** |
<> | 153:fa9ff456f731 | 6 | * @section License |
<> | 161:2cc1468da177 | 7 | * <b>Copyright 2017 Silicon Laboratories, Inc. http://www.silabs.com</b> |
<> | 153:fa9ff456f731 | 8 | ****************************************************************************** |
<> | 153:fa9ff456f731 | 9 | * |
<> | 153:fa9ff456f731 | 10 | * Permission is granted to anyone to use this software for any purpose, |
<> | 153:fa9ff456f731 | 11 | * including commercial applications, and to alter it and redistribute it |
<> | 153:fa9ff456f731 | 12 | * freely, subject to the following restrictions: |
<> | 153:fa9ff456f731 | 13 | * |
<> | 153:fa9ff456f731 | 14 | * 1. The origin of this software must not be misrepresented; you must not |
<> | 153:fa9ff456f731 | 15 | * claim that you wrote the original software.@n |
<> | 153:fa9ff456f731 | 16 | * 2. Altered source versions must be plainly marked as such, and must not be |
<> | 153:fa9ff456f731 | 17 | * misrepresented as being the original software.@n |
<> | 153:fa9ff456f731 | 18 | * 3. This notice may not be removed or altered from any source distribution. |
<> | 153:fa9ff456f731 | 19 | * |
<> | 153:fa9ff456f731 | 20 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc. |
<> | 153:fa9ff456f731 | 21 | * has no obligation to support this Software. Silicon Laboratories, Inc. is |
<> | 153:fa9ff456f731 | 22 | * providing the Software "AS IS", with no express or implied warranties of any |
<> | 153:fa9ff456f731 | 23 | * kind, including, but not limited to, any implied warranties of |
<> | 153:fa9ff456f731 | 24 | * merchantability or fitness for any particular purpose or warranties against |
<> | 153:fa9ff456f731 | 25 | * infringement of any proprietary rights of a third party. |
<> | 153:fa9ff456f731 | 26 | * |
<> | 153:fa9ff456f731 | 27 | * Silicon Laboratories, Inc. will not be liable for any consequential, |
<> | 153:fa9ff456f731 | 28 | * incidental, or special damages, or any other relief, or for any claim by |
<> | 153:fa9ff456f731 | 29 | * any third party, arising from your use of this Software. |
<> | 153:fa9ff456f731 | 30 | * |
<> | 153:fa9ff456f731 | 31 | *****************************************************************************/ |
<> | 153:fa9ff456f731 | 32 | |
<> | 153:fa9ff456f731 | 33 | #ifndef SYSTEM_EFR32_H |
<> | 153:fa9ff456f731 | 34 | #define SYSTEM_EFR32_H |
<> | 153:fa9ff456f731 | 35 | |
<> | 153:fa9ff456f731 | 36 | #ifdef __cplusplus |
<> | 153:fa9ff456f731 | 37 | extern "C" { |
<> | 153:fa9ff456f731 | 38 | #endif |
<> | 153:fa9ff456f731 | 39 | |
<> | 153:fa9ff456f731 | 40 | #include <stdint.h> |
<> | 153:fa9ff456f731 | 41 | |
<> | 153:fa9ff456f731 | 42 | /******************************************************************************* |
<> | 153:fa9ff456f731 | 43 | ************************** GLOBAL VARIABLES ******************************* |
<> | 153:fa9ff456f731 | 44 | ******************************************************************************/ |
<> | 153:fa9ff456f731 | 45 | |
<> | 153:fa9ff456f731 | 46 | extern uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */ |
<> | 153:fa9ff456f731 | 47 | extern uint32_t SystemHfrcoFreq; /**< System HFRCO frequency */ |
<> | 153:fa9ff456f731 | 48 | |
<> | 153:fa9ff456f731 | 49 | /******************************************************************************* |
<> | 153:fa9ff456f731 | 50 | ***************************** PROTOTYPES ********************************** |
<> | 153:fa9ff456f731 | 51 | ******************************************************************************/ |
<> | 153:fa9ff456f731 | 52 | |
<> | 153:fa9ff456f731 | 53 | void Reset_Handler(void); |
<> | 153:fa9ff456f731 | 54 | void NMI_Handler(void); |
<> | 153:fa9ff456f731 | 55 | void HardFault_Handler(void); |
<> | 153:fa9ff456f731 | 56 | void MemManage_Handler(void); |
<> | 153:fa9ff456f731 | 57 | void BusFault_Handler(void); |
<> | 153:fa9ff456f731 | 58 | void UsageFault_Handler(void); |
<> | 153:fa9ff456f731 | 59 | void SVC_Handler(void); |
<> | 153:fa9ff456f731 | 60 | void DebugMon_Handler(void); |
<> | 153:fa9ff456f731 | 61 | void PendSV_Handler(void); |
<> | 153:fa9ff456f731 | 62 | void SysTick_Handler(void); |
<> | 153:fa9ff456f731 | 63 | |
<> | 153:fa9ff456f731 | 64 | void EMU_IRQHandler(void); |
<> | 153:fa9ff456f731 | 65 | void FRC_PRI_IRQHandler(void); |
<> | 153:fa9ff456f731 | 66 | void WDOG0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 67 | void FRC_IRQHandler(void); |
<> | 153:fa9ff456f731 | 68 | void MODEM_IRQHandler(void); |
<> | 153:fa9ff456f731 | 69 | void RAC_SEQ_IRQHandler(void); |
<> | 153:fa9ff456f731 | 70 | void RAC_RSM_IRQHandler(void); |
<> | 153:fa9ff456f731 | 71 | void BUFC_IRQHandler(void); |
<> | 153:fa9ff456f731 | 72 | void LDMA_IRQHandler(void); |
<> | 153:fa9ff456f731 | 73 | void GPIO_EVEN_IRQHandler(void); |
<> | 153:fa9ff456f731 | 74 | void TIMER0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 75 | void USART0_RX_IRQHandler(void); |
<> | 153:fa9ff456f731 | 76 | void USART0_TX_IRQHandler(void); |
<> | 153:fa9ff456f731 | 77 | void ACMP0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 78 | void ADC0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 79 | void IDAC0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 80 | void I2C0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 81 | void GPIO_ODD_IRQHandler(void); |
<> | 153:fa9ff456f731 | 82 | void TIMER1_IRQHandler(void); |
<> | 153:fa9ff456f731 | 83 | void USART1_RX_IRQHandler(void); |
<> | 153:fa9ff456f731 | 84 | void USART1_TX_IRQHandler(void); |
<> | 153:fa9ff456f731 | 85 | void LEUART0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 86 | void PCNT0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 87 | void CMU_IRQHandler(void); |
<> | 153:fa9ff456f731 | 88 | void MSC_IRQHandler(void); |
<> | 153:fa9ff456f731 | 89 | void CRYPTO_IRQHandler(void); |
<> | 153:fa9ff456f731 | 90 | void LETIMER0_IRQHandler(void); |
<> | 153:fa9ff456f731 | 91 | void AGC_IRQHandler(void); |
<> | 153:fa9ff456f731 | 92 | void PROTIMER_IRQHandler(void); |
<> | 153:fa9ff456f731 | 93 | void RTCC_IRQHandler(void); |
<> | 153:fa9ff456f731 | 94 | void SYNTH_IRQHandler(void); |
<> | 153:fa9ff456f731 | 95 | void CRYOTIMER_IRQHandler(void); |
<> | 153:fa9ff456f731 | 96 | void RFSENSE_IRQHandler(void); |
<> | 153:fa9ff456f731 | 97 | |
<> | 153:fa9ff456f731 | 98 | #if (__FPU_PRESENT == 1) |
<> | 153:fa9ff456f731 | 99 | void FPUEH_IRQHandler(void); |
<> | 153:fa9ff456f731 | 100 | #endif |
<> | 153:fa9ff456f731 | 101 | |
<> | 153:fa9ff456f731 | 102 | uint32_t SystemCoreClockGet(void); |
<> | 153:fa9ff456f731 | 103 | |
<> | 153:fa9ff456f731 | 104 | /**************************************************************************//** |
<> | 153:fa9ff456f731 | 105 | * @brief |
<> | 153:fa9ff456f731 | 106 | * Update CMSIS SystemCoreClock variable. |
<> | 153:fa9ff456f731 | 107 | * |
<> | 153:fa9ff456f731 | 108 | * @details |
<> | 153:fa9ff456f731 | 109 | * CMSIS defines a global variable SystemCoreClock that shall hold the |
<> | 153:fa9ff456f731 | 110 | * core frequency in Hz. If the core frequency is dynamically changed, the |
<> | 153:fa9ff456f731 | 111 | * variable must be kept updated in order to be CMSIS compliant. |
<> | 153:fa9ff456f731 | 112 | * |
<> | 153:fa9ff456f731 | 113 | * Notice that only if changing the core clock frequency through the EFR CMU |
<> | 153:fa9ff456f731 | 114 | * API, this variable will be kept updated. This function is only provided |
<> | 153:fa9ff456f731 | 115 | * for CMSIS compliance and if a user modifies the the core clock outside |
<> | 153:fa9ff456f731 | 116 | * the CMU API. |
<> | 153:fa9ff456f731 | 117 | *****************************************************************************/ |
<> | 153:fa9ff456f731 | 118 | static __INLINE void SystemCoreClockUpdate(void) |
<> | 153:fa9ff456f731 | 119 | { |
<> | 153:fa9ff456f731 | 120 | SystemCoreClockGet(); |
<> | 153:fa9ff456f731 | 121 | } |
<> | 153:fa9ff456f731 | 122 | |
<> | 153:fa9ff456f731 | 123 | uint32_t SystemMaxCoreClockGet(void); |
<> | 153:fa9ff456f731 | 124 | |
<> | 153:fa9ff456f731 | 125 | void SystemInit(void); |
<> | 153:fa9ff456f731 | 126 | uint32_t SystemHFClockGet(void); |
<> | 153:fa9ff456f731 | 127 | |
<> | 153:fa9ff456f731 | 128 | uint32_t SystemHFXOClockGet(void); |
<> | 153:fa9ff456f731 | 129 | void SystemHFXOClockSet(uint32_t freq); |
<> | 153:fa9ff456f731 | 130 | |
<> | 153:fa9ff456f731 | 131 | uint32_t SystemLFRCOClockGet(void); |
<> | 153:fa9ff456f731 | 132 | uint32_t SystemULFRCOClockGet(void); |
<> | 153:fa9ff456f731 | 133 | |
<> | 153:fa9ff456f731 | 134 | uint32_t SystemLFXOClockGet(void); |
<> | 153:fa9ff456f731 | 135 | void SystemLFXOClockSet(uint32_t freq); |
<> | 153:fa9ff456f731 | 136 | |
<> | 153:fa9ff456f731 | 137 | #ifdef __cplusplus |
<> | 153:fa9ff456f731 | 138 | } |
<> | 153:fa9ff456f731 | 139 | #endif |
<> | 153:fa9ff456f731 | 140 | #endif /* SYSTEM_EFR32_H */ |