|
STM32 Bootloader
Customizable Bootloader for STM32 microcontrollers
|
Macros | |
| #define | HSE_VALUE 8000000U |
| #define | MSI_VALUE 4000000U |
| #define | HSI_VALUE 16000000U |
Functions | |
| void | SystemInit (void) |
| Initialize the system before calling the main() function. | |
| void | SystemCoreClockUpdate (void) |
| Update the SystemCoreClock variable according to the clock register values. More... | |
Variables | |
| uint32_t | SystemCoreClock = 4000000U |
| Define to enable user-defined vector table address setting. More... | |
| const uint8_t | AHBPrescTable [16] |
| const uint8_t | APBPrescTable [8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U} |
| const uint32_t | MSIRangeTable [12] |
| #define HSE_VALUE 8000000U |
Value of the external oscillator in Hz
Definition at line 68 of file system_stm32l4xx.c.
| #define HSI_VALUE 16000000U |
Value of the internal oscillator (HSI) in Hz
Definition at line 78 of file system_stm32l4xx.c.
| #define MSI_VALUE 4000000U |
Value of the internal oscillator (MSI) in Hz
Definition at line 73 of file system_stm32l4xx.c.
| void SystemCoreClockUpdate | ( | void | ) |
Update the SystemCoreClock variable according to the 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.
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:
(*) MSI_VALUE is a constant defined in stm32l4xx_hal.h file (default value 4 MHz) but the real value may vary depending on the variations in voltage and temperature.
(**) HSI_VALUE is a constant defined in stm32l4xx_hal.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 stm32l4xx_hal.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.
Definition at line 200 of file system_stm32l4xx.c.
| const uint8_t AHBPrescTable[16] |
The AHB prescaler values.
Definition at line 136 of file system_stm32l4xx.c.
| const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U} |
The APB prescaler values.
Definition at line 140 of file system_stm32l4xx.c.
| const uint32_t MSIRangeTable[12] |
The MSI iscillator values values.
Definition at line 143 of file system_stm32l4xx.c.
| uint32_t SystemCoreClock = 4000000U |
Define to enable user-defined vector table address setting.
Uncomment the following line if you need to relocate the vector table anywhere in Flash or SRAM, else the vector table is kept at the automatic remap of the boot address selected.
The system core clock value in Hz.
The SystemCoreClock variable is updated in three ways:
Definition at line 133 of file system_stm32l4xx.c.