HAL_RCC_OscConfig
HAL_StatusTypeDef HAL_RCC_OscConfig
(RCC_OscInitTypeDef * RCC_OscInitStruct)
Initializes the RCC Oscillators according to the specified
parameters in the RCC_OscInitTypeDef.
RCC_OscInitStruct: pointer to an RCC_OscInitTypeDef
structure that contains the configuration information for the
RCC Oscillators.
The PLL is not disabled when used as system clock.
Transitions LSE Bypass to LSE On and LSE On to LSE
Bypass are not supported by this API. User should request a
transition to LSE Off first and then LSE On or LSE Bypass.
Transition HSE Bypass to HSE On and HSE On to HSE
Bypass are not supported by this API. User should request a
transition to HSE Off first and then HSE On or HSE Bypass.
HAL_RCC_ClockConfig
HAL_StatusTypeDef HAL_RCC_ClockConfig
(RCC_ClkInitTypeDef * RCC_ClkInitStruct, uint32_t FLatency)
Initializes the CPU, AHB and APB busses clocks according to the
specified parameters in the RCC_ClkInitStruct.
RCC_ClkInitStruct: pointer to an RCC_OscInitTypeDef
structure that contains the configuration information for the
RCC peripheral.
FLatency: FLASH Latency, this parameter depend on device
selected
The SystemCoreClock CMSIS variable is used to store
System Clock Frequency and updated by
HAL_RCC_GetHCLKFreq() function called within this function
The HSI is used (enabled by hardware) as system clock
source after startup from Reset, wake-up from STOP and
STANDBY mode, or in case of failure of the HSE used
directly or indirectly as system clock (if the Clock Security
System CSS is enabled).
A switch from one clock source to another occurs only if the
target clock source is ready (clock stable after startup delay or
PLL locked). If a clock source which is not yet ready is
selected, the switch will occur when the clock source will be
ready.
Depending on the device voltage range, the software has to
set correctly HPRE[3:0] bits to ensure that HCLK not exceed
the maximum allowed frequency (for more details refer to
section above "Initialization/de-initialization functions")