Functions | |
void | SystemInit (void) |
Setup the microcontroller system. Initialize the System and update the SystemFrequency variable. | |
void | SystemCoreClockUpdate (void) |
Update SystemCoreClock according to Clock Register Values. |
void SystemInit | ( | void | ) |
Setup the microcontroller system. Initialize the System and update the SystemFrequency variable.
Initialize the system
none |
Setup the microcontroller system. Initialize the System and update the SystemFrequency variable.
* $Id: system_stm32f10x.c 4268 2012-06-15 13:24:08Z haraldkipp $ *
< Uncomment the following line if you need to use external SRAM mounted on STM3210E-EVAL board (STM32 High density and XL-density devices) as data memory
None |
None |
Basic setup of the microcontroller system.
Initialize the clock sources and reset the PLL. Additionally enable and configure externally attached memory if available.
Setup the microcontroller system. Initialize the System and update the SystemFrequency variable.
None |
None |
< Set MSION bit
< Reset SW[1:0], HPRE[3:0], PPRE1[2:0], PPRE2[2:0], MCOSEL[2:0] and MCOPRE[2:0] bits
< Reset HSION, HSEON, CSSON and PLLON bits
< Reset HSEBYP bit
< Reset PLLSRC, PLLMUL[3:0] and PLLDIV[1:0] bits
< Disable all interrupts
< Uncomment the following line if you need to relocate your vector Table in Internal SRAM.
void SystemCoreClockUpdate | ( | void | ) |
Update SystemCoreClock according to Clock Register Values.
This function reads out the CPUs clock and PLL registers and assembles the actual clock speed values into the SystemCoreClock global variable.
Update SystemCoreClock according to Clock Register Values.
(*) HSI_VALUE is a constant defined in stm32f2xx.h file (default value 16 MHz) but the real value may vary depending on the variations in voltage and temperature.
(**) HSE_VALUE is a constant defined in stm32f2xx.h file (default value 25 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.
None |
None | Update SystemCoreClock according to Clock Register Values. |
(*) HSI_VALUE is a constant defined in stm32f4xx.h file (default value 16 MHz) but the real value may vary depending on the variations in voltage and temperature.
(**) HSE_VALUE is a constant defined in stm32f4xx.h file (default value 25 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.
None |
None |
Referenced by Lpc17xx_ClockGet(), SetSysClock(), SetSysClockSource(), and SysCtlClockGet().