EFM32 Pearl Gecko Software Documentation  efm32pg1-doc-4.2.1
system_efm32pg1b.h File Reference

CMSIS Cortex-M3/M4 System Layer for EFM32 devices. More...

#include <stdint.h>

Go to the source code of this file.

Functions

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 EMU_IRQHandler (void)
 
void WDOG_IRQHandler (void)
 
void LDMA_IRQHandler (void)
 
void GPIO_EVEN_IRQHandler (void)
 
void TIMER0_IRQHandler (void)
 TIMER0 interrupt handler. More...
 
void USART0_RX_IRQHandler (void)
 
void USART0_TX_IRQHandler (void)
 
void ACMP0_IRQHandler (void)
 
void ADC0_IRQHandler (void)
 Interrupt handler is executed with frequency ~28Hz when panel is not pressed and with frequency ~140Hz when panel is pressed - this will give ~50 readings per second.
 
void IDAC0_IRQHandler (void)
 
void I2C0_IRQHandler (void)
 
void GPIO_ODD_IRQHandler (void)
 
void TIMER1_IRQHandler (void)
 
void USART1_RX_IRQHandler (void)
 
void USART1_TX_IRQHandler (void)
 
void LEUART0_IRQHandler (void)
 
void PCNT0_IRQHandler (void)
 
void CMU_IRQHandler (void)
 
void MSC_IRQHandler (void)
 
void LETIMER0_IRQHandler (void)
 
void RTCC_IRQHandler (void)
 
void CRYOTIMER_IRQHandler (void)
 
uint32_t SystemCoreClockGet (void)
 Get the current core clock frequency. More...
 
static __INLINE void SystemCoreClockUpdate (void)
 Update CMSIS SystemCoreClock variable. More...
 
uint32_t SystemMaxCoreClockGet (void)
 Get the maximum core clock frequency. More...
 
void SystemInit (void)
 Initialize the system. More...
 
uint32_t SystemHFClockGet (void)
 Get the current HFCLK frequency. More...
 
uint32_t SystemHFXOClockGet (void)
 Get high frequency crystal oscillator clock frequency for target system. More...
 
void SystemHFXOClockSet (uint32_t freq)
 Set high frequency crystal oscillator clock frequency for target system. More...
 
uint32_t SystemLFRCOClockGet (void)
 Get low frequency RC oscillator clock frequency for target system. More...
 
uint32_t SystemULFRCOClockGet (void)
 Get ultra low frequency RC oscillator clock frequency for target system. More...
 
uint32_t SystemLFXOClockGet (void)
 Get low frequency crystal oscillator clock frequency for target system. More...
 
void SystemLFXOClockSet (uint32_t freq)
 Set low frequency crystal oscillator clock frequency for target system. More...
 

Variables

uint32_t SystemCoreClock
 System System Clock Frequency (Core Clock). More...
 
uint32_t SystemHfrcoFreq
 System HFRCO frequency. More...
 

Detailed Description

Version
4.2.1

License

Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com

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:

  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.

DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc. has no obligation to support this Software. Silicon Laboratories, Inc. 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.

Silicon Laboratories, Inc. 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.

Definition in file system_efm32pg1b.h.

Function Documentation

void TIMER0_IRQHandler ( void  )

When TIMER0 expires the number of pulses on TIMER1 is inserted into channelValues. If this values is bigger than what is recorded in channelMaxValues, channelMaxValues is updated. Finally, the next ACMP channel is selected.

Definition at line 92 of file capsense.c.

References channelMaxValues, channelValues, currentChannel, TIMER0, TIMER1, TIMER_CMD_STOP, and TIMER_IFC_OF.

uint32_t SystemCoreClockGet ( void  )

Calculate and get the current core clock frequency based on the current configuration. Assuming that the SystemCoreClock global variable is maintained, the core clock frequency is stored in that variable as well. This function will however calculate the core clock based on actual HW configuration. It will also update the SystemCoreClock global variable.

Note
This is an EFM32 proprietary function, not part of the CMSIS definition.
Returns
The current core clock frequency in Hz.

Definition at line 137 of file system_efm32pg1b.c.

References _CMU_HFCOREPRESC_PRESC_MASK, _CMU_HFCOREPRESC_PRESC_SHIFT, CMU, SystemCoreClock, and SystemHFClockGet().

Referenced by CMU_ClockDivSet(), CMU_ClockFreqGet(), CMU_ClockPrescSet(), CMU_ClockSelectSet(), MSC_Init(), SystemCoreClockUpdate(), SystemHFXOClockSet(), SystemLFXOClockSet(), TFT_AddressMappedInit(), and TFT_DirectInit().

static __INLINE void SystemCoreClockUpdate ( void  )
static

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 only if changing the core clock frequency through the EFM 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.

Definition at line 107 of file system_efm32pg1b.h.

References SystemCoreClockGet().

Referenced by CAPLESENSE_setupCMU(), EMU_EnterEM2(), and EMU_EnterEM3().

uint32_t SystemMaxCoreClockGet ( void  )
Note
This is an EFM32 proprietary function, not part of the CMSIS definition.
Returns
The maximum core clock frequency in Hz.

Definition at line 164 of file system_efm32pg1b.c.

void SystemInit ( void  )

Do required generic HW system init.

Note
This function is invoked during system init, before the main() routine and any data has been initialized. For this reason, it cannot do any initialization of variables etc.

Definition at line 286 of file system_efm32pg1b.c.

uint32_t SystemHFClockGet ( void  )
Note
This is an EFM32 proprietary function, not part of the CMSIS definition.
Returns
The current HFCLK frequency in Hz.

Definition at line 181 of file system_efm32pg1b.c.

References _CMU_HFCLKSTATUS_SELECTED_MASK, CMU, CMU_HFCLKSTATUS_SELECTED_HFXO, CMU_HFCLKSTATUS_SELECTED_LFRCO, CMU_HFCLKSTATUS_SELECTED_LFXO, EFM32_LFRCO_FREQ, and SystemHfrcoFreq.

Referenced by CMU_ClockFreqGet(), and SystemCoreClockGet().

uint32_t SystemHFXOClockGet ( void  )
Note
This is an EFM32 proprietary function, not part of the CMSIS definition.
Returns
HFXO frequency in Hz.

Definition at line 230 of file system_efm32pg1b.c.

Referenced by CMU_ClockSelectSet().

void SystemHFXOClockSet ( uint32_t  freq)
Note
This function is mainly provided for being able to handle target systems with different HF crystal oscillator frequencies run-time. If used, it should probably only be used once during system startup.
This is an EFM32 proprietary function, not part of the CMSIS definition.
Parameters
[in]freqHFXO frequency in Hz used for target.

Definition at line 256 of file system_efm32pg1b.c.

References _CMU_HFCLKSTATUS_SELECTED_MASK, CMU, CMU_HFCLKSTATUS_SELECTED_HFXO, and SystemCoreClockGet().

uint32_t SystemLFRCOClockGet ( void  )
Note
This is an EFM32 proprietary function, not part of the CMSIS definition.
Returns
LFRCO frequency in Hz.

Definition at line 306 of file system_efm32pg1b.c.

References EFM32_LFRCO_FREQ.

uint32_t SystemULFRCOClockGet ( void  )
Note
This is an EFM32 proprietary function, not part of the CMSIS definition.
Returns
ULFRCO frequency in Hz.

Definition at line 325 of file system_efm32pg1b.c.

uint32_t SystemLFXOClockGet ( void  )
Note
This is an EFM32 proprietary function, not part of the CMSIS definition.
Returns
LFXO frequency in Hz.

Definition at line 342 of file system_efm32pg1b.c.

void SystemLFXOClockSet ( uint32_t  freq)
Note
This function is mainly provided for being able to handle target systems with different HF crystal oscillator frequencies run-time. If used, it should probably only be used once during system startup.
This is an EFM32 proprietary function, not part of the CMSIS definition.
Parameters
[in]freqLFXO frequency in Hz used for target.

Definition at line 368 of file system_efm32pg1b.c.

References _CMU_HFCLKSTATUS_SELECTED_MASK, CMU, CMU_HFCLKSTATUS_SELECTED_LFXO, and SystemCoreClockGet().

Variable Documentation

uint32_t SystemCoreClock

System Clock Frequency (Core Clock)

(DO_NOT_INCLUDE_WITH_DOXYGEN)

Required CMSIS global variable that must be kept up-to-date.

Definition at line 100 of file system_efm32pg1b.c.

Referenced by SystemCoreClockGet().

uint32_t SystemHfrcoFreq

System HFRCO frequency

Note
This is an EFM32 proprietary variable, not part of the CMSIS definition.

Frequency of the system HFRCO oscillator

Definition at line 113 of file system_efm32pg1b.c.

Referenced by CMU_HFRCOFreqGet(), CMU_HFRCOFreqSet(), and SystemHFClockGet().