EFM32 Pearl Gecko 12 Software Documentation
efm32pg12-doc-5.1.2
|
CMSIS Cortex-M3/M4 System Layer for EFM32 devices.
Copyright 2017 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:
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_efm32pg12b.c.
Go to the source code of this file.
Macros | |
#define | EFM32_HFRCO_MAX_FREQ (38000000UL) |
#define | EFM32_HFRCO_STARTUP_FREQ (19000000UL) |
#define | EFM32_HFXO_FREQ (40000000UL) |
#define | EFM32_LFRCO_FREQ (32768UL) |
#define | EFM32_LFXO_FREQ (EFM32_LFRCO_FREQ) |
#define | EFM32_ULFRCO_FREQ (1000UL) |
Functions | |
uint32_t | SystemCoreClockGet (void) |
Get the current core clock frequency. 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... | |
void | SystemInit (void) |
Initialize the system. More... | |
uint32_t | SystemLFRCOClockGet (void) |
Get 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... | |
uint32_t | SystemMaxCoreClockGet (void) |
Get the maximum core clock frequency. More... | |
uint32_t | SystemULFRCOClockGet (void) |
Get ultra low frequency RC oscillator clock frequency for target system. More... | |
Variables | |
uint32_t | SystemCoreClock |
System System Clock Frequency (Core Clock). More... | |
uint32_t | SystemHfrcoFreq = EFM32_HFRCO_STARTUP_FREQ |
System HFRCO frequency. More... | |
#define EFM32_LFRCO_FREQ (32768UL) |
LFRCO frequency, tuned to below frequency during manufacturing.
Definition at line 41 of file system_efm32pg12b.c.
Referenced by SystemHFClockGet(), and SystemLFRCOClockGet().
#define EFM32_LFXO_FREQ (EFM32_LFRCO_FREQ) |
(DO_NOT_INCLUDE_WITH_DOXYGEN)
Definition at line 78 of file system_efm32pg12b.c.
uint32_t SystemCoreClockGet | ( | void | ) |
Get the current core clock frequency.
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.
Definition at line 137 of file system_efm32pg12b.c.
References _CMU_HFCOREPRESC_PRESC_MASK, _CMU_HFCOREPRESC_PRESC_SHIFT, CMU, SystemCoreClock, and SystemHFClockGet().
Referenced by CMU_ClockDivSet(), CMU_ClockFreqGet(), CMU_ClockPrescSet(), CMU_ClockSelectSet(), CMU_HFRCOBandSet(), MSC_Init(), SystemCoreClockUpdate(), SystemHFXOClockSet(), SystemLFXOClockSet(), TFT_AddressMappedInit(), and TFT_DirectInit().
uint32_t SystemHFClockGet | ( | void | ) |
Get the current HFCLK frequency.
Definition at line 181 of file system_efm32pg12b.c.
References _CMU_HFCLKSTATUS_SELECTED_MASK, _CMU_HFPRESC_PRESC_MASK, _CMU_HFPRESC_PRESC_SHIFT, CMU, CMU_HFCLKSTATUS_SELECTED_HFXO, CMU_HFCLKSTATUS_SELECTED_LFRCO, CMU_HFCLKSTATUS_SELECTED_LFXO, EFM32_LFRCO_FREQ, and SystemHfrcoFreq.
Referenced by CMU_ClockDivSet(), CMU_ClockFreqGet(), EMU_VScaleEM01(), EMU_VScaleEM01ByClock(), and SystemCoreClockGet().
uint32_t SystemHFXOClockGet | ( | void | ) |
Get high frequency crystal oscillator clock frequency for target system.
Definition at line 231 of file system_efm32pg12b.c.
Referenced by CMU_ClockSelectSet(), and CMU_HFXOAutostartEnable().
void SystemHFXOClockSet | ( | uint32_t | freq | ) |
Set high frequency crystal oscillator clock frequency for target system.
[in] | freq | HFXO frequency in Hz used for target. |
Definition at line 257 of file system_efm32pg12b.c.
References _CMU_HFCLKSTATUS_SELECTED_MASK, CMU, CMU_HFCLKSTATUS_SELECTED_HFXO, and SystemCoreClockGet().
void SystemInit | ( | void | ) |
Initialize the system.
Do required generic HW system init.
Definition at line 287 of file system_efm32pg12b.c.
uint32_t SystemLFRCOClockGet | ( | void | ) |
Get low frequency RC oscillator clock frequency for target system.
Definition at line 307 of file system_efm32pg12b.c.
References EFM32_LFRCO_FREQ.
uint32_t SystemLFXOClockGet | ( | void | ) |
Get low frequency crystal oscillator clock frequency for target system.
Definition at line 343 of file system_efm32pg12b.c.
Referenced by UARTDRV_InitLeuart().
void SystemLFXOClockSet | ( | uint32_t | freq | ) |
Set low frequency crystal oscillator clock frequency for target system.
[in] | freq | LFXO frequency in Hz used for target. |
Definition at line 369 of file system_efm32pg12b.c.
References _CMU_HFCLKSTATUS_SELECTED_MASK, CMU, CMU_HFCLKSTATUS_SELECTED_LFXO, and SystemCoreClockGet().
uint32_t SystemMaxCoreClockGet | ( | void | ) |
Get the maximum core clock frequency.
Definition at line 164 of file system_efm32pg12b.c.
uint32_t SystemULFRCOClockGet | ( | void | ) |
Get ultra low frequency RC oscillator clock frequency for target system.
Definition at line 326 of file system_efm32pg12b.c.
uint32_t SystemCoreClock |
System 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_efm32pg12b.c.
Referenced by SystemCoreClockGet().
uint32_t SystemHfrcoFreq = EFM32_HFRCO_STARTUP_FREQ |
System HFRCO frequency.
Frequency of the system HFRCO oscillator
Definition at line 113 of file system_efm32pg12b.c.
Referenced by CMU_HFRCOBandGet(), CMU_HFRCOBandSet(), and SystemHFClockGet().