2012-05-18 12:40:40 +08:00
|
|
|
#include "efm32g_af_pins.h"
|
|
|
|
#include "efm32g_af_ports.h"
|
|
|
|
#include "efm32g_af_channels.h"
|
|
|
|
#include "efm32g_prs_signals.h"
|
|
|
|
|
2011-02-17 11:33:15 +08:00
|
|
|
/***************************************************************************//**
|
|
|
|
* @file
|
2012-05-18 12:40:40 +08:00
|
|
|
* @brief CMSIS Cortex-M3 System Layer for EFM32G devices.
|
2011-02-17 11:33:15 +08:00
|
|
|
* @author Energy Micro AS
|
2012-05-18 12:40:40 +08:00
|
|
|
* @version 3.0.0
|
2011-02-17 11:33:15 +08:00
|
|
|
*******************************************************************************
|
|
|
|
* @section License
|
2012-05-18 12:40:40 +08:00
|
|
|
* <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
|
2011-02-17 11:33:15 +08:00
|
|
|
*******************************************************************************
|
|
|
|
*
|
2012-05-18 12:40:40 +08:00
|
|
|
* Permission is granted to anyone to use this software for any purpose,
|
|
|
|
* including commercial applications, and to alter it and redistribute it
|
|
|
|
* freely, subject to the following restrictions:
|
2011-02-17 11:33:15 +08:00
|
|
|
*
|
2012-05-18 12:40:40 +08:00
|
|
|
* 1. The origin of this software must not be misrepresented; you must not
|
|
|
|
* claim that you wrote the original software.
|
|
|
|
* 2. Altered source versions must be plainly marked as such, and must not be
|
|
|
|
* misrepresented as being the original software.
|
|
|
|
* 3. This notice may not be removed or altered from any source distribution.
|
2011-02-17 11:33:15 +08:00
|
|
|
*
|
|
|
|
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
|
|
|
* obligation to support this Software. Energy Micro AS is providing the
|
|
|
|
* Software "AS IS", with no express or implied warranties of any kind,
|
|
|
|
* including, but not limited to, any implied warranties of merchantability
|
|
|
|
* or fitness for any particular purpose or warranties against infringement
|
|
|
|
* of any proprietary rights of a third party.
|
|
|
|
*
|
|
|
|
* Energy Micro AS will not be liable for any consequential, incidental, or
|
|
|
|
* special damages, or any other relief, or for any claim by any third party,
|
|
|
|
* arising from your use of this Software.
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
2012-05-18 12:40:40 +08:00
|
|
|
#ifndef __SYSTEM_EFM32G_H
|
|
|
|
#define __SYSTEM_EFM32G_H
|
2011-02-17 11:33:15 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
************************** GLOBAL VARIABLES *******************************
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
extern uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
***************************** PROTOTYPES **********************************
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-06-20 09:56:28 +08:00
|
|
|
/* Interrupt routines - prototypes */
|
|
|
|
#if defined(_EFM32_GECKO_FAMILY)
|
|
|
|
void Reset_Handler(void);
|
|
|
|
void NMI_Handler(void);
|
|
|
|
void HardFault_Handler(void);
|
|
|
|
void MemManage_Handler(void);
|
|
|
|
void BusFault_Handler(void);
|
|
|
|
void UsageFault_Handler(void);
|
|
|
|
void SVC_Handler(void);
|
|
|
|
void DebugMon_Handler(void);
|
|
|
|
void PendSV_Handler(void);
|
|
|
|
void SysTick_Handler(void);
|
|
|
|
void DMA_IRQHandler(void);
|
|
|
|
void GPIO_EVEN_IRQHandler(void);
|
|
|
|
void TIMER0_IRQHandler(void);
|
|
|
|
void USART0_RX_IRQHandler(void);
|
|
|
|
void USART0_TX_IRQHandler(void);
|
|
|
|
void ACMP0_IRQHandler(void);
|
|
|
|
void ADC0_IRQHandler(void);
|
|
|
|
void DAC0_IRQHandler(void);
|
|
|
|
void I2C0_IRQHandler(void);
|
|
|
|
void GPIO_ODD_IRQHandler(void);
|
|
|
|
void TIMER1_IRQHandler(void);
|
|
|
|
void TIMER2_IRQHandler(void);
|
|
|
|
void USART1_RX_IRQHandler(void);
|
|
|
|
void USART1_TX_IRQHandler(void);
|
|
|
|
void USART2_RX_IRQHandler(void);
|
|
|
|
void USART2_TX_IRQHandler(void);
|
|
|
|
void UART0_RX_IRQHandler(void);
|
|
|
|
void UART0_TX_IRQHandler(void);
|
|
|
|
void LEUART0_IRQHandler(void);
|
|
|
|
void LEUART1_IRQHandler(void);
|
|
|
|
void LETIMER0_IRQHandler(void);
|
|
|
|
void PCNT0_IRQHandler(void);
|
|
|
|
void PCNT1_IRQHandler(void);
|
|
|
|
void PCNT2_IRQHandler(void);
|
|
|
|
void RTC_IRQHandler(void);
|
|
|
|
void CMU_IRQHandler(void);
|
|
|
|
void VCMP_IRQHandler(void);
|
|
|
|
void LCD_IRQHandler(void);
|
|
|
|
void MSC_IRQHandler(void);
|
|
|
|
void AES_IRQHandler(void);
|
|
|
|
#endif
|
|
|
|
|
2011-02-17 11:33:15 +08:00
|
|
|
uint32_t SystemCoreClockGet(void);
|
|
|
|
|
|
|
|
/**************************************************************************//**
|
|
|
|
* @brief
|
|
|
|
* Update CMSIS SystemCoreClock variable.
|
|
|
|
*
|
|
|
|
* @details
|
|
|
|
* CMSIS defines a global variable SystemCoreClock that shall hold the
|
|
|
|
* core frequency in Hz. If the core frequency is dynamically changed, the
|
|
|
|
* variable must be kept updated in order to be CMSIS compliant.
|
|
|
|
*
|
|
|
|
* Notice that if only changing core clock frequency through the EFM32 CMU
|
|
|
|
* API, this variable will be kept updated. This function is only provided
|
|
|
|
* for CMSIS compliance and if a user modifies the the core clock outside
|
|
|
|
* the CMU API.
|
|
|
|
*****************************************************************************/
|
|
|
|
static __INLINE void SystemCoreClockUpdate(void)
|
|
|
|
{
|
|
|
|
SystemCoreClockGet();
|
|
|
|
}
|
|
|
|
|
2011-06-20 09:56:28 +08:00
|
|
|
void SystemInit(void);
|
|
|
|
uint32_t SystemHFClockGet(void);
|
2011-02-17 11:33:15 +08:00
|
|
|
uint32_t SystemHFXOClockGet(void);
|
|
|
|
void SystemHFXOClockSet(uint32_t freq);
|
|
|
|
uint32_t SystemLFRCOClockGet(void);
|
2011-06-20 09:56:28 +08:00
|
|
|
uint32_t SystemULFRCOClockGet(void);
|
2011-02-17 11:33:15 +08:00
|
|
|
uint32_t SystemLFXOClockGet(void);
|
|
|
|
void SystemLFXOClockSet(uint32_t freq);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-05-18 12:40:40 +08:00
|
|
|
#endif /* __SYSTEM_EFM32G_H */
|