STM32F0xx Standard Peripherals Firmware Library: STM32F0xx_System_Private_Functions

STM32F0xx Standard Peripherals Library

STM32F0xx Standard Peripherals Firmware Library
STM32F0xx_System_Private_Functions

Functions

static void SetSysClock (void)
 Configures the System clock frequency, AHB/APBx prescalers and Flash settings.
void SystemCoreClockUpdate (void)
 Update SystemCoreClock according to Clock Register Values The SystemCoreClock variable contains the core clock (HCLK), it can be used by the user application to setup the SysTick timer or configure other parameters.
void SystemInit (void)
 Setup the microcontroller system.

Function Documentation

static void SetSysClock ( void  ) [static]

Configures the System clock frequency, AHB/APBx prescalers and Flash settings.

Note:
This function should be called only once the RCC clock configuration is reset to the default reset state (done in SystemInit() function).
Parameters:
None
Return values:
None

Definition at line 277 of file STM32F0xx_StdPeriph_Examples/ADC/ADC_BasicExample/system_stm32f0xx.c.

void SystemCoreClockUpdate ( void  )

Update SystemCoreClock according to Clock Register Values The SystemCoreClock variable contains the core clock (HCLK), it can be used by the user application to setup the SysTick timer or configure other parameters.

Note:
Each time the core clock (HCLK) changes, this function must be called to update SystemCoreClock variable value. Otherwise, any configuration based on this variable will be incorrect.
- The system frequency computed by this function is not the real frequency in the chip. It is calculated based on the predefined constant and the selected clock source:
  • If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
  • If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
  • If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) or HSI_VALUE(*) multiplied/divided by the PLL factors.

(*) HSI_VALUE is a constant defined in stm32f0xx.h file (default value 8 MHz) but the real value may vary depending on the variations in voltage and temperature.

(**) HSE_VALUE is a constant defined in stm32f0xx.h file (default value 8 MHz), user has to ensure that HSE_VALUE is same as the real frequency of the crystal used. Otherwise, this function may have wrong result.

  • The result of this function could be not correct when using fractional value for HSE crystal.
    Parameters:
    None
    Return values:
    None

Definition at line 225 of file STM32F0xx_StdPeriph_Examples/ADC/ADC_AnalogWatchdog/system_stm32f0xx.c.

References AHBPrescTable, SystemCoreClock, and tmp.

void SystemInit ( void  )

Setup the microcontroller system.

Initialize the Embedded Flash Interface, the PLL and update the SystemCoreClock variable.

Parameters:
None
Return values:
None

Definition at line 157 of file STM32F0xx_StdPeriph_Examples/ADC/ADC_AnalogWatchdog/system_stm32f0xx.c.

References SetSysClock().

STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32